Vous êtes sur la page 1sur 5

traceback

─────────────────────────────── Traceback (most recent call last)


──────────────────────────────── ╮
│ E:\HeyGenClone\translate.py:26 in <module> │
│ │
│ 23 │ │ │ │ │ │ help='output file name (default: output.mp4)') │
│ 24 │ args = parser.parse_args() │
│ 25 │ │
│ ❱ 26 │ translate( │
│ 27 │ │ video_filename=args.video_filename, │
│ 28 │ │ output_language=args.output_language, │
│ 29 │ │ output_filename=args.output_filename, │
│ │
│ E:\HeyGenClone\translate.py:12 in translate │
│ │
│ 9 │
│ 10 def translate(video_filename, output_language, output_filename): │
│ 11 │ engine = Engine(config, output_language) │
│ ❱ 12 │ engine(video_filename, output_filename) │
│ 13 │
│ 14 │
│ 15 if name == 'main': │
│ │
│ E:\HeyGenClone\core\engine.py:126 in call │
│ │
│ 123 │ │ │ │ suffix='.wav').name │
│ 124 │ │ │ sub_voice.export(sub_voice_wav, format='wav') │
│ 125 │ │ │ │
│ ❱ 126 │ │ │ output_wav = speedup_audio(self.cloner, dst_text, sub_voice_wav) │
│ 127 │ │ │ │
│ 128 │ │ │ updates.append({ │
│ 129 │ │ │ │ # In ms │
│ │
│ E:\HeyGenClone\core\audio.py:45 in speedup_audio │
│ │
│ 42 │ dst = AudioSegment.from_file(dst_audio_filename) │
│ 43 │ dst_duration = dst.duration_seconds │
│ 44 │ │
│ ❱ 45 │ cloned_wav = cloner.process( │
│ 46 │ │ speaker_wav_filename=dst_audio_filename, │
│ 47 │ │ text=dst_text │
│ 48 │ ) │
│ │
│ E:\HeyGenClone\core\voice_cloner.py:16 in process │
│ │
│ 13 │ │ temp_manager = TempFileManager() │
│ 14 │ │ if not out_filename: │
│ 15 │ │ │ out_filename = temp_manager.create_temp_file(suffix='.wav').name │
│ ❱ 16 │ │ self.tts.tts_to_file( │
│ 17 │ │ │ text=text, │
│ 18 │ │ │ speaker_wav=speaker_wav_filename, │

traceback 1
│ 19 │ │ │ language=self.lang_code, │
│ │
│ D:\Anaconda\lib\site-packages\TTS\api.py:403 in tts_to_file │
│ │
│ 400 │ │ │ │ file_path=file_path, │
│ 401 │ │ │ │ pipe_out=pipe_out, │
│ 402 │ │ │ ) │
│ ❱ 403 │ │ wav = self.tts(text=text, speaker=speaker, language=language, speaker_wav=speake │
│ 404 │ │ self.synthesizer.save_wav(wav=wav, path=file_path, pipe_out=pipe_out) │
│ 405 │ │ return file_path │
│ 406 │
│ │
│ D:\Anaconda\lib\site-packages\TTS\api.py:341 in tts │
│ │
│ 338 │ │ │ return self.tts_coqui_studio( │
│ 339 │ │ │ │ text=text, speaker_name=speaker, language=language, emotion=emotion, spe │
│ 340 │ │ │ ) │
│ ❱ 341 │ │ wav = self.synthesizer.tts( │
│ 342 │ │ │ text=text, │
│ 343 │ │ │ speaker_name=speaker, │
│ 344 │ │ │ language_name=language, │
│ │
│ D:\Anaconda\lib\site-packages\TTS\utils\synthesizer.py:374 in tts │
│ │
│ 371 │ │ if not reference_wav: # not voice conversion │
│ 372 │ │ │ for sen in sens: │
│ 373 │ │ │ │ if hasattr(self.tts_model, "synthesize"): │
│ ❱ 374 │ │ │ │ │ outputs = self.tts_model.synthesize( │
│ 375 │ │ │ │ │ │ text=sen, │
│ 376 │ │ │ │ │ │ config=self.tts_config, │
│ 377 │ │ │ │ │ │ speaker_id=speaker_name, │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:392 in synthesize │
│ │
│ 389 │ │ │ as latents used at inference. │
│ 390 │ │ │
│ 391 │ │ """ │
│ ❱ 392 │ │ return self.inference_with_config(text, config, ref_audio_path=speaker_wav, lang │
│ 393 │ │
│ 394 │ def inference_with_config(self, text, config, ref_audio_path, language, **kwargs): │
│ 395 │ │ """ │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:414 in inference_with_config │
│ │
│ 411 │ │ │ "sound_norm_refs": config.sound_norm_refs, │
│ 412 │ │ } │
│ 413 │ │ settings.update(kwargs) # allow overriding of preset settings with kwargs │
│ ❱ 414 │ │ return self.full_inference(text, ref_audio_path, language, **settings) │
│ 415 │ │
│ 416 │ @torch.inference_mode() │
│ 417 │ def full_inference( │
│ │
│ D:\Anaconda\lib\site-packages\torch\utils\_contextlib.py:115 in decorate_context │
│ │

traceback 2
│ 112 │ @functools.wraps(func) │
│ 113 │ def decorate_context(*args, **kwargs): │
│ 114 │ │ with ctx_factory(): │
│ ❱ 115 │ │ │ return func(*args, **kwargs) │
│ 116 │ │
│ 117 │ return decorate_context │
│ 118 │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:475 in full_inference │
│ │
│ 472 │ │ │ Generated audio clip(s) as a torch tensor. Shape 1,S if k=1 else, (k,1,S) wh │
│ 473 │ │ │ Sample rate is 24kHz. │
│ 474 │ │ """ │
│ ❱ 475 │ │ (gpt_cond_latent, speaker_embedding) = self.get_conditioning_latents( │
│ 476 │ │ │ audio_path=ref_audio_path, │
│ 477 │ │ │ gpt_cond_len=gpt_cond_len, │
│ 478 │ │ │ gpt_cond_chunk_len=gpt_cond_chunk_len, │
│ │
│ D:\Anaconda\lib\site-packages\torch\utils\_contextlib.py:115 in decorate_context │
│ │
│ 112 │ @functools.wraps(func) │
│ 113 │ def decorate_context(*args, **kwargs): │
│ 114 │ │ with ctx_factory(): │
│ ❱ 115 │ │ │ return func(*args, **kwargs) │
│ 116 │ │
│ 117 │ return decorate_context │
│ 118 │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:366 in get_conditioning_latents │
│ │
│ 363 │ │ │
│ 364 │ │ # merge all the audios and compute the latents for the gpt │
│ 365 │ │ full_audio = torch.cat(audios, dim=-1) │
│ ❱ 366 │ │ gpt_cond_latents = self.get_gpt_cond_latents( │
│ 367 │ │ │ full_audio, load_sr, length=gpt_cond_len, chunk_length=gpt_cond_chunk_len │
│ 368 │ │ ) # [1, 1024, T] │
│ 369 │
│ │
│ D:\Anaconda\lib\site-packages\torch\utils\_contextlib.py:115 in decorate_context │
│ │
│ 112 │ @functools.wraps(func) │
│ 113 │ def decorate_context(*args, **kwargs): │
│ 114 │ │ with ctx_factory(): │
│ ❱ 115 │ │ │ return func(*args, **kwargs) │
│ 116 │ │
│ 117 │ return decorate_context │
│ 118 │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:275 in get_gpt_cond_latents │
│ │
│ 272 │ │ │ style_embs = [] │
│ 273 │ │ │ for i in range(0, audio.shape[1], 22050 * chunk_length): │
│ 274 │ │ │ │ audio_chunk = audio[:, i : i + 22050 * chunk_length] │
│ ❱ 275 │ │ │ │ mel_chunk = wav_to_mel_cloning( │

traceback 3
│ 276 │ │ │ │ │ audio_chunk, │
│ 277 │ │ │ │ │ mel_norms=self.mel_stats.cpu(), │
│ 278 │ │ │ │ │ n_fft=2048, │
│ │
│ D:\Anaconda\lib\site-packages\TTS\tts\models\xtts.py:60 in wav_to_mel_cloning │
│ │
│ 57 │ │ norm="slaney", │
│ 58 │ ).to(device) │
│ 59 │ wav = wav.to(device) │
│ ❱ 60 │ mel = mel_stft(wav) │
│ 61 │ mel = torch.log(torch.clamp(mel, min=1e-5)) │
│ 62 │ if mel_norms is None: │
│ 63 │ │ mel_norms = torch.load(mel_norms_file, map_location=device) │
│ │
│ D:\Anaconda\lib\site-packages\torch\nn\modules\module.py:1518 in _wrapped_call_impl │
│ │
│ 1515 │ │ if self._compiled_call_impl is not None: │
│ 1516 │ │ │ return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc] │
│ 1517 │ │ else: │
│ ❱ 1518 │ │ │ return self._call_impl(*args, **kwargs) │
│ 1519 │ │
│ 1520 │ def _call_impl(self, *args, **kwargs): │
│ 1521 │ │ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo │
│ │
│ D:\Anaconda\lib\site-packages\torch\nn\modules\module.py:1527 in _call_impl │
│ │
│ 1524 │ │ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks │
│ 1525 │ │ │ │ or _global_backward_pre_hooks or _global_backward_hooks │
│ 1526 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks): │
│ ❱ 1527 │ │ │ return forward_call(*args, **kwargs) │
│ 1528 │ │ │
│ 1529 │ │ try: │
│ 1530 │ │ │ result = None │
│ │
│ D:\Anaconda\lib\site-packages\torchaudio\transforms\_transforms.py:619 in forward │
│ │
│ 616 │ │ Returns: │
│ 617 │ │ │ Tensor: Mel frequency spectrogram of size (..., n_mels , time). │
│ 618 │ │ """ │
│ ❱ 619 │ │ specgram = self.spectrogram(waveform) │
│ 620 │ │ mel_specgram = self.mel_scale(specgram) │
│ 621 │ │ return mel_specgram │
│ 622 │
│ │
│ D:\Anaconda\lib\site-packages\torch\nn\modules\module.py:1518 in _wrapped_call_impl │
│ │
│ 1515 │ │ if self._compiled_call_impl is not None: │
│ 1516 │ │ │ return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc] │
│ 1517 │ │ else: │
│ ❱ 1518 │ │ │ return self._call_impl(*args, **kwargs) │
│ 1519 │ │
│ 1520 │ def _call_impl(self, *args, **kwargs): │
│ 1521 │ │ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo │
│ │

traceback 4
│ D:\Anaconda\lib\site-packages\torch\nn\modules\module.py:1527 in _call_impl │
│ │
│ 1524 │ │ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks │
│ 1525 │ │ │ │ or _global_backward_pre_hooks or _global_backward_hooks │
│ 1526 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks): │
│ ❱ 1527 │ │ │ return forward_call(*args, **kwargs) │
│ 1528 │ │ │
│ 1529 │ │ try: │
│ 1530 │ │ │ result = None │
│ │
│ D:\Anaconda\lib\site-packages\torchaudio\transforms\_transforms.py:110 in forward │
│ │
│ 107 │ │ │ n_fft // 2 + 1 where n_fft is the number of │
│ 108 │ │ │ Fourier bins, and time is the number of window hops (n_frame). │
│ 109 │ │ """ │
│ ❱ 110 │ │ return F.spectrogram( │
│ 111 │ │ │ waveform, │
│ 112 │ │ │ self.pad, │
│ 113 │ │ │ self.window, │
│ │
│ D:\Anaconda\lib\site-packages\torchaudio\functional\functional.py:126 in spectrogram │
│ │
│ 123 │ waveform = waveform.reshape(-1, shape[-1]) │
│ 124 │ │
│ 125 │ # default values are consistent with librosa.core.spectrum._spectrogram │
│ ❱ 126 │ spec_f = torch.stft( │
│ 127 │ │ input=waveform, │
│ 128 │ │ n_fft=n_fft, │
│ 129 │ │ hop_length=hop_length, │
│ │
│ D:\Anaconda\lib\site-packages\torch\functional.py:648 in stft │
│ │
│ 645 │ │ signal_dim = input.dim() │
│ 646 │ │ extended_shape = [1] * (3 - signal_dim) + list(input.size()) │
│ 647 │ │ pad = int(n_fft // 2) │
│ ❱ 648 │ │ input = F.pad(input.view(extended_shape), [pad, pad], pad_mode) │
│ 649 │ │ input = input.view(input.shape[-signal_dim:]) │
│ 650 │ return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-d │
│ 651 │ │ │ │ │ normalized, onesided, return_complex) │
╰──────────────────────────────────────────────────────────────────────────────────
RuntimeError: Argument #4: Padding size should be less than the corresponding input dimension, but got: padding (1024,
1024) at dimension 2 of input [1, 1, 596]

traceback 5

Vous aimerez peut-être aussi