Skip to content

app_bricks/audio-classification: use the brick without init a microphone#24

Merged
stefanotorneo merged 15 commits intoarduino:release-1.0from
stefanotorneo:audio-classification-with-no-mic
Dec 1, 2025
Merged

app_bricks/audio-classification: use the brick without init a microphone#24
stefanotorneo merged 15 commits intoarduino:release-1.0from
stefanotorneo:audio-classification-with-no-mic

Conversation

@stefanotorneo
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 4 times, most recently from 52fda64 to ee3c07d Compare November 21, 2025 17:34
@stefanotorneo stefanotorneo changed the title app_bricks/audio-classification: allow to disable the microphone initialization app_bricks/audio-classification: use the class without init a microphone Nov 26, 2025
@stefanotorneo stefanotorneo changed the title app_bricks/audio-classification: use the class without init a microphone app_bricks/audio-classification: allow to use it without init a microphone Nov 26, 2025
@stefanotorneo stefanotorneo changed the base branch from main to release-1.0 November 27, 2025 10:31
@stefanotorneo stefanotorneo force-pushed the audio-classification-with-no-mic branch from 7b2c271 to 8ea3317 Compare November 27, 2025 10:34
@stefanotorneo stefanotorneo force-pushed the audio-classification-with-no-mic branch from 8ea3317 to 3940bce Compare November 27, 2025 10:35
@stefanotorneo stefanotorneo marked this pull request as ready for review November 27, 2025 11:27
@stefanotorneo stefanotorneo changed the title app_bricks/audio-classification: allow to use it without init a microphone app_bricks/audio-classification: use the brick without init a microphone Nov 27, 2025
Comment thread src/arduino/app_bricks/motion_detection/__init__.py
@stefanotorneo stefanotorneo merged commit f941466 into arduino:release-1.0 Dec 1, 2025
2 checks passed
@stefanotorneo stefanotorneo deleted the audio-classification-with-no-mic branch December 1, 2025 08:10
rjtokenring added a commit that referenced this pull request Dec 2, 2025
* [app_bricks] Add WaveGenerator brick (#15)

* add external Speaker instance handling

* fix mixer selection in Speaker

* improve volume handling in WaveGenerator and add logging

* add external Speaker instance handling

* fix mixer selection in Speaker

* Enable `cloud_llm` brick (#26)

* Update Cloud LLM brick docs (#27)

* Fix audio clipping and add low-latency WaveGenerator configuration (#30)

* app_bricks/audio-classification: use the brick without init a microphone (#24)

* Fix bricks name model list (#33)

---------

Co-authored-by: Dario Sammaruga <48221340+BeanRepo@users.noreply.github.com>
Co-authored-by: Dario Sammaruga <d.sammaruga@ext.arduino.cc>
Co-authored-by: Stefano Torneo <s.torneo@arduino.cc>
Co-authored-by: Stefano Torneo <121802192+stefanotorneo@users.noreply.github.com>
Co-authored-by: Ernesto Voltaggio <92443068+91volt@users.noreply.github.com>
beanrepo added a commit to beanrepo/app-bricks-py that referenced this pull request Dec 11, 2025
* [app_bricks] Add WaveGenerator brick (arduino#15)

* add external Speaker instance handling

* fix mixer selection in Speaker

* improve volume handling in WaveGenerator and add logging

* add external Speaker instance handling

* fix mixer selection in Speaker

* Enable `cloud_llm` brick (arduino#26)

* Update Cloud LLM brick docs (arduino#27)

* Fix audio clipping and add low-latency WaveGenerator configuration (arduino#30)

* app_bricks/audio-classification: use the brick without init a microphone (arduino#24)

* Fix bricks name model list (arduino#33)

---------

Co-authored-by: Dario Sammaruga <48221340+BeanRepo@users.noreply.github.com>
Co-authored-by: Dario Sammaruga <d.sammaruga@ext.arduino.cc>
Co-authored-by: Stefano Torneo <s.torneo@arduino.cc>
Co-authored-by: Stefano Torneo <121802192+stefanotorneo@users.noreply.github.com>
Co-authored-by: Ernesto Voltaggio <92443068+91volt@users.noreply.github.com>
beanrepo added a commit to beanrepo/app-bricks-py that referenced this pull request Jan 20, 2026
* Replace SineGenerator with WaveGenerator Brick in Theremin (arduino#8)

* Mascot Jump Game Example Addition (arduino#7)

* Add Bedtime story teller example (arduino#15)

* Mascot Jump Game Update UI (arduino#17)

* Add Object Hunting example documentation (arduino#18)

* Update Theremin Simulator example documentation (arduino#16)

* Add led-matrix-painter (arduino#5)

* Docs: update bedtime story teller (arduino#20)

* Fan vibration monitoring UI (arduino#19)

* Vibration Anomaly Detection Example Documentation (arduino#22)

* Led matrix UI improvement (arduino#24)

* Docs led matrix painter (arduino#26)

---------

Co-authored-by: Dario Sammaruga <48221340+BeanRepo@users.noreply.github.com>
Co-authored-by: Dario Sammaruga <d.sammaruga@ext.arduino.cc>
Co-authored-by: TaddyHC <94547080+TaddyHC@users.noreply.github.com>
Co-authored-by: Stefano Torneo <s.torneo@arduino.cc>
Co-authored-by: Matteo Marsala <matteo.marsala92@gmail.com>
Co-authored-by: Ernesto Voltaggio <92443068+91volt@users.noreply.github.com>
Co-authored-by: Christopher Méndez <49886387+mcmchris@users.noreply.github.com>
Co-authored-by: Stefano Torneo <121802192+stefanotorneo@users.noreply.github.com>
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.

3 participants