Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3642 Visualizzazioni

One of my Python script is responsible to output audio on the kitchen (server side).

I'm using pydub module and thanks to his flexibility is very easy to work with it. I really don't like pyglet.

Here's a sample code:

from pydub import AudioSegment
from pydub.playback import play

audio_path = '/home/effe/Voz/'
for word in kot:
play(AudioSegment.from_ogg(audio_path + word + '.ogg').pan(-1))

Used directly under python play fine, under Odoo doesn't output any sound and the log doesn't show any word about sound.  Since there is not verbose output like on stdout I can't track down the issue. 

I think odoo is trying to play on a virtual console not linked with any audio sink.  

What would be the correct approach to solve the problem? 

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mar 21
6823
3
lug 20
21202
2
gen 19
7278
1
dic 18
3181
1
lug 18
7572