Spaces:
Paused
Paused
Commit
·
3855dca
1
Parent(s):
911767e
audio configurations initial attempt
Browse files
app.py
CHANGED
@@ -7,8 +7,9 @@ import azure.cognitiveservices.speech as speechsdk
|
|
7 |
openai.api_key = os.environ['OPEN_AI_KEY']
|
8 |
|
9 |
speech_config = speechsdk.SpeechConfig(subscription=os.environ['AZURE_SPEECH_KEY'], region="westeurope")
|
|
|
10 |
speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
|
11 |
-
speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config)
|
12 |
|
13 |
messages = [{"role": "system", "content": 'You are a clever and helpfull conversationalist. Respond to all input in 25 words or less. Do not mention that you are an AI or service of any kind.'}]
|
14 |
|
|
|
7 |
openai.api_key = os.environ['OPEN_AI_KEY']
|
8 |
|
9 |
speech_config = speechsdk.SpeechConfig(subscription=os.environ['AZURE_SPEECH_KEY'], region="westeurope")
|
10 |
+
audio_config = speechsdk.audio.AudioOutputConfig(use_default_speaker=True)
|
11 |
speech_config.speech_synthesis_voice_name = "en-US-AriaNeural"
|
12 |
+
speech_synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=audio_config)
|
13 |
|
14 |
messages = [{"role": "system", "content": 'You are a clever and helpfull conversationalist. Respond to all input in 25 words or less. Do not mention that you are an AI or service of any kind.'}]
|
15 |
|