Help with Audio Recording on CyberPi for mBot2


#1

Hey everyone,

I recently purchased an mBot2 for my son, assuming it would support audio recording and transmission. However, upon reviewing the documentation, I’ve realized there’s a lack of information on these capabilities.

My goal was to use the CyberPi for capturing audio, sending it to a Raspberry Pi for processing, and then using the response for TTS output on the mBot.

There seems to be no clear documentation on audio file storage or transmission using CyberPi’s Python APIs.

Can anyone provide insights or share experiences related to audio handling with the CyberPi? Any advice or resources would be greatly appreciated, as I hoped to use this feature as a key part of the mBot’s functionality.

Thanks,
Rolan


#2

Sorry, mBot 2 doesn’t support that type of functionality. @Rolan


#3

Hey,

Thanks for the info! Looks like I’ll be tweaking the plan a bit – going to rig up the Raspberry Pi with a mic and speaker and hook it onto the mBot2.

Cheers,
Rolan


#4

Great! Let me know how it turns out!


#5

Hey,

Just wanted to share something I found about the CyberPi’s network capabilities that might be relevant to our discussions here. It turns out the CyberPi can work in both STA and AP modes. This got me thinking about a workaround for the audio issue with the mBot2.

cyberpi-api/network-api

I’m planning to set up the Raspberry Pi as an access point and then connect the CyberPi in STA mode. The idea is to use this setup for capturing audio on the CyberPi and then sending it to the Raspberry Pi for processing.

I’ll be using the network APIs to establish a TCP/IP connection between the two. I’m not sure how it’ll turn out, but it seems like a promising solution to the audio handling limitations on the mBot2. I’ll test it out and let you know how it works.


#6

Great! Thanks for that link, too! Mention me as @Best_codes and let me know how it all turns out or if you need help with anything else! @Rolan


#7

Hello, iv’e register alls secrets that cyberpi is hiding from us in my Mblock discord, if you want to check or share what you discover or even need help im there : https://discord.gg/VZjVxGs6wT . I hope it will become more active


#8

I checked it out. :slight_smile:


#9

Hi Best_codes, do you remember when i said i’ve ran into an error with the cyberpi with an hide & seek game? You take a look at the code and wander why i put relanch cyberpi and screen render for nothing. And that’s because i’m now used to program in python so what you see in the bloc editor is just to take the python equivalent of a bloc when i need to. Also, i figured out that this : import gc and gc.collect() delete trash made by python so i just do while True:gc.collect() #gc_for_garbage .
Also did you know that with the cyberpi, you could store files, get all the wifi not far from you, get the mblock gamepad statut (connected or not) and display an 128*128 images (download 5 secs, showing it 2 mins lmao) and so more thing, also i’ve seen that you recommanded to someone to use upload broadcast but i found that the network extension can make the cyberpi as a wifi box and then, you can connect the pc to the cyberpi, open a server at port ex:5050 and then send really big data (like audio in less than 1ms XD) i’ve post everything on my discord but i think you cannot see it last time because of the wrong settings that i’ve made during the configuration of the server, feel free whenever you want and have time if you can now see everything in cyberpi/mblock secrets-python. You can use my code if you want :smiley: Have a nice day !


#10

@Idaill Very cool! I don’t need it right now, but I am building an mBlock Wiki and if I ever do need it I will be sure to check it out. :slight_smile: