Can not get output through the speaker
-
Hi,
First of all, @bugsounet congratulations for your work.
I am writing because I am using GA in my Magic Mirror. Everything works fine, but I do not manage to make the assistant speak. If I set the field “useAudioOutput: true”, then once I call the assistant and ask a question, it answers (text format), but keeps displaying the answer and does not detect the hotword again. It stays in a state in which it seems to be waiting to produce sound through the speaker, but unable to do so. if I set it to false, then everything works fine but I do not get the output through the speaker ( it detects the hotword every time I call and answer every question I make, but only text-format answers).
Here you have the section of the config file that concerns this problem:
modules: [
{
module: ‘MMM-Snowboy’,
configDeepMerge: true,
config: {
autoStart: true,
micConfig: {
recorder: “arecord”,
device: “plughw:1,0”,
audioGain: 2.0,
applyFrontend: true,
}
},
detectors: [
{
Model: “alexa”,
Sensitivity: null,
onDetected: {
notification: “ALEXA_ACTIVATE”,
parameters: null
}
},
{
Model: “jarvis”,
Sensitivity: null,
onDetected: {
notification: “GA_ACTIVATE”,
parameters: null
}
}
]
},
{
module: “MMM-GoogleAssistant”,
position: “top_left”,
configDeepMerge: true,
debug:true,
config: {
assistantConfig: {
lang: “es-ES”,
latitude: 40.416775,
longitude: -3.703790,
},
micConfig: {
recorder: “arecord”,
device: “plughw:1,0”
},
responseConfig: {
useFullscreen: false,
useResponseOutput: true,
responseOutputCSS: “response_output.css”,
screenOutputTimer: 4000,
activateDelay: 100,
useAudioOutput: true,
useChime: false,
confirmationChime: false,
useInformations: true
},
Extented:{
volume: {
useVolume: false,
volumePreset: “ALSA”,//“PULSE”,
myScript: null //"amixer sset -c 2 -D 0 -M ‘PCM’ 100% "
}},
snowboy:{
useSnowboy: false
}
}
},
{
module: “alert”,
},
{
module: “updatenotification”,
position: “top_bar”
},
{
module: “clock”,
position: “top_left”
},
{
module: “calendar”,
//header: “US Holidays”,
header: “DÃas Festivos”,
position: “top_left”,
config: {
calendars: [
{
symbol: “calendar-check”,
//url: “webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics” }
url: “webcal://www.calendarlabs.com/ical-calendar/ics/spain”}
]
}
},I am using both, a usb mic and usb speaker. Moreover, I have already set the audio output to usb using “raspi-config” (in fact, when I use the command “aplay out.wav”, I can listen to what is recorded in this file).
-
sorry to say this but… do you really read wiki parts ?
to many mismake in your configs -
@bugsounet sorry for disturbing. Could you tell me which parts have errors? The ones concerning the GA module or Snowboy?
On the other hand, is there a way to watch a recorded version of the life session you made explaining how to do the config?
Thank you again for your help and sorry for any inconvenience. -
-
Hi,
@Raf , thank you very much for providing the link. Very interesting video.@bugsounet I have corrected some errors in my config file, but I still get no audio output. I get the following log (I do not include everything as it is quiet large):
[26.06.2021 17:59.24.429] [LOG] [GA] ASSISTANT_RESULT {
error: { error: null, message: null, audio: false },
action: { requestId: ‘60d8c563-0000-2780-9c1f-582429be0690’ },
text: null,
screen: { (…)
audio: {
path: ‘/home/pi/MagicMirror/modules/MMM-GoogleAssistant/tmp/lastResponse.mp3’,
uri: ‘tmp/lastResponse.mp3’
},
transcription: { transcription: ‘qué hora es’, done: true },
continue: false,
volume: null,
lastQuery: {
type: ‘MIC’,
key: null,
lang: ‘es-ES’,
useResponseOutput: true,
useAudioOutput: true,
status: ‘standby’,
chime: true
}
}Regarding this part:
audio: {
path: ‘/home/pi/MagicMirror/modules/MMM-GoogleAssistant/tmp/lastResponse.mp3’,
uri: ‘tmp/lastResponse.mp3’
},If I access this directory and execute:
mpg321 lastResponse.mp3
I get the correct answer via my speakers…So I do not know what else could be wrong…Should I pay attention to a concrete part of the config file?
Sorry for making so many questions. You are making an amazing work!
-
I am running the magic mirror from a remote set-up, using putty and Xming. I just realized that if I open a youtube video in the browser (firefox) y get no audio. So this may be the problem. I will continue doing some research.
-
just define your audio output with the volume icon in the desktop of the Pi
-
I already did. I think that it is because of using a remote desktop. I have the same problem using VNC Viewer. I do not know if you have used your raspberry in headless mode or with a screen conected to it.
-
Hi! Problem solved! If I use an external monitor and not ssh to control the Raspberry the module works flawlessly! We can close this issue.