I have this issue since a few days, that the Azure Speechtotext service stops transcribing in the middle of the input. I havent seen this issue for a long time and have never changed my codebase since, but it has appeared recently.
It is kinda unpredicatable when it happens. Every few messages it just stops the transcription, even though the mic stays "on" / red and I continue speaking.
You can see that in message 2 and 4 i have send in the above video, input 1 and 3 work flawlessly, while 2 ("on the audio track" i first do repeat the sequence, which it didnt transcribe, i stop the mic after a while and start typing) and 4 just stop in the middle of the input while i keep on speaking.
The connection to the SDK itself doesnt show anything weird in that case.
the Messages tab still shows succesful transcription come back, i.e. which is not showing in deep-chat UI.
X-RequestId:5201253116CF4C5BB5580AD122FE4A29
Path:speech.hypothesis
Content-Type:application/json; charset=utf-8
{"Id":"0c26d1fc5d5241708f4e827df2513b50","Text":"now it's broken","Offset":139100000,"Duration":15700000,"PrimaryLanguage":{"Language":"en-US"},"Channel":0}
The parts in my code related to deep-chat and the speechtotext SDK are the following, it Vue.JS.
const speechToTextConfig = ref({
azure: {
retrieveToken: fetchSpeechToken,
region: "eastus",
language: props.identifier,
},
submitAfterSilence: false,
stopAfterSubmit: true,
});
<deep-chat ref="chatElementRef" v-if="stream" demo="true" :speechToText="speechToTextConfig"
:onMessage="handleNewMessage" :connect="getRequest" :style="{ height: '100%', width: '100%' }" :messageStyles="{
default: {
user: {
bubble: {
backgroundColor: '#2a4ce1'
}
}
}
}"></deep-chat>
<script>
import 'deep-chat';
import { ref, onMounted, onUnmounted } from 'vue';
import * as sdk from 'microsoft-cognitiveservices-speech-sdk';
export default {
setup(props) {
const chatElementRef = ref(null); // Reference to the deep-chat component
// Speech SDK setup
const setupSpeechSDK = () => {
if (!window.SpeechSDK) {
// Option 1: Using imported SDK
window.SpeechSDK = sdk;
}
};
onMounted(async () => {
try {
// Set up Speech SDK before initializing Deep Chat
setupSpeechSDK();
console.log('Speech SDK loaded:', !!window.SpeechSDK);
...
}
});
return {
...
};
},
};
</script>
Have you ever encountered this? Any suggestion how I can debug whats going wrong in this case?
Using the newst version 2.1.1. But had issues before the update as well.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too