更新 target/captcha.lua

This commit is contained in:
2026-07-30 17:45:21 +08:00
parent 142dde73e0
commit b16067d19c

View File

@@ -1,15 +1,15 @@
-- tts.lua -- captcha.lua
local tts = {} local captcha = {}
tts.__index = tts captcha.__index = captcha
--[[ --[[
创建一个新的 fw_tts 对象 创建一个新的 fw_captcha 对象
@return 返回一个新的 fw_tts 对象 @return 返回一个新的 fw_captcha 对象
]] ]]
function tts.new(db) function captcha.new(db)
local instance = setmetatable({}, tts) local instance = setmetatable({}, captcha)
if db == nil then if db == nil then
instance.module = fw_tts.new() instance.module = fw_captcha.new()
else else
instance.module = db instance.module = db
end end
@@ -18,17 +18,16 @@ function tts.new(db)
end end
--[[ --[[
说话 生成验证码
@param voice 声音 @param width 宽度
@param output 输出文件 @param height 高度
@param model 模型 @param length 长度
@param faster 速度 @param filepath 输出文件
@param pitch 音调 @return 验证码
@return 是否成功说话
]] ]]
function tts:speak(voice, output, model, faster, pitch) function captcha:make(width, height, length, filepath)
return self.module:speak(voice, output, model, faster, pitch) return self.module:make(width, height, length, filepath)
end end
return tts return captcha