# Trouble adding TTS to my cards

**URL:** <https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792>\
**Category:** Card Design\
**Created:** [July 27, 2022, 2:44am UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792 "2022-07-27T02:44:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![er88](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@er88](https://forums.ankiweb.net/u/er88)\
**Post date:** [July 27, 2022, 2:44am UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792/1 "2022-07-27T02:44:52Z")

</div>

I primarily use the Anking deck for my studies and am trying to use the TTS included in the card template:  
{{tts en\_US voices=Apple\_Samantha speed=1.4:cloze:Text}}

However, I receive and error message (pasted below).

I have tried to change the voice to a Microsoft\_David. I have tried to add TTS to a completely blank deck and new card template. I have loaded with disabling add-ons. I have run Check Database and Check Media. I have tried to add text-to-speech with HyperTTS add-on. I have updated my Anki to the latest version.

None of these solutions have worked. Any advice would be appreciated. Thank you.

Error  
An error occurred. Please use Tools \> Check Database to see if that fixes the problem.  
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.  
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1  
Platform: Windows 10  
Flags: frz=True ao=False sv=2  
Add-ons, last update check: 2022-07-26 21:41:44

Caught exception:  
Traceback (most recent call last):  
File “aqt.webview”, line 42, in cmd  
File “aqt.webview”, line 149, in \_onCmd  
File “aqt.webview”, line 624, in \_onBridgeCmd  
File “aqt.clayout”, line 417, in \_on\_bridge\_cmd  
File “aqt.sound”, line 833, in play\_clicked\_audio  
File “aqt.sound”, line 150, in play\_tags  
File “aqt.sound”, line 209, in \_play\_next\_if\_idle  
File “aqt.sound”, line 212, in \_play  
File “aqt.sound”, line 223, in \_best\_player\_for\_tag  
File “aqt.tts”, line 111, in rank\_for\_tag  
File “aqt.tts”, line 76, in voice\_for\_tag  
File “aqt.tts”, line 72, in voices  
File “aqt.tts”, line 492, in get\_available\_voices  
File “aqt.tts”, line 495, in   
File “aqt.tts”, line 501, in \_voice\_to\_objects  
File “\<COMObject \>”, line 3, in GetAttribute  
pywintypes.com\_error: (-2147352567, ‘Exception occurred.’, (0, None, None, None, 0, -2147200966), None)

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [July 27, 2022, 10:26am UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792/2 "2022-07-27T10:26:13Z")

</div>

The error seems to imply there’s something wrong with Windows’ TTS support.

---

<div class="post-metadata">

**Author:** ![er88](https://avatars.discourse-cdn.com/v4/letter/e/7feea3/32.png) [@er88](https://forums.ankiweb.net/u/er88)\
**Post date:** [July 27, 2022, 1:49pm UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792/3 "2022-07-27T13:49:38Z")

</div>

Thanks! I was having trouble interpreting the error code.  
TTS seems to work outside of Anki.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [July 30, 2022, 9:04am UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792/4 "2022-07-30T09:04:57Z")

</div>

It appears that one of the voices on your system doesn’t have a name, and Anki is assuming every voice will have a name. If you can identify the problem one and remove it, it may resolve the issue.

---

<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:34am UTC](https://forums.ankiweb.net/t/trouble-adding-tts-to-my-cards/21792/5 "2023-05-01T07:34:38Z")

</div>

Closed on May 1, 2023, 7:34am UTC


