Hey Ken,
My 1st foal is a clock that will play sounds at each half hour for a portion of
the day. After that, I'm going to build a cable tester, a pressure gauge for
my compressor, etc. In summary, I need something that can play audio files
fast enough to be practical.
As I said in another note, my environment became a pile of junk after I was a
headless chicken trying all sorts of different ways to make Speakup work. In
the end, nothing was working... So I started fresh with Raspbian light &,
using Python, I used aplay & subprocess & the speed was quite acceptable. So
something I installed made it become VERRRRRRRRYYY SSSSSSSLLLLLLLLOOOOOOOWWWWWW.
I have now purchased an external USB sound card but I have not figured out how
to make it work yet with the Pi 3b.
Cheers,
Jean-Claude Provost
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Ken Perry
Sent: Thursday, March 25, 2021 8:43 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: I need speed, I need something that works, maybe I
need another distro?
It looks like you might not be doing things in the best of ways. Is it a
requirement that you use Omx? I worked on the Music player and web browser on
the old Braille plus mobile manager and Icon. It was running on a Linux box
with a 400 MHz processor and a lot less ram than we are dealing with on the PI.
I don't know if I have time tonight to write something but you might need to
look into gstream and creating your own python command line player if you
requirements are to do this with python you will probably want to be able to do
more than run things in sub processes. Your probably seeing lags in just
running up the subprocesses. You might have been better to put them in threads
in the same python as it stands a subprocess runs up a whole other interpreter
and that might be where some of the speed issues are coming in. If no one gets
to this before I do I will send you a scrip that plays a list of files. I
just have to do my project time sheet tonight and get my python s yllabus
ready for tomorrow. Before I right something though what exactly are you
trying to do? I mean if your just trying to use the PI as a media player and
don't need python that is one thing. If you want python so you can script
something about your media player that is another. Can you write up what your
goal is?
Ken
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Jean-Claude Provost
Sent: Thursday, March 25, 2021 4:58 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: I need speed, I need something that works, maybe I
need another distro?
Hi,
Let me put my Python code here
***start of code***
#!/usr/bin/env python3
import subprocess
subprocess.run(["omxplayer", "--no-osd", "-o", "local",
"/muset/audiotest/audiotest.wav", ">", "NULL"]) subprocess.run(["omxplayer",
"--no-osd", "-o", "local", "/muset/audiotest/3.wav", ">", "NULL"])
subprocess.run(["omxplayer", "--no-osd", "-o", "local",
"/muset/audiotest/6.wav", ">", "NULL"]) subprocess.run(["omxplayer",
"--no-osd", "-o", "local", "/muset/audiotest/star.wav", ">", "NULL"])
subprocess.run(["omxplayer", "--no-osd", "-o", "local",
"/muset/audiotest/d.wav", ">", "NULL"])
print("this is a tesht!")
***end of code***
Note that the "> NULL" at the end of each statement has no use. I could still
see OMX's output... Removing it made no change speedzise
This assumes you run on Python3 & that you have omxplayer installed.
Cheers,
Jean-Claude Provost
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Ken Perry
Sent: Thursday, March 25, 2021 3:45 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: I need speed, I need something that works, maybe I
need another distro?
Ok I missed the thread I guess. Give me an example of how you play two mp3's
one after the other. I am going to give this a shot this weekend.
ken
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Jean-Claude Provost
Sent: Thursday, March 25, 2021 3:27 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: I need speed, I need something that works, maybe I
need another distro?
Hey Ken,
Yeah! Thanks for that. Now I at least have pip3 installed.
By slow I meant, there's a good 2 seconds between the playing of each file...
It's not acceptable... It takes all the fluidity out of the thing...
I was successful in installing pygame but again, trying to incorporate this in
my Python3 test program, it comes back with an error saying it's unable to init
the mixer...
I'm beginning to think that I messed around so much without direction,
installing/trying a gazillion different audio combination that I might have
FUBARed this poor PI😊
I can envision all the audio drivers & config files in a wild party... You
know, the kind of party you don't quite remember who you mingled with😊
Anyways, the way I see this, I think I'll have to start over again, fresh from
scratch... where scratch is a reliable image.
Has anyone on this list been able to make Speakup talk normally through a PI
3B's 3.5 jack, using Raspbian Buster? & if so, would you be willing to share
your image?
I'm not much of a dead horse beater so if nobody has succeeded or if nobody is
willing to share their image, I'll move on to something else... It's a little
hard for me to believe I'm the only dumbdumb who can't make this work...
Cheers,
Jean-Claude Provost
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Ken Perry
Sent: Wednesday, March 24, 2021 1:41 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Re: I need speed, I need something that works, maybe I
need another distro?
You can install pip by doing
Sudo apt install python-pip
Or if your using python 3 its
Sudo apt install python3-pip
What do you mean its slow?
-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On
Behalf Of Jean-Claude Provost
Sent: Wednesday, March 24, 2021 1:03 PM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] I need speed, I need something that works, maybe I need
another distro?
Hi all,
I just spent quite a few hours to get my Pi3B to deliver decent audio at a
reasonable speed & it seems I just can’t.
for now, I have abandoned the idea to get a decent behavior out of speakup
because I wanted to do something different for a while… So I use SSH.
I wanted to play 4 small audio files in sequence but I run into issues, with
all the methods I’ve tried so far.
1. I tried omxplayer, invoking it through subprocess.run in a Python
program. It works perfectly audiowise through my 3.5†jack but it’s
unnaturally slow, even after putting an ampersand at the end of the line to
make it run in the background. I guess invoking subprocess several times in a
row is a bit CPU-intensive. I also was never able to suspend the output from
omxplayer even after trying to pipe it to NULL.
2. Then I tried to use the Python playsound module. Unfortunately it
seems I can’t install this module on my Buster Raspbian version. Pip cannot
be found & it seems it’s not a package I can install with apt either
3. .I than tried with amixer & aplay but here again, snags & other
snags… when I go in raspi-config’s audio output selection, the 3.5†jack
choice is there but when I select it, raspi-config says there was an error
writing to the config file & it reverts back to HDMI. Even trying to play on
HDMI reveals a choppy useless output.
4. Following the Python tutorial from Sparkfun, I then tried to use
pygame’s mixer. But here again, I find that the pygame module is not
installed &, as I said before, I can’t install it because pip cannot be
installed for some reason
All those tests were done using Python 3.7.3, the default installed with the
Raspbian version I have running.
I learned several things in that quest of mine but got nowhere😊 Shall I
find another hobby like knitting or something😊
Any musings are welcome but please, give me something that will get me out of
my misery… I’m open to pretty much everything right now😊
Thanks,
Cheers,
Jean-Claude Provost
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.
This list is not affiliated to the Raspberry Pi Foundation and the views and
attitudes expressed by the subscribers to this list do not reflect those of the
Foundation.
Mike Ray, list creator, January 2013