问题描述
我想要pyttsx3模块使用Microsoft David Voice。我写了下面的代码。使用$year = Carbon::Now()->year;
$table = DB::table('my_table')
->whereRaw("YEAR(IFNULL(field_one,field_two)) = ?",[$year])
->count();
会产生Zira(女性声音),而当我使用voices[0].id
时会显示错误voices[1].id
。请帮忙。我如何获得大卫之声?
list is out of index
import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice',voices[1].id) #changing index changes voices but ony 0 and 1 are working here
engine.say('Hello World')
engine.runAndWait()
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)