-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ogg files arent played on Ubuntu 16.04 but on RaspberryPi with Jessie #46
Comments
The |
https://github.com/LocutusOfPenguin/picochess/blob/pt-sd/talker/picotalker.py or more general here: BTW...i need to say "blocking=True" otherwise i get a "segmentation fault" but thats maybe the closed task issue (dont care that now) ... I need to release a new picochess version, and strangely the both ways are cross working in one OS (alone!). |
So you are using the You are supposed to use either BTW, in the abovementioned sd.play(data, fs)
status = sd.get_status() This does not wait and will prematurely check the status! Probably the status of the previous call to sd.play(data, fs)
status = sd.wait()
if status:
# do something Alternatively, you can do that: sd.play(data, fs, blocking=True)
status = sd.get_status() |
Sorry? How to plot the waveform? .wait() => yes, i saw the closed issue ....this is run in thread anyway...so, i don't care too much , its blocking or not. That's more a problem to shorten the voice files to the absolute minimum, ha. But thx, for the updated code for "blocking=False" ...Perhaps y should also move that inside yr play_file example :-) |
There are many ways to plot. Do you have If yes, you can try this: import matplotlib.pyplot as plt
plt.plot(data) # where "data" is your audio data from the file
plt.show() If you don't have a screen, you can save the plot to a file instead of calling plt.savefig('my_plot.png') Note that #1 is not closed, it's still waiting for a fix!
You probably should care, since if your thread stops before playback is finished, you might run into the same problem. My example play_file.py already uses the second alternative of what I told you before: sd.play(data, fs, device=args.device, blocking=True)
status = sd.get_status()
if status:
logging.warning(str(status)) |
(A) (C) |
I tried another ubuntu 16.04 computer in meantime. And here its working :-( ...For the moment i dont know what is going on. Let me try again (@home) with this problem ubuntu. But both are always up-to-date. Sowas macht mich noch wahnsinnig, ha. For (A) up to you...i would suggest do both ways in each one file, or use a commented section for the other way (prefered)...or just let it be as it is(!) Its not sooo important (esp i know now, how to do it the other way). |
OK, then I'm looking forward to getting further results ... (A) The use case for |
OK, im at home (with the troublesome ubuntu).. I also tried several ways to uninstall this & that, with apt-get & pip3 ...install this & that ...but nothing helped. |
OK, the plots look fine, so the problem seems to occur during playback ... Was there a warning printed on the console output? You should try changing a few settings, e.g. |
i changed some "sd.default.*" blocksize, latency values (no idea what blocksize should be)...but no effect. Nevertheless when i run "sd.py" i get WARNING:root:output underflow Perhaps i should change the output from sd.play() to something else for example like in #25 but i admit i don't understand yr comment from 12.May. |
Those warnings are important, you should actually check for them after each invocation of Try setting If that still doesn't get rid of the warnings, you can try reducing the |
ogginfo 1.ogg (ähnliche Werte bei anderen ogg Files) Datei »1.ogg« wird verarbeitet... Nominale Bitrate: 128,000000 kbit/s |
saying sd.default.blocksize = 2048 seems to work! |
Good to know that it works with a Does the background noise only appear when using a Python script, or also when playing sounds with other applications (e.g. mplayer, vlc, aplay)? |
i get another problem (after i released it)..already 2 people saying this: |
@LocutusOfPenguin Is your original problem solved? If yes, please close this issue. If you have further issues, please open new issues. |
Hi, |
Hi,
i have a strange problem, but i cant see how to come closer to the cause.
I use two (software) systems: yours and pydub see: https://github.com/jiaaro/pydub
And i have two hardware systems: one is Ubuntu 16.04 and the other a Jessie for RaspPi(3).
If i let sounddevice play a ogg fiel on Rasp, it works. But it fails on ubuntu (i hear noise).
If i do the same with pydub no problem with Ubuntu and on RaspPi , its in worse quality (not useful, but i can guess the voice file - whereas on first, its just noise).
Jürgen
The text was updated successfully, but these errors were encountered: