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