有很多同学买了苹果上面的Anki这个软件,他就想,说一百多块钱买的软件他到底有什么,那种没有摆在名面上的,但是还很好用的功能可以用在此,那我就给大家说明一下这个方法使用苹果原生的朗读功能非常的快乐,但是遗憾的是,不支持调用Siri的语音。

有聪明的小朋友,他说诶,我直接用朗读,屏幕这个功能,他不更好?确实朗读,屏幕按理说是没问题的,但是在Anki的版本中可能会出现各式各样的小毛病,因此那不推荐使用。截止22年1月

问题背景

anki支持调用tts的,但是网络上有关知识流传的比较少,缤纷火条同学作为一个热心肠,觉得很有义务给大家说到说道。本文主要以ios的anki为对象,不添加音频,直接朗读!
效果也还不错,听起来比较自然。

awesome的tts虽然大家都在推荐,但是我实用后只能用有道实现我的目的,买个会员吧虽然说也不贵,但是感觉就不是很快乐,现在时间紧张,不能折腾音频文件了,况且ipad录音后同步可能会出现不知名的小问题,例如安卓设备莫名多了一个无法删除的牌组(anki droid)(2021.8月仍有)

集英俊与智慧于一身的缤纷火条,他常常会修改模版,然后常常使用anki的全同步,很耗费时间,媒体文件大更是一个噩梦,于是他本着节省空间的想法,使用ios系统自带的tts来发声


<div> {{tts zh_TW:字段1}} {{tts zh_TW:字段2}}</div>

这句话的意思是我通过文字转语音
使用的语音是中文台湾
然后朗读的内容是字段1号的以及字段2号的。
在此处大家把它修改成自己使用的
自己使用的比方说正面,反面,back等等
大家可以先点击小齿轮,然后点编辑,看到自己所使用的字段

补充两句

你会惊奇的发现你的卡牌上出现了,一两个小喇叭。
如果你想给你的小喇叭修改一下,
你应该打开模板修改,要是里面给他,加上下面的这几句话,然后修改。
你可以找到这些语句修改—-:


.replay-button svg {
   width: 0px;
   height: 0px;
 }
 .replay-button svg circle {
fill: blue; }
 .replay-button svg path {
   stroke: white;
   fill: green;
}

至此,成功实现朗读功能,如果你需要他重读,只需要按下键盘的R,就可以在ios(ankimobie上面重读)
如果你想让他读三遍的话你就复制三个放在那儿。

20210912补充:

如何更换一个语音包呢?

首先点击编辑模板,还是从小齿轮的地方进去,输入下面的这一行字在正面吧。

{{tts-voices:}}

输入保存 预览,相信他会显示出很多的文字,我们复制下来

大家看到的这个zH杠cn,这个-啊,他在Windows电脑上会出现问题,你把它改成下滑-就好了,如下下所示。

{{tts zh-CN voices=Apple_Li-mu:Front}}
{{tts zh-CN voices=Apple_田田:Front}}
{{tts zh-CN voices=Apple_语舒:Front}}
{{tts zh-HK voices=Apple_善怡:Front}}
{{tts zh-TW voices=Apple_美嘉:Front}}

补说一下,这个啊,需要你额外的苹果设置下载语音包之后才可以正常使用。
有同学就说为什么我因为台湾的声音和用大陆的声音是一样的?
你需要做的是,把苹果的语言设置改成中国台湾,下载个语音包。声音就过去了,然后再改回来便是。

例如我选择:

{{tts zh-TW voices=Apple_美嘉(优化音质):Front}}

上面的front你可以修改成 你的字段的名称,例如:问题,答案等等

如何实现倍速播放呢?

你可以在冒号前面,加上speed=0.7 达到放慢语速的目的

{{tts zh-CN voices=Apple_Li-mu speed=2:Front}}

表示,二倍速度读Front字段。

于是你的apple设备可以正常播放了。

在安卓设备上发现 排版错误咋办

如果你发现,妈呀,我的这个电脑 安卓播放的时候 咋这样啊,多了一个小喇叭不说,整个排版全乱了

我们通过,网页标签语言来,把这个给隐藏起来。大家修改一下之前写的,


<div style=display:none> {{tts en_US:问题iii}} 
{{tts zh-CN voices=Apple_Li-mu speed=1.25 :小标题}}</div>

上面的这句话的意思是这个不显示,所以说你的小喇叭就显示不出来了。在安卓上,也不会出现字段重复的问题了。

附件:
如果需要多语言朗读,只读挖空等等内容,请阅读下面的


{{tts en_US:Front}}
On Windows, MacOS, and iOS, Anki will use the OS’s built in voices. On Linux, no voices are built in, but voices can be provided by add-ons, such as this one.
To see a list of all available languages/voices, place the following on your card template:
 {{tts-voices:}}
If there are multiple voices that support your chosen language, you can specify desired voices in a list, and Anki will choose the first available voice. For example:
 {{tts ja_JP voices=Apple_Otoya,Microsoft_Haruka:Field}}
This would use Otoya when on an Apple device, and Haruka when on a Windows PC. Specifying a different speed is possible in some TTS implementations:
 {{tts fr_FR speed=0.8:SomeField}}
Both speed and voices are optional, but the language must be included. On a Mac, you can customize the available voices:
Open the System Preferences screen.
Click on Accessibility.
Click on Speech.
Click on the system voice dropdown, and choose Customize.
Some voices sound better than others, so experiment to choose the one you prefer. Please note that the Siri voice can only be used by Apple apps. Once you’ve installed new voices, you’ll need to restart Anki for the new voices to become available.
On Windows, some voices like Cortana can not be selected, as Microsoft does not make those voices available to other applications.
On a cloze note type, you can make Anki read only the elided sections using the cloze-only filter, like so:
 {{tts en_US:cloze-only:Text}}
     The cloze-only filter is supported in Anki 2.1.29+ and AnkiMobile 2.0.65+.

如果,这片文章对你有帮助,请给缤纷火条一点支持,
可以是关注他的微信公众号,给他一个关注,一个阅读
也可以去他的网易云音乐听听他的原创歌曲,找找看有没有你喜欢的
认准「缤纷火条」不迷路

补充 微软家里的 几个能用的

{{tts zh_CN voices=Microsoft_Huihui}}
{{tts zh_CN voices=Microsoft_Huihui}}
{{tts zh_CN voices=Microsoft_Kangkang}}
{{tts zh_CN voices=Microsoft_Yaoyao}}

{{tts en_US voices=Microsoft_Zira}}

注意的是 和apple共用的方法 等待研究

If there are multiple voices that support your chosen language, you can specify desired voices in a list, and Anki will choose the first available voice. For example:
{{tts ja_JP voices=Apple_Otoya,Microsoft_Haruka:Field}}

重点注意—在win系统下线,系统对tss标签的要求更高,需要你严格使用"_"而不是"-''
Last modification:July 10, 2022
给博主买瓶冰可乐