Merge pull request #128 from koganei/patch-1

Fix for Issue #104 - Add OPENAI_VOICE_NAME env variable
pull/137/head
killian 10 months ago committed by GitHub
commit 31ac7f9cc7
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