fossasia / susi_linux

Hardware for SUSI AI https://susi.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Music Server not pausing when processing another query

sansyrox opened this issue · comments

Describe the bug
Currently, as the music server occupies the pulseAudio server , SUSI process the second but is unable to speak as no output server is free.

To Reproduce
Steps to reproduce the behavior:

  1. Start the SUSI programme
  2. Say "SUSI, play Hall of Fame"
  3. While it's playing the music, say "SUSI, who created you?"
  4. See error

Expected behavior
To pause the music while processing a second query or stop the music player at that point and play it again from that position (if required).

Additional context
I'd like to take a look at it.

I think that yours hypothesis "no output server is free" is not correct, because a server is supposed to "serve many clients". PulseAudion in fact can serve many applications, which need to access sound card, at once (that is why PulseAudio was born).
So, the problem must be due to something else, not "no server is free".

[<susi_python.models.AnswerAction object at 0x73954750>]
[<susi_python.models.AnswerAction object at 0x73954750>]
<susi_python.models.AnswerAction object at 0x73954750>
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to create IPC semaphore
sox FAIL formats: can't open output file `default': snd_pcm_open error: Permission denied
ERROR:main.states.busy_state:Got error: 

@hongquan , I was facing these issues in while trying to process another query while playing a song , however I was able to fix this when I used "sudo python3 -m main", do you know any reason why this might be happening?

I think some application tried to access sound card directly, bypassing PulseAudio. Because that application is run under normal user (non-root), it has no permission to do so (and sudo gave it root permission to do).
Normally, application should goes through PulseAudio, which acts as "sound server". We need to debug to find out, which application in the case, and why it didn't go through PulseAudio.