How can I have TTS read out dynamically generated text?

My card will use queries to ChatGPT. How can I set up the Anki card template so that it can read out the text returned by GPT?

1 Like

Might be interested with
https://ankiweb.net/shared/info/1531888719

1 Like

I have utilized JavaScript to implement interaction with GPT and display the returned results on flashcards, creating numerous learning cards based on this functionality. Additionally, within AnkiDroid, by invoking APIs provided by AnkiDroidJs, I am able to perform text-to-speech (TTS) on the content returned by GPT. Unfortunately, this API is not available in the desktop version of Anki, which has left me searching for a way to achieve similar functionality in that environment.

The plugin you provided, while feature-rich, does not offer a cross-platform solution. Considering the uniqueness of personal needs, I believe that custom-developing a solution tailored to my specific requirements would be more appropriate. This approach not only ensures a consistent experience across different platforms but also better accommodates potential new requirements that may arise in the future.

I want to ask if the cross-platform TTS tags not work for you?

While using template tags like {{tts zh_CN:front}} enables cross-platform text-to-speech (TTS) functionality, this approach is limited to reading out the content of card fields or pre-defined static text. It does not support dynamically generated text, as the template cannot reference or process content that is created in real-time or changes based on user interaction.