Hello, I try to make MMM-Alexa work (I don’t have a button, so I use another module to send the start recording notification for now).
But I got an exeption
Uncaught (in promise) Error: No Media Stream connected. :8080/modules/MMM-alexa//alexaRunner.babel.js:527
at Promise (:8080/modules/MMM-alexa//alexaRunner.babel.js:527)
at AVS.startRecording (:8080/modules/MMM-alexa//alexaRunner.babel.js:525)
at alexaRunner.notificationReceived (:8080/modules/MMM-alexa//alexaRunner.babel.js:4326)
at Class.notificationReceived (:8080/modules/MMM-alexa//MMM-alexa.js:59)
at sendNotification (main.js:87)
at Object.sendNotification (main.js:454)
at Class.sendNotification (module.js:301)
at Class.notificationReceived (:8080/modules/shemur//shemur.js:43)
at sendNotification (main.js:87)
at Object.sendNotification (main.js:454)
TypeError: Cannot read property 'byteLength' of undefined alexaRunner.babel.js:4468
at Promise (alexaRunner.babel.js:670)
at AVS.sendAudio (alexaRunner.babel.js:601)
at alexaRunner.avs.stopRecording.then.dataView (alexaRunner.babel.js:4435)
The color of the square is red.
I receive the following notification in that Order :
ALL_MODULES_STARTED
DOM_OBJECTS_CREATED
ALEXA_CREATED
ALEXA_TOKEN_SET (When I receive this one I send the ALEXA_START_RECORDING notification)
ALEXA_VAD_VOICE_DETECTION_START
ALEXA_VAD_VOICE_DETECTION_STOP (I receive this one immediatly after the start one)
ALEXA_RECORD_STOP
ALEXA_STOP_RECORDING
If I don’t send the alexa start recording notification, I have no exception so It must be related to the recording right ? I do have a mic and I can record a sound with arecord and play that sound with aplay or play in my terminal.
So why is the vad voice detection stoping immediatly ? why do I receive the “No media stream connected” exception ? Is the module dosn’t detect my mic ?
How can I solve this?
Little update: If I send the notification again (with about 30 second spacing) I am able to have an answer from Alexa.if I speak quickly enough at the moment the notification is send. So… I’m guessing the first time is for initialization and after that it’s ok to talk. Still not sure why I got exception but I guess it’s fine…
I need to find a way to trigger it with a wake up world now.
Also, Is there a way to see when it’s ok to talk ? (kinda like the MMM-AlexaPi module that show you the mic status and a little symbole that show Alexa is processing your request)