| 12345678910111213141516171819202122232425262728293031323334 |
- -- tts.lua
- local tts = {}
- tts.__index = tts
- --[[
- 创建一个新的 fw_tts 对象
- @return 返回一个新的 fw_tts 对象
- ]]
- function tts.new(db)
- local instance = setmetatable({}, tts)
- if db == nil then
- instance.module = fw_tts.new()
- else
- instance.module = db
- end
-
- return instance
- end
- --[[
- 说话
- @param voice 声音
- @param output 输出文件
- @param model 模型
- @param faster 速度
- @param pitch 音调
- @return 是否成功说话
- ]]
- function tts:speak(voice, output, model, faster, pitch)
- return self.module:speak(voice, output, model, faster, pitch)
- end
- return tts
|