diff --git a/voice-server/app.py b/voice-server/app.py index 1269a06..c9853fd 100644 --- a/voice-server/app.py +++ b/voice-server/app.py @@ -65,7 +65,7 @@ def text_to_speech(): ) # return the file - return send_file(f"{fileName}.wav", mimetype="audio/wav") + return send_file(f"{fileName}", mimetype="audio/wav") if __name__ == "__main__": diff --git a/voice-server/en-GB-Neural2-B.wav b/voice-server/en-GB-Neural2-B.wav new file mode 100644 index 0000000..81d5995 Binary files /dev/null and b/voice-server/en-GB-Neural2-B.wav differ diff --git a/voice-server/tts.py b/voice-server/tts.py index 8442c2e..1be9cf8 100644 --- a/voice-server/tts.py +++ b/voice-server/tts.py @@ -1,6 +1,7 @@ import google.cloud.texttospeech as tts +# todo: make sure to make the file name unique and delete it after sending def text_to_wav(voice_name: str, text: str): language_code = "-".join(voice_name.split("-")[:2]) text_input = tts.SynthesisInput(text=text)