I am relatively new to Raspberry pi and started with developing python projects through idle3. I built the Pidog and have been able to run the examples through a command window with commands like “sudo python3 9_howling.py”.
Now I am interested in modifying the code so I opened 9_howling.py in idle3 and ran it but a large number of exceptions occurred. Is there something I need to do?
When you run the example code using IDLE3, you may encounter errors.
You used sudo (administrator privileges) to execute the program in the command window (sudo python3 9_howling.py), while IDLE3 runs with standard user permissions by default. This could result in insufficient hardware access permissions (such as for motors and sensors), causing exceptions.
Therefore, we still recommend executing the code in the command window.
Thanks for clearing that up. I am running now through the command window.
I am now working through the TTS with espeak and getting an error
ModuleNotFoundError: No module named ‘pidog.tts’
Can you help me find pidog.tts?
Could you please confirm the following:
Were all the library codes installed correctly?
Did you encounter any error messages during the installation?
If you received any errors, please send us a screenshot. This will greatly help us analyze and resolve the issue for you.
We also recommend that you carefully follow the tutorial to reinstall all libraries before running the example code again.
Helpful Link:
Installation Guide: 5. Install All the Modules(Important) — SunFounder PiDog Kit 1.0 documentation
I re installed all of the modules per your instructions and it took several attempts till pidog.tts was installed. The forum provided some minor installation commands that seemed to work
TTS with Espeak and Pico2Wave problem - Robotic kit for Raspberry Pi - Sunfounder Forum
Now when I run any TTS or STT example I receive
Failed to open file: “/sys/class/drm/card1/device/vendor”
When I look for
arecord -l
No CAPTURE Hardware Devices are listed.
Also, when I run sudo python3 stt_vosk_stream.py
Which version of PiDog do you currently have? Please send a photo of the Robot HAT for us to confirm.
If it is a PiDog V1 product:
The USB microphone we provide needs to be plugged into the Raspberry Pi’s USB port. Then, run the command arecord -l to check if the USB microphone device can be detected.
If it is not recognized, try plugging the USB microphone into a different USB port on the Raspberry Pi, and run the arecord -l command again to check.
If it is a PiDog V2 product:
The Robot HAT has a built-in microphone.
I believe it is Version 2.
Your product is the PiDog V1 version.
The Robot HAT for PiDog V1 does not have a built-in onboard microphone, which is why the command did not detect any microphone device.
However, our PiDog V1 product does include a USB microphone. From the photos you provided, it appears that the USB microphone is not connected to the Raspberry Pi’s USB port.
We recommend that you locate the USB microphone in the product packaging and plug it into the Raspberry Pi’s USB port for recognition.
I found the USB mic in the box. I did not see any steps for installing during the assembly process!
arecord -l identifies
card 4: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
I run
arecord -D plughw:4,0 -f S16_LE -r 16000 -d 3 test.wav
and test.wav file is created. But when I run aplay test.wav no audio plays out.
I run alsamixer and select F6 then default: 4 USB PnP Sound Device
F3 [Playback] Audio Gain Control 00
F4 Mic varied level from 00 to 100 with multiple steps in between
Reboot the Raspberry Pi a couple of times.
Still no audio.
I can get audio when I run aplay angry.wav so it must be something with the Mic audio input.
After trying multiple times I noticed the mic was muted in the upper right corner of the window! When I unmute it then I could record mic audio although it was very low volume