Files
module-captcha/target/captcha.lua
a158 26d3c8f02a 1
2026-07-30 17:40:31 +08:00

35 lines
657 B
Lua

-- 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