-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange Behaviors #77
Comments
Additional: The model sometimes reads phone numbers and sentences incorrectly in the audio output, even though they're correct in the text messages. Example text: Phone number: 1234567890, audio output: "1 2 45 789 54." Why? |
Update: To address the initialization issue where random noise or unintended audio data was sent immediately after starting, we made the following changes in main.ts: Delay in Starting Real-Time Messages: We added a 1-second delay in the start_realtime() function before invoking handleRealtimeMessages(). This delay allows the audio system to stabilize before sending any initial audio data to the model, reducing the chance of random noise being processed as valid input. Delay in Starting the Audio Recorder: Within the resetAudio() function, a 500-millisecond delay was introduced before starting the actual audio recording. This provides time for the audio recorder to initialize fully and ensures that no random noise or unintentional sounds are captured at the moment of starting the recording. Noise Filtering in the Audio Buffer: In the processAudioRecordingBuffer() function, we implemented a noise filter by checking if the audio buffer contains meaningful audio data before sending it. By setting a threshold (e.g., >10), the function only processes buffers with valid audio content, preventing low-level noise or silence from being mistakenly interpreted as input. Example: `// main.ts async function start_realtime() { realtimeStreaming = new LowLevelRTClient(new URL(endpoint), { key: apiKey }, { deployment: deploymentOrModel }); try { // Reset audio recorder and start it with a slight delay to avoid noise // Delay to ensure initial random signals are not sent immediately async function resetAudio(startRecording: boolean) { if (startRecording) {
} function processAudioRecordingBuffer(data: Buffer) { // Check if buffer contains actual audio content (threshold set to filter out noise) |
Hi everyone, first of all: I really appreciate this code. It has helped me a lot. Thank you for that.
Issues:
2 The model sometimes replies that it can't retrieve information from the internet because it's not connected, but other times it works... Why?
Thank you very much,
Stefan
The text was updated successfully, but these errors were encountered: