Skip to content

[Bug] Exception while using "--speaker_wav" #1440

Closed
@lokeshhctm

Description

🐛 Description

(base) root@ip-192-168-0-200:/

/root/miniconda3/bin/tts --text "Awesome, Pretty Good" --model_name "tts_models/en/vctk/vits" --out_path "chunk11_encoded.wav" --speaker_wav "chunk10.wav"

tts_models/en/vctk/vits is already downloaded.
Using model: vits
Setting up Audio Processor...
| > sample_rate:22050
| > resample:False
| > num_mels:80
| > log_func:np.log10
| > min_level_db:-100
| > frame_shift_ms:None
| > frame_length_ms:None
| > ref_level_db:20
| > fft_size:1024
| > power:1.5
| > preemphasis:0.0
| > griffin_lim_iters:60
| > signal_norm:True
| > symmetric_norm:True
| > mel_fmin:0
| > mel_fmax:None
| > pitch_fmin:0.0
| > pitch_fmax:640.0
| > spec_gain:20.0
| > stft_pad_mode:reflect
| > max_norm:4.0
| > clip_norm:True
| > do_trim_silence:True
| > trim_db:45
| > do_sound_norm:False
| > do_amp_to_db_linear:False
| > do_amp_to_db_mel:True
| > do_rms_norm:False
| > db_level:None
| > stats_path:None
| > base:10
| > hop_length:256
| > win_length:1024
initialization of speaker-embedding layers.
Using Griffin-Lim as no vocoder model defined
Text: Awesome, Pretty Good
Text splitted to sentences.
['Awesome, Pretty Good']
Traceback (most recent call last):
File "/root/miniconda3/bin/tts", line 8, in
sys.exit(main())
File "/root/miniconda3/lib/python3.9/site-packages/TTS/bin/synthesize.py", line 287, in main
wav = synthesizer.tts(args.text, args.speaker_idx, args.language_idx, args.speaker_wav)
File "/root/miniconda3/lib/python3.9/site-packages/TTS/utils/synthesizer.py", line 245, in tts
speaker_embedding = self.tts_model.speaker_manager.compute_d_vector_from_clip(speaker_wav)
File "/root/miniconda3/lib/python3.9/site-packages/TTS/tts/utils/speakers.py", line 287, in compute_d_vector_from_clip
d_vector = _compute(wf)
File "/root/miniconda3/lib/python3.9/site-packages/TTS/tts/utils/speakers.py", line 270, in _compute
waveform = self.speaker_encoder_ap.load_wav(wav_file, sr=self.speaker_encoder_ap.sample_rate)
AttributeError: 'NoneType' object has no attribute 'load_wav'

Expected behavior

Environment

  • 🐸TTS Version (e.g., 1.3.0):
  • PyTorch Version (e.g., 1.8)
  • Python version:
  • OS (e.g., Linux):
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • How you installed PyTorch (conda, pip, source):
  • Any other relevant information:

Additional context

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions