uezo / aiavatarkit

🥰 Building AI-based conversational avatars lightning fast ⚡️💬
Apache License 2.0
162 stars 10 forks source link

Ignore non-verbal sounds on voice recognition #31

Closed uezo closed 2 months ago

uezo commented 2 months ago

Implement retry mechanism for voice recognition on detecting non-verbal sounds.

This commit introduces a retry logic in the AzureVoiceRequestListener class to address the issue of non-verbal sounds (like clicks) being misinterpreted as voice commands.

When such noises are detected and no valid voice command is recognized, the system now waits for a short interval (configurable via recognizer_wait_time) before attempting to recognize again.

This process repeats until the detection timeout is reached, enhancing the reliability of voice command detection under noisy conditions.