How to get Mycroft to wait for my whole request

I’m working on a skill to play video from various places and I have an intent that looks like this:

let's watch {title} (season {season} episode {episode}|)

If I speak really fast, this works, but if I talk like a normal human, “Hey Mycroft, let’s watch Star Trek Deep Space Nine Season 4 Episode 9” usually gets cut off just after “Season”. Is there a way I can tell Mycroft to listen longer, or a smarter way to do this in general?

Mycroft normally has a 10 second cut-off which is probably what you’re hitting here. In the upcoming release 20.2.2 (the change is already included in the dev branch) this cutoff is configurable

Use mycroft-config edit user

and add a section

  listener: {
    recording_timeout: 20
  } 

That should double the maximum recording time. For details see the PR here

Hope that is of some help for now, we might want to increase this globally since it uses the audio signal level to determine the end of recording as well. This is more of a safety for noisy situations where it’s hard to determine if the speech has ended using this method.

Unfortunately, this doesn’t work. I mean if you think about it, 10s is a long time. Just try saying Hey Mycroft, let’s watch Star Trek Deep Space Nine Season 4 Episode 9” and see if it could possibly take you more than 10s to say that… I changed the value to 20 and the result is the same.

Any other ideas?

Sorry I’m so slow to respond. My development time is very limited these days so I get back to this when I have a few hours here-and-there.

Sorry missed your response here. I did some refactoring of the recording and by doing that found out how it actually worked. I think the base algorithm needs to be improved, currently a hard coded silence limit is imposed after a number of seconds of loud data. This limit is at 0.25 so it may be this stop criteria that is messing up. as soon as there is the tiniest break in the words it will consider it the end of the utterance.

I wonder if MyCroft could be adapted with the use of manners…

Hey Mycroft, let’s watch Star Trek Deep Space Nine Season 4 Episode 9 Thanks”

Once the word ‘Thanks/Thankyou/Xiexie’ has been identified, Mycroft stops recording and starts processing the instruction. That way we can still have the safety stop recording feature but we have a more natural interface with mycroft.

Wow, 0.25s is really small, and hard-coded too. Yeah that’s an accessibility problem for sure. Imagine someone who’s just really slow to speak for any one of a variety of reasons, this would prevent Mycroft from being useable for them.

Julie’s idea though might make a handy work-around for such cases, though I’d opt for "confirm", rather than go with pleasantries… but that may just be me :wink:

1 Like