Skip to content

Conversation

@stefanotorneo
Copy link
Contributor

@stefanotorneo stefanotorneo commented Nov 19, 2025

We need a way to disable microphone initialization when the user doesn't require it, but wants to classify an audio file.

@robgee86
Copy link
Contributor

I understand the need, but maybe we have some alternatives:

  • We could make the microphone really optional, None would mean "don't instantiate a default microphone". This would be a bit awkward with respect to other APIs that treat None as "instantiate a default microphone"...
  • We could make the classify from file feature a static function of the brick. I remember there are some dependencies on self that are required, probably related to EI. Can we find a workaround for that?

@stefanotorneo
Copy link
Contributor Author

stefanotorneo commented Nov 19, 2025

I understand the need, but maybe we have some alternatives:

  • We could make the microphone really optional, None would mean "don't instantiate a default microphone". This would be a bit awkward with respect to other APIs that treat None as "instantiate a default microphone"...
  • We could make the classify from file feature a static function of the brick. I remember there are some dependencies on self that are required, probably related to EI. Can we find a workaround for that?

I thought about this solution because it's easy, but I know, maybe it's not the nicest one.

  • None means the default microphone, NO_MIC means disabling it. We could define clearer values if you prefer.
  • Yes, I tried to remove the dependencies with EI, but it's not easy because we need to move some methods of other subclasses.

@stefanotorneo stefanotorneo force-pushed the audio-classification-with-no-mic branch 4 times, most recently from bd71cd2 to 2a81561 Compare November 20, 2025 11:02
@stefanotorneo stefanotorneo marked this pull request as draft November 20, 2025 11:05
@stefanotorneo stefanotorneo force-pushed the audio-classification-with-no-mic branch 3 times, most recently from dc96480 to 52fda64 Compare November 21, 2025 17:28
@stefanotorneo stefanotorneo force-pushed the audio-classification-with-no-mic branch from 52fda64 to ee3c07d Compare November 21, 2025 17:34
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.

2 participants