Comments (7)
from chatterpi.
from chatterpi.
from chatterpi.
from chatterpi.
OK, this one will be a tough one. There's no doubt that ChatterPi really pushes a Pi to its limits. The issue is clearly related to taking too long in the audiopy callback function that determines the jaw movements, but I have not found a way to make that run any faster. Any suggestions for further optimizing that code welcomed.
Try increasing the BUFFER_SIZE parameter to 16384. In the past, this seemed, in my setup, to elliminate the problem on the Pi4.
Changing the CPU governor to performance mode may also help, but it wasn't sufficient by itself. The downside of a larger buffer size is that it introduces delay in the output.
Hope this helps! I started a separate issue regarding the image file not working.
from chatterpi.
I'm testing a fix for the buffer underrun problem. Rather than calling the heavy duty math processing for determining jaw movements at the same rate that chunks are fed to produce audio, only calling for it 50x per second. So far, this seems to be keeping buffer underruns away, at least on my Pi 4. This can probably be made less frequent if there's still a problem on slower machines like the Pi Zero, but dropping it to only 10x per second had a visibly detrimental effect on jaw movement.
from chatterpi.
Ran repeatedly. Sometimes the audio cut out while the jaw kept moving properly, but that seems to be a different problem. Did not see a single "buffer underrun" error. Fixed code uploaded. Declaring this bug fixed. If anyone sees buffer underrun problems with this new code, please start a new issue.
from chatterpi.
Related Issues (19)
- Could I use and i2c servo controller? HOT 1
- Issues when running main.py HOT 4
- Unable to get Chatterpi to Use Microphone - Stops execution HOT 7
- ALSA buffer underruns on some models of Raspberry Pi HOT 18
- Error in control.py causes ChatterPi to not function in one mode. HOT 1
- GUI + Boot On Startup Not Working HOT 37
- Invalid configuration not caught HOT 1
- PIR issue and cannot run on startup HOT 21
- New Feature: upload the .img file for easier installation and use. HOT 1
- Wont start at boot? HOT 3
- Audio playback stops intermittently HOT 6
- Kill PID vs. .py script HOT 2
- Error when Setting playback to LEFT channel only HOT 3
- Image file not working HOT 2
- Variables "now" and "data" not defined in mic callback which throws an error during runtime HOT 4
- No Manual Found on Github HOT 3
- My skull is open at the end HOT 11
- Auto start not working? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chatterpi.