Current version of the OpenAuto Pro is 7.0
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound outside of OAP
#1
I built a voice assistant and chatbot to install as one of my applications.  However when I run it...it doesn't seem to want to use the microphone or speakers.  When it goes to play the opening mp3 it says....

Can't find a suitable libao driver. (Is device in use?)

microphone section has a similar issue.

I don't want to screw up the sound in OAP as I had to wrestle with that awhile ago. Kodi audio works fine.  Other applications I launch seem to be ok.  Any tips on next steps to try?
Reply
#2
Please check whether your application uses PulseAudio as an audio backend. If it outputs error like "device already in use" most probably it uses ALSA under the hood that does not support simultaneous usage of the audio devices by different applications.

On the other hand, libao might be compiled without support of the PulseAudio API - then you have to recompile it by yourself with PulseAudio API support or switch to another audio library.

https://www.xiph.org/ao/doc/ao_driver_id.html
https://www.xiph.org/ao/doc/drivers.html
https://www.xiph.org/ao/doc/ao_open_live.html
Reply
#3
(03-03-2020, 08:13 AM)BlueWave Wrote: Please check whether your application uses PulseAudio as an audio backend. If it outputs error like "device already in use" most probably it uses ALSA under the hood that does not support simultaneous usage of the audio devices by different applications.

On the other hand, libao might be compiled without support of the PulseAudio API - then you have to recompile it by yourself with PulseAudio API support or switch to another audio library.

https://www.xiph.org/ao/doc/ao_driver_id.html
https://www.xiph.org/ao/doc/drivers.html
https://www.xiph.org/ao/doc/ao_open_live.html
I'm using a subprocess call to mpg321.  So yes. It uses alsa.

Do you know of another mp3 program (and recording) that uses pulse? I'm planning to try vlc, ffplay and paplay.
Reply
#4
The esiest way would be to use cvlc.
Reply
#5
(03-03-2020, 11:45 AM)BlueWave Wrote: The esiest way would be to use cvlc.
What about on the input/recording side?  Right now I'm using arecord.

subprocess.call(['arecord --device=plughw:1,0 -d 6 -f cd -t wav rec.wav'], shell=True)
Reply
#6
no suggestions?
Reply
#7
(03-03-2020, 11:37 PM)jvteam Wrote: no suggestions?
Ummm... did you try using arecord?

subprocess.call(['arecord --device=pulse -d 6 -f cd -t wav rec.wav'], shell=True)
Reply
#8
(03-04-2020, 12:07 AM)ktb Wrote:
(03-03-2020, 11:37 PM)jvteam Wrote: no suggestions?
Ummm... did you try using arecord?

subprocess.call(['arecord --device=pulse -d 6 -f cd -t wav rec.wav'], shell=True)
PERFECT!  Thanks.


GPT-2 chatbot now works!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)