Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,7 @@ async def speech_to_text(file: UploadFile = File(...)):
|
|
46 |
|
47 |
@app.post("/tts/")
|
48 |
def text_to_speech(input_text: TextInput):
|
|
|
49 |
"""Convert text to a WAV audio file using ggwave and return as response."""
|
50 |
encoded_waveform = ggwave.encode(instance, input_text.text)
|
51 |
buffer = io.BytesIO()
|
|
|
46 |
|
47 |
@app.post("/tts/")
|
48 |
def text_to_speech(input_text: TextInput):
|
49 |
+
instance = ggwave.init()
|
50 |
"""Convert text to a WAV audio file using ggwave and return as response."""
|
51 |
encoded_waveform = ggwave.encode(instance, input_text.text)
|
52 |
buffer = io.BytesIO()
|