diff --git a/voice-server/en-GB-Neural2-B.wav b/voice-server/en-GB-Neural2-B.wav index 81d5995..4378c34 100644 Binary files a/voice-server/en-GB-Neural2-B.wav and b/voice-server/en-GB-Neural2-B.wav differ diff --git a/voice-server/tts.py b/voice-server/tts.py index 1be9cf8..1f9cedf 100644 --- a/voice-server/tts.py +++ b/voice-server/tts.py @@ -1,5 +1,6 @@ import google.cloud.texttospeech as tts +OUTPUT_FILE = "output.wav" # todo: make sure to make the file name unique and delete it after sending def text_to_wav(voice_name: str, text: str): @@ -17,9 +18,8 @@ def text_to_wav(voice_name: str, text: str): audio_config=audio_config, ) - filename = f"{voice_name}.wav" - with open(filename, "wb") as out: + with open(OUTPUT_FILE, "wb") as out: out.write(response.audio_content) - print(f'Generated speech saved to "{filename}"') + print(f'Generated speech saved to "{OUTPUT_FILE}"') - return filename + return OUTPUT_FILE