Skip to content

Commit

Permalink
Merge pull request #8 from dangvansam/fix/long-text
Browse files Browse the repository at this point in the history
fix bug when synthesis long text
  • Loading branch information
dangvansam authored Dec 12, 2024
2 parents 9a81e7f + 1014b91 commit c29b753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viettts/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def inference_vc(self, source_speech_16k, prompt_speech_16k, stream=False, speed
def tts_to_wav(self, text, prompt_speech_16k, speed=1.0):
wavs = []
for output in self.inference_tts(text, prompt_speech_16k, stream=False, speed=speed):
wavs.append(output['tts_speech'])
return np.concatenate(wavs, axis=0).flatten()
wavs.append(output['tts_speech'].squeeze(0).numpy())
return np.concatenate(wavs, axis=0)

def tts_to_file(self, text, prompt_speech_16k, speed, output_path):
wav = self.tts_to_wav(text, prompt_speech_16k, speed)
Expand Down

0 comments on commit c29b753

Please sign in to comment.