getting request and writing to file working

This commit is contained in:
talksik
2023-04-29 10:18:24 -07:00
parent c51c7ec91f
commit 1f75697640
6 changed files with 24 additions and 11 deletions
+2
View File
@@ -3,6 +3,8 @@ 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):
language_code = "-".join(voice_name.split("-")[:2])
text_input = tts.SynthesisInput(text=text)