# 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:** 1\
**Showing post:** 4

<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)

---

_[View the full topic](https://forums.ankiweb.net/t/prevent-autoplaying-of-text-to-speech/293)._
