MycroftAI / skill-audio-record

Mycroft AI official Audio Record Skill - record audio and play it back
https://mycroft.ai/skills
Apache License 2.0
7 stars 20 forks source link

speaking wake phrase during recording interrupts recording, as well as playback #39

Open ruzko opened 3 years ago

ruzko commented 3 years ago

Describe the bug Recording a message containing mycroft's wake phrase will wake mycroft when the recording is played. This could be a somewhat feature useful for recording macros of more complex tasks, but in its current form it is annoying.

To Reproduce Steps to reproduce the behavior:

  1. wake mycroft and start recording
  2. say a sentence containing "mycroft" or your set wake phrase
  3. Mycroft will wake once more, interrupting the recording and taking action according to what you say
  4. when the same recording is played back, mycroft wakes, speaks over the playback and takes action according to the recorded speech.

Expected behavior Mycroft doesn't wake a second time if its wake phrase is recorded. Or Mycroft does wake a second time if its wake phrase is recorded, but audio feedback from mycroft is limited.

Log files If possible, add log files from /var/log/mycroft/ to help explain your problem.

You may also include screenshots, however screenshots of log files are often difficult to read and parse.

If you are running Mycroft, the Support Skill helps to automate gathering this information. Simply say "Create a support ticket" and the Skill will put together a support package and email it to you.

Environment (please complete the following information):

Additional context Installed a few skills from the marketplace, otherwise a clean install of Mycroft

krisgesling commented 3 years ago

Thanks for the detailed bug report @ruzko

To be honest we haven't looked at this Skill in a very long time.

When you say it interrupts the recording - are you finding it stopping the recording, or you mean because it's unintentionally activated that this interrupted what you intended to have recorded?

The recording waking Mycroft is something we are looking at more broadly, though partly a low-level software limitation unfortunately. On the Mark II we can perform Accoustic Echo Cancellation that essentially removes the audio output from the audio input, thereby preventing the device from listening to itself instead of the people in the room. This is provided by a dedicated chip, not something we can do on every system.

An alternative is to prevent waking the device during playback, however this doesn't seem ideal as you then cannot stop the playback at any time. Eg

"record for 40 minutes" "playback the recording" "ok stop now"... continues playing for 40 minutes

There are other theoretical ways to detect if an audio signal is coming from a human vs a speaker but we haven't explored those yet.