Has anything changed with Cyberon voice recognition?
I used it a few months ago and it worked flawlessly on my RP2040 connect nano.
Recently, I bought 2 new RP2040Connect Nanos and I can't get it to work on either of them. It goes into Trigger State ( I change the led color there), but I can't seem to get it to go into command stage. Maybe the microphone is broken, but I did try it on 2 different RP2040 connects and it didn't work on either. I followed the exact same procedure from months ago and I used the same wake up and command words.
I don't see any updates to the RP2040 Connect DSpotter library.
I understand you're facing issues with the RP2040 Connect Nanos and the DSpotter library, and you suspect that the microphone might be the problem. Since you've tried it on two different RP2040 Connect Nanos with the same issue, it's a bit perplexing. Here are some steps to troubleshoot:
Check the Hardware: Ensure that the microphone is properly connected and functioning. You can try using a different microphone to see if the issue persists.
Library and Firmware Compatibility: Confirm that you are using the correct version of the DSpotter library that is compatible with your RP2040 Connect Nano firmware. Sometimes, updates to the firmware may require corresponding updates to libraries.
Serial Debugging: Use serial debugging to print out information at different stages of your code. This can help you identify where the problem is occurring. Print debug information when entering the trigger state and the command stage to see if the code is progressing as expected.
Power Supply: Ensure that your RP2040 Connect Nanos are getting a stable power supply. Insufficient power can sometimes cause issues with peripherals like microphones.
Reset or Re-flash: Try resetting the RP2040 Connect Nano to its default state and re-flash the firmware. Sometimes, issues can be resolved by starting fresh.
Community Support: If you can't find a solution on your own, consider reaching out to the RP2040 community or the manufacturer's support forums. They may have encountered similar issues and can provide guidance.
Remember to back up any important data or code before resetting or re-flashing the device. Troubleshooting hardware and firmware issues can be a bit tricky, but with persistence and methodical testing, you should be able to identify and resolve the problem. Hope this will help you.
Regards,
<Some spammer copy/pasting a ChatGPT answer>
I've had the same problem it appears. I was able to get the microphone to work with a microphone test sketch from tutorial "Reading Microphone Data on Nano RP2040 Connect" (https://docs.arduino.cc/tutorials/nano-rp2040-connect/rp2040-microphone-basics?queryID=85b26a1051622a19e371121499db8d8e) by changing the PDM frequency to 20000. I don't see a way to change this in the Cyberon Voice Recognition SW since it is precompiled. In fact an Arduino support tech agreed this is not possible. Seems like there should be a way though. I tried changing the library variable to turn off precompile but then got lots of src compile errors. Gene Sanford
The main reason for this situation is that the RP2040 on some boards is using a 20kHz sound, and we are not sure why the same development board would have two different PDM sound frequencies.
In the 1.1.0 library update, we added a software down-sample function to handle these 20kHz sounds and reduce them to a mono, 16kHz sample rate that the model can recognize.
Please try the 1.1.0 library.
If the issue still persists, please feel free to contact us at any time, and we will be happy to assist.
Thanks. Yes when I updated to library 1.1.0 my RP2040 began to work.
I have another question. It's about the RP2040 serial #. Your web site explains how to get
the serial # you use here: https://tool.cyberon.com.tw/ArduinoDSpotterAuth/DocHowToGetBoardSerialNumber.php
My RP2040 got messed up when I attempted a firmware update using the tool provided by
Arduino in the IDE. That tool is under the IDE menu. It is called Tool Updater. Anyway, when
I executed the update the serial number changed. It went from 01239AC534CFA0D0EE3494542755E4 to
01239AC534CFA0D0EE000000000000. The RP2040 runs most other sketches normally
in spite of the serial number change.
The reason I was attempting the update was that I was trying to get the time and date via NIST
(the US government site) via the internet through my router with either Wifi or Ethernet and that
was causing your Voice Recognition software to malfunction. I’ve asked standard Arduino support
about the serial number change but they have no answer. I also asked RaspberrPi, since the RP2040
processors is theirs. They also were unable to enlighten me on the problem. So, I’m wondering if you
would know anything about this. This make my RP2040 of no use running your Cyberon Voice Recognition
since your SW reports the serial number if invalid.
Searching for how to access the serial number using google or going to the forums yields nothing.
There seems to be a bit of confusion online about RP2040 serial numbers. There is a way to get a Serial
ID from the RP2040 but it does not return the number you are get with the GetSerialNumber.ino sketch.
The library ArduinoUniqueIDSerialUSB.ino reports this # for my RP2040: UniqueID: 50 34 C6 06 42 5D 89 18.
As you can see this is entirely different than the # your GetSerialNumber.ino reports. There is also a serial #
reported in the IDE under the command Get Board Info. That reports a different #: 06C6345018895D42.
Early on I was trying to use this number to get a license. Marcelo at Arduino told me to be sure to use your
GetSerialNumber.ino sketch.
I’m now using the Arduino Portenta H7 Lite with Vision Shield for my Voice Recognition
project. This is because of the above serial # problem with my RP2040.
I’m wondering what advice you can give regarding running your Voice Recognition software
while controlling a motor controlled device. The problem I run into is the usual interference
between this additional control software your Voice Recognition. If I put much code in either
the call back for the loop I get Lost Record Errors. Since the H7 has multiple processors on
board, I’m thinking my motor control SW could run on one you are not using. It’s not clear
to me how your Voice Recognition system is running on these firmware devices. You
provide information on how to run the software and that seems to be working, but nothing
as to the details of how you designed the SW to run on these multi-processor boards.
I'm pleased to hear that this resolves your issue.
Since the Serial Number obtained through the interface is not unique in Arduino DB,
We are told to generate UniqueID by combining the serial numbers of two components,
One of them is MAC Address. In your case, your situation is that the MAC Address field is cleared after updating the wifi firmware. This requires you to reset the MAC set of E4:55:27:54:94:34 into the firmware. GetSerialNumber.ino will obtain the serial numbers of the two aforementioned components and combine them into a UniqueID to return. Our GetLicense webpage will compare this UniqueID with the information in the Arduino DB.
The algorithm is completely executed in one of the cores, the same goes for the callback field.
For your control program, this extends to two approaches: 1. You don’t mind losing audio data when controlling the device (since speech recognition is usually not needed at this time), then you can comment out the print message of Lost Record Frame and ignore it. 2. You don’t want to lose any audio data, then you need to put the code that calls multi-thread or calls another core operation control program into the callback field.
Thanks for the feedback. I have two more questions:
I can’t seem to run the VoiceRecognition.ino sketch when the H7 Lite USB port is disconnected from the Arduino IDE.
Could this be because your software requires connecting through that USB programming port to validate the license? That
seems a bit backwards, though the code does write to the Serial Monitor via the USB port. That’s where it reports a license
problem and displays the various cmd info.
To achieve this I just connect the H7 Lite USB port to a power source. Of course, eventually I’d likely power the H7 via a
battery.
This call in setup():
Regarding your suggestion # 3. The commands I’m using are actually generating the commands to cause a motor
to do the following: spin forward, reverse, and stop. So the suggestion #2 the callback you suggest is this?
// Callback function for VR engine
void VRCallback(int nFlag, int nID, int nScore, int nSG, int nEnergy)
{
If so that is where my code is now.
In the example we provide, Serial output is the default setting. If Serial activation fails, it will enter a while loop, causing the entire system to hang. You can resolve this issue by commenting out the Serial-related code in the example sketch.
Yes, that's the callback function we mentioned. This callback will assign to the speech recognition engine and will run in the main thread. You can wrap the multi-thread code and put them to the callback to perform on the other processor or just comment out the Lost Record Errors. The "Lost Record Error" warns that some voice data was not be able to process in real time and may be discarded. If you need your device to continue recognizing, for example, "spinning forward" while also recognizing the next command, it is advisable to use a multi-threading approach. If it's acceptable to wait while executing the "spin forward" before recognizing the next command, then it's possible to discard some voice data without any issues.
Thanks, the updated library worked. There seems to be one change though,
when I say the wake up trigger word and go into command stage, I only have about 4 seconds to say a command word before it reverts back to waiting mode. Is there any way to increase this wait time?
There is a defined value that controls this timeout duration.
You can find and modify it in line 10 of the DSpotterSDK_MakerHL.h file in the library's src folder: