Adafruit Micro Speech Demo using Mbed

Thread Starter

jhwang51

Joined Nov 23, 2019
1
Hello everyone,

Thanks for reading! My question is, how can I modify the Adafruit Micro Speech Demo to get it to work on an mbed dev board?
Adafruit Micro Speech Demo
Currently, I'm trying to run the Adafruit Micro Speech Demo on my Nucleo-F429ZI dev board, though it should really work on any Mbed enabled board. I modified arduino_audio_provider.cpp by removing Arduino functions and using Mbed os 5 functions instead. Unfortunately, it still doesn't work. Any hints as to how I can debug or go about this?

Here are the classes I used:
Serial - logging predictions
Ticker - setting sampling frequency
AnalogIn - ADC from microphone
EventQueue - avoid Mutex error
Thread - enable separate thread for constant audio sampling

Here's how I initialize the audio sampling:
float frequency = (float)1.0/ (float)16000.0;
eventThread.start(callback(&q, &EventQueue::dispatch_forever));
sampleAudioTicker.attach(q.event(&TIMER_CALLBACK), frequency);

In TIMER_CALLBACK, I use this:
sample = (int16_t)(micout2.read_u16());


Unfortunately, the speech recognition still does not work. Any help appreciated!

Thanks,
Jason
 

Attachments

Top