Skip to content

Commit

Permalink
Revert "fix for issue 3067"
Browse files Browse the repository at this point in the history
This reverts commit 041b4b6.

Fixes coqui-ai#3143. The original issue (coqui-ai#3067) was people trying to use
tts.tts_with_vc_to_file() with XTTS and was "fixed" in coqui-ai#3109. But XTTS has
integrated VC and you can just do tts.tts_to_file(..., speaker_wav="..."), there
is no point in passing it through FreeVC afterwards. So, reverting this commit
because it breaks tts.tts_with_vc_to_file() for any model that doesn't have
integrated VC, i.e. all models this method is meant for.
  • Loading branch information
eginhard committed Nov 20, 2023
1 parent 29dede2 commit 8a7cc18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TTS/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def tts_with_vc(self, text: str, language: str = None, speaker_wav: str = None):
"""
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
# Lazy code... save it to a temp file to resample it while reading it for VC
self.tts_to_file(text=text, speaker=None, language=language, file_path=fp.name, speaker_wav=speaker_wav)
self.tts_to_file(text=text, speaker=None, language=language, file_path=fp.name)
if self.voice_converter is None:
self.load_vc_model_by_name("voice_conversion_models/multilingual/vctk/freevc24")
wav = self.voice_converter.voice_conversion(source_wav=fp.name, target_wav=speaker_wav)
Expand Down

0 comments on commit 8a7cc18

Please # to comment.