# Prevent autoplaying of text to speech

**URL:** <https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293>\
**Category:** Card Design\
**Created:** [June 18, 2020, 8:27pm UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293 "2020-06-18T20:27:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitbonk](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/bitbonk/32/179_2.png) [@bitbonk](https://forums.ankiweb.net/u/bitbonk)\
**Post date:** [June 18, 2020, 8:27pm UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/1 "2020-06-18T20:27:21Z")

</div>

With {{tts:fieldname}} I can make Anki desktop and mobile read a text to me when I open the card. Also a play button is added to the card so I can replay it.

How can I prevent Anki from playing it to me automatically when I open the card and ONLY play it to me when I press the play button?

---

<div class="post-metadata">

**Author:** ![mmdj2](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/mmdj2/32/124_2.png) [@mmdj2](https://forums.ankiweb.net/u/mmdj2)\
**Post date:** [June 18, 2020, 8:31pm UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/2 "2020-06-18T20:31:35Z")

</div>

go to deck options -\> general and uncheck automatically play audio

---

<div class="post-metadata">

**Author:** ![mmdj2](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/mmdj2/32/124_2.png) [@mmdj2](https://forums.ankiweb.net/u/mmdj2)\
**Post date:** [May 12, 2021, 10:31am UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/4 "2021-05-12T10:31:30Z")

</div>

I personally don’t know  
but I did some digging and here’s what I found:

> [@Disabling audio autoplay for certain fields](https://forums.ankiweb.net/t/disabling-audio-autoplay-for-certain-fields/6318/4):
>
> Unfortunately, it did not work. But I found another code on Reddit that worked: \<script\> var elem = document.querySelector(".soundLink, .replaybutton"); // AnkiMobile & AnkiDroid / AnkiDesktop if (elem) { elem.click(); } \</script\> But the problem with this code is that, when you disable the autoplay, it still plays the first audio. Is there a solution for this? Thanks in advance.

[https://anki.tenderapp.com/discussions/ankidesktop/23193-disable-autoplay-for-specific-fields](https://anki.tenderapp.com/discussions/ankidesktop/23193-disable-autoplay-for-specific-fields)

---

<div class="post-metadata">

**Author:** ![UbuEnglish](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@UbuEnglish](https://forums.ankiweb.net/u/UbuEnglish)\
**Post date:** [May 26, 2021, 10:44am UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/5 "2021-05-26T10:44:30Z")

</div>

See my post for a solution:

> [@Controlling display and function of audio buttons](https://forums.ankiweb.net/t/controlling-display-and-function-of-audio-buttons/10234):
>
> You can overcome Anki’s innate play audio function with a script (multiple sound files will not play in sequence). However, the first sound file will still play automatically and display a play button. To get around this I used a silent sound file (2 sec), and hid its button with CSS. This script will stop multiple audio files on a card from playing - insert it at the top of the card template you want to control. \<script\> var elem = document.querySelector(".soundLink, .replaybutton"); // Ank…

---

<div class="post-metadata">

**Author:** ![UbuEnglish](https://avatars.discourse-cdn.com/v4/letter/u/e19adc/32.png) [@UbuEnglish](https://forums.ankiweb.net/u/UbuEnglish)\
**Post date:** [June 3, 2021, 3:07am UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/6 "2021-06-03T03:07:24Z")

</div>

Yes, posted below.

---

<div class="post-metadata">

**Author:** ![user444](https://avatars.discourse-cdn.com/v4/letter/u/e0b2c6/32.png) [@user444](https://forums.ankiweb.net/u/user444)\
**Post date:** [October 22, 2021, 3:36pm UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/7 "2021-10-22T15:36:42Z")

</div>

> [@mmdj2](#):
>
> go to deck options → general and uncheck automatically play audio

(this option still doesn’t work)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 7:38am UTC](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293/8 "2023-05-01T07:38:14Z")

</div>


