Skip to content

Refactor microphone and wake word implementations#78

Merged
brownard merged 1 commit into
masterfrom
Refactor_audio_input_interfaces
Apr 25, 2026
Merged

Refactor microphone and wake word implementations#78
brownard merged 1 commit into
masterfrom
Refactor_audio_input_interfaces

Conversation

@brownard
Copy link
Copy Markdown
Owner

Refactor VoiceInput, extract interfaces for microphone input and wake word detection and improve separation of Android specific implementations

  • Simplify VoiceInput, pass Microphone and WakeWord dependencies in constructor and refactor to use a callbackFlow to allow checking for isActive in the audio processing loop to avoid needing to explicitly yield to check for cancellation
  • Add a WakeWord interface for abstracting wake word detection and add an implementation that wraps the MicroWakeWord implementation to prepare for MicroWakeWord to be extracted to a separate module independent of the ESPHome specific interfaces
  • Add stubs and tests for VoiceInput

… word detection and improve separation of Android specific implementations

- Simplify VoiceInput, pass Microphone and WakeWord dependencies in constructor and refactor to use a callbackFlow to allow checking for isActive in the audio processing loop to avoid needing to explicitly yield to check for cancellation
- Add a WakeWord interface for abstracting wake word detection and add an implementation that wraps the MicroWakeWord implementation to prepare for MicroWakeWord to be extracted to a separate module independent of the ESPHome specific interfaces
- Add stubs and tests for VoiceInput
@brownard brownard merged commit a95f041 into master Apr 25, 2026
1 check passed
@brownard brownard deleted the Refactor_audio_input_interfaces branch April 25, 2026 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant