making it all work
This commit is contained in:
+1
-1
@@ -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__":
|
||||
|
||||
Binary file not shown.
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user