fix: add missing await on speechToText and textToSpeech async calls

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
patrick-motsch 2026-02-13 17:46:02 +01:00
parent 65128db713
commit 367edd83e2

View file

@ -275,7 +275,7 @@ class TeamsbotService:
# Step 1: STT -- convert audio to text # Step 1: STT -- convert audio to text
try: try:
sttResult = voiceInterface.speechToText( sttResult = await voiceInterface.speechToText(
audioContent=audioBytes, audioContent=audioBytes,
language=self.config.language, language=self.config.language,
sampleRate=16000, sampleRate=16000,
@ -462,7 +462,7 @@ class TeamsbotService:
# 4a: TTS -> Audio to bridge # 4a: TTS -> Audio to bridge
try: try:
ttsResult = voiceInterface.textToSpeech( ttsResult = await voiceInterface.textToSpeech(
text=speechResult.responseText, text=speechResult.responseText,
languageCode=self.config.language, languageCode=self.config.language,
voiceName=self.config.voiceId voiceName=self.config.voiceId