From 6bfec56bb93e17f1f5aaa5ca1c14ffceeacbaba7 Mon Sep 17 00:00:00 2001 From: Marc Khoury Date: Sat, 23 Mar 2024 08:17:50 -0400 Subject: [PATCH] Add OPENAI_VOICE_NAME env variable I kept the default to `alloy` --- software/source/server/services/tts/openai/tts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/source/server/services/tts/openai/tts.py b/software/source/server/services/tts/openai/tts.py index 23eb65b..a3759bb 100644 --- a/software/source/server/services/tts/openai/tts.py +++ b/software/source/server/services/tts/openai/tts.py @@ -14,7 +14,7 @@ class Tts: def tts(self, text): response = client.audio.speech.create( model="tts-1", - voice="alloy", + voice=os.getenv('OPENAI_VOICE_NAME', 'alloy'), input=text, response_format="opus" )