Skip to content

Commit

Permalink
move utterance to query params
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Dec 30, 2023
1 parent 6ee2f05 commit 1bc7593
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ovos_tts_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def synth(utterance: str, request: Request):
audio, phonemes = TTS.synth(utterance, **request.query_params)
return FileResponse(audio.path)

@app.get("/v2/synthesize")
def synth(request: Request):
utterance = request.query_params["utterance"]
utterance = TTS.validate_ssml(utterance)
audio, phonemes = TTS.synth(utterance, **request.query_params)
return FileResponse(audio.path)

return app


Expand Down

0 comments on commit 1bc7593

Please sign in to comment.