Translated the recipes to english - will add more later
Fixed a critical issue with initializing and importing different python files, now main.pyhas the real control of initialization thanks to a listener.init_listener() function.
Added a speak(['Ingredients']) in main.py so Tiny_Jarvis will speak the ingredients of the chosen recipe out loud
Switched from hardcoding random.randint(0,33) to random.choice(list) way simpler and easier to read, and created a format_cooking_sentence(recipe_object) function so that main.py doesn’t have to manage that, way better
Future changes I might implement: apparently Raspberry Pi OS manages audio through the Advanced Linux Sound Architecture (ALSA) which is responsible for the hardware drivers, the audio routing and control, and the low-level utilities such as the commands I often use, such as alsamixer, aplay and arecord
So when two python libraries that need to either record audio or output audio call ALSA to do so, it can lead to conflicts.
In this case, sounddevice and pyaudio which are both wrappers of the C library PortAudio. So a future change would be only using sounddevice for example, or vice versa.
This has another hidden advantage: removing a possibly finnicky dependency and making the whole process smoother, since compiling C on a Raspberry Pi can be difficult at times.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.