Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3631 มุมมอง

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? 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 21
6820
3
ก.ค. 20
21196
odoo/python invalidate_all() แก้ไขแล้ว
2
ม.ค. 19
7275
1
ธ.ค. 18
3178
1
ก.ค. 18
7569