I’ve added tts to my anki deck, but some cards have sound files so it’s reading out the sound file, is there a way to stop this? I use anki on pc, android, and ios if that helps.
Is this issue only happening on AnkiDroid, and your AnkiDesktop and AnkiMobile handle it fine?
How did you add tts? Can you show us your card template?
I added a somple code like tts en_GB, it’s happening on all devices.
I was looking for the exact text you used – so helpful folks might be able to see if there were any edits that would fix this. Showing us your templates is the easiest way.
Screenshot is okay, but even better is to copy the text here into a code/preformatted block. Put 3 backticks ``` on the lines before and after it, so it will look like this:
Templates
When you use the TTS feature, it will read whatever contents are in the field. If you have some contents that you don’t want read, such as sound tags, then that content needs to be put in a different field instead (e.g. creating a separate ‘audio’ field where you put the audio files).
That was the exact text I’m pretty sure, I’ve removed the code for now because it made the cards annoying to use, but without that they’re just like this:
{{Back}}
{{FrontSide}}
{{Front}}
.card {font-familiy: arial; font-size: 40px; text-align: center; color:black; background-color: white; }
.mystyle1 {
font-familiy: arial; font-size: 20px;
text-align: center;
color: #088472 ;;
}
.mystyle2 {
font-familiy: arial; font-size: 20px;
text-align: center;
color: #126f87 ;;
}
I’ve also added an extra field for examples
I’ve been using the handy tts feature on Android which ignores cards with audio files automatically, but unfortunately this is being removed soon and isn’t available on my desktop or Ipad.
But then it will give me audio twice, is there a way to do something like an if statement? So if there’s audio the tts won’t play?
We can’t troubleshoot it if it’s not there!
If you decide to add it back – make sure what you want read is the only thing in the field that TTS is reading (exactly what dae said). Field Replacements - Anki Manual
Sure. Take a look an Conditional Replacement – Card Generation - Anki Manual . You can have separate instructions for if-there-is-something-in-the-audio-field and if-there-isn’t.
Conditional replacement can only act on whether a field has content or doesn’t have content - I’m afraid it can’t act based on the specifics of the content, such as if it has sound tags.
Oh, yes, I definitely had in mind a separate sound file-field, like you had already suggested. That’s the same way I do mine.
Hello, does that mean that something like this doesnt work either?: If the {{Subdeck}} contains „Deck1“ give me different tts {{{{tts ru-RU voices=Apple_Milena_(Enhanced):Front}}
{{Subdeck}}
returns the name of a subdeck. And I don’t think your question is related to this one, so I’m going to respond to you over in your thread.
Here is tts that works 100%
{{tts pt_PT voices=com.google.android.tts-pt-pt-x-pmj-local speed=0.8:Front}}
For russion:
{{tts ru_RU voices=com.google.android.tts-ru-RU-language speed=0.5:XXX}}
{{tts ru_RU voices=com.google.android.tts-ru-ru-x-rud-local speed=0.5:XXX}}
Both male and female
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.