# Error for ask\_yesno(prompt, data=None) method

**URL:** https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147
**Category:** Picroft
**Created:** [April 26, 2022, 12:40pm UTC](https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147 "2022-04-26T12:40:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sen\_Puthirarajah](https://community.openconversational.ai/user_avatar/community.openconversational.ai/sen_puthirarajah/32/3630_2.png) [@Sen\_Puthirarajah](https://community.openconversational.ai/u/Sen_Puthirarajah)
#### Post date: [April 26, 2022, 12:40pm UTC](https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147/1 "2022-04-26T12:40:29Z")

</div>

mycroft.client.speech.listener:transcribe:239 | list index out of range  
mycroft.client speech. listener: transcribe:240 | speech recognition could not únderstand audio  
Hi, any idea about this error ? I tried to use the  
confirm = self.ask\_yesno(“motion.confirmation”, data={})  
and pass this variable to another function  
self.verify\_yesno(confirm)  
I get this error after recording. when i get the value “yes” or “no” it just starting the new session and pass the error as well.  
This my repo - [GitHub - Senthu05/homecare-with-motion-skill: Monitor the motion inside the house](https://github.com/Senthu05/homecare-with-motion-skill)  
(still developing, not finished yet)  
note - wakeword is working and other skills are working fine.

---

<div class="post-metadata">

### Author: ![gez-mycroft](https://community.openconversational.ai/user_avatar/community.openconversational.ai/gez-mycroft/32/1937_2.png) [@gez-mycroft](https://community.openconversational.ai/u/gez-mycroft)
#### Post date: [May 9, 2022, 6:15am UTC](https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147/2 "2022-05-09T06:15:56Z")

</div>

Hey there, have you made any progress on this?

These errors usually indicate that the STT did not transcribe anything. Depending on what you’re using for STT it might be having trouble picking up short phrases like “yes” and “no”. Try saying something a little longer like “yes do that please” and see if it is any different.

In the longer term we’ll probably be migrating these to use their own keyword listeners so that we can get much better accuracy with expected short single word responses.

---

<div class="post-metadata">

### Author: ![SGee](https://community.openconversational.ai/user_avatar/community.openconversational.ai/sgee/32/3411_2.png) [@SGee](https://community.openconversational.ai/u/SGee)
#### Post date: [May 9, 2022, 11:13am UTC](https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147/3 "2022-05-09T11:13:37Z")

</div>

> [@gez-mycroft](#):
>
> “yes do that please”

The return value would remain “yes”, the code is filtering [defined affirmatives](https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/res/text/en-us/yes.voc) (in this case en) from the sentence (if not exact=True is passed) and get back yes/no. Just to detail this.

---

<div class="post-metadata">

### Author: ![Sen\_Puthirarajah](https://community.openconversational.ai/user_avatar/community.openconversational.ai/sen_puthirarajah/32/3630_2.png) [@Sen\_Puthirarajah](https://community.openconversational.ai/u/Sen_Puthirarajah)
#### Post date: [June 1, 2022, 3:13am UTC](https://community.openconversational.ai/t/error-for-ask-yesno-prompt-data-none-method/12147/4 "2022-06-01T03:13:48Z")

</div>

I have changed my code in differnt way… Thanks for your valuable suggestions.
