This commit is contained in:
2026-09-04 14:51:35 +08:00
parent 54d840563b
commit 8d9c688991
9 changed files with 75 additions and 65 deletions
+23
View File
@@ -0,0 +1,23 @@
# ip_sound_column Worker 插件配置
[worker]
[worker.defaults]
cacheable = false
timeout = 30
[worker.registration]
router_prefix = "/ip_sound_column"
# Worker 注册(app lifespan 据此发现并加载插件)
[workers]
cleanup = "cleanup"
count = 1
factory = "create_workers"
module = "plugins.ip_sound_column"
type = "ip_sound_column"
# 运行时配置(展平后传给 create_workers 的 config 参数)
[workers.config]
data_dir = "./data"
ip = "172.19.11.244"
volume = 50
+22
View File
@@ -0,0 +1,22 @@
# ip_sound_column.tts — ip 音柱 tts 播放
# 修改后需重新运行: uv run gen_models config/workers/ip_sound_column src/plugins/ip_sound_column
[POST]
cacheable = true
summary = "ip 音柱 tts 播放"
params = [
"command: str", # 播放命令 play_local_tts
"volume: int", # 播放音量 0-100
"play_count: int", # 播放次数
"queue: bool", # 是否排队播放
"sync_response: bool", # 是否同步响应
"play_interval: int", # 播放间隔,单位秒
"tts_pitch: int", # 播放音调,范围 0 ~ 100
"tts_speed: int", # 播放速度,范围 0 ~ 100
"tts_voice_name: string", # 播放声音名称
"tts_text: string", # 播放文本
]
internal = true
[POST.response_model]
command = { type = "str", required = true }
result = { type = "int", required = true }