Add OPENAI_VOICE_NAME env variable

I kept the default to `alloy`
pull/128/head
Marc Khoury 10 months ago committed by GitHub
parent f9cc6bb665
commit 6bfec56bb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,7 +14,7 @@ class Tts:
def tts(self, text): def tts(self, text):
response = client.audio.speech.create( response = client.audio.speech.create(
model="tts-1", model="tts-1",
voice="alloy", voice=os.getenv('OPENAI_VOICE_NAME', 'alloy'),
input=text, input=text,
response_format="opus" response_format="opus"
) )

Loading…
Cancel
Save