Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion astrbot/core/agent/handoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def __init__(
tool_description: str | None = None,
**kwargs,
) -> None:

# Avoid passing duplicate `description` to the FunctionTool dataclass.
# Some call sites (e.g. SubAgentOrchestrator) pass `description` via kwargs
# to override what the main agent sees, while we also compute a default
Expand Down
62 changes: 61 additions & 1 deletion astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ class ChatProviderTemplate(TypedDict):
"type": "edge_tts",
"provider_type": "text_to_speech",
"enable": False,
"edge-tts-voice": "zh-CN-XiaoxiaoNeural",
"edge_tts_voice": "zh-CN-XiaoxiaoNeural",
"rate": "+0%",
"volume": "+0%",
"pitch": "+0Hz",
Expand Down Expand Up @@ -1536,6 +1536,66 @@ class ChatProviderTemplate(TypedDict):
},
},
"items": {
"gemini_tts_api_key": {
"description": "Google Gemini TTS API 密钥",
"type": "string",
"hint": "请在 Google Cloud Console 获取 Gemini TTS API 密钥,用于身份验证和服务调用。",
},
"gemini_tts_api_base": {
"description": "Google Gemini TTS API 基础地址",
"type": "string",
"hint": "Gemini TTS 服务的 API 接口地址,一般使用默认值即可,特殊网络环境可能需要修改。",
},
"gemini_tts_timeout": {
"description": "Google Gemini TTS 超时时间",
"type": "integer",
"hint": "设置 API 请求超时时间(秒),建议 20 秒,网络较差时可适当增加。",
},
"gemini_tts_model": {
"description": "Google Gemini TTS 模型选择",
"type": "string",
"hint": "选择使用的 TTS 模型,默认为 gemini-2.5-flash-preview-tts,不同模型支持的特性可能不同。",
},
"gemini_tts_prefix": {
"description": "Google Gemini TTS 前缀设置",
"type": "string",
"hint": "可选参数,用于在合成语音前添加特定前缀文本。",
},
"gemini_tts_voice_name": {
"description": "Google Gemini TTS 音色选择",
"type": "string",
"hint": "选择合成语音的音色,默认为 Leda,不同音色效果可参考官方文档。",
},
"character": {
"description": "GPT-SoVITS 角色选择",
"type": "string",
"hint": "选择要使用的语音角色,需要提前在 GPT-SoVITS 服务中配置好对应的角色模型。",
},
"emotion": {
"description": "GPT-SoVITS 情感选择",
"type": "string",
"hint": "选择合成语音的情感风格,默认为 default,具体可选情感取决于角色模型的支持。",
},
"edge_tts_voice": {
"description": "Edge TTS 音色选择",
"type": "string",
"hint": "选择微软 Edge TTS 的语音角色,默认为 zh-CN-XiaoxiaoNeural,可参考微软官方文档获取完整列表。",
},
"rate": {
"description": "Edge TTS 语速调节",
"type": "string",
"hint": "调整语音语速,格式如 +0% 表示正常语速,可增减百分比进行调整。",
},
"volume": {
"description": "Edge TTS 音量调节",
"type": "string",
"hint": "调整语音音量,格式如 +0% 表示正常音量,可增减百分比进行调整。",
},
"pitch": {
"description": "Edge TTS 音调调节",
"type": "string",
"hint": "调整语音音调,格式如 +0Hz 表示正常音调,可增减 Hz 值进行调整。",
},
"genie_onnx_model_dir": {
"description": "ONNX Model Directory",
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion astrbot/core/provider/sources/edge_tts_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(
super().__init__(provider_config, provider_settings)

# 设置默认语音,如果没有指定则使用中文小萱
self.voice = provider_config.get("edge-tts-voice", "zh-CN-XiaoxiaoNeural")
self.voice = provider_config.get("edge_tts_voice", "zh-CN-XiaoxiaoNeural")
self.rate = provider_config.get("rate")
self.volume = provider_config.get("volume")
self.pitch = provider_config.get("pitch")
Expand Down
48 changes: 48 additions & 0 deletions dashboard/src/i18n/locales/en-US/features/config-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,54 @@
},
"provider_group": {
"provider": {
"gemini_tts_api_key": {
"description": "Google Gemini TTS API Key",
"hint": "Please obtain the Gemini TTS API key from Google Cloud Console for authentication and service calls."
},
"gemini_tts_api_base": {
"description": "Google Gemini TTS API Base URL",
"hint": "The API endpoint URL for Gemini TTS service. Default value is usually sufficient, modify only for special network environments."
},
"gemini_tts_timeout": {
"description": "Google Gemini TTS Timeout",
"hint": "Set API request timeout in seconds. 20 seconds is recommended, increase if network is poor."
},
"gemini_tts_model": {
"description": "Google Gemini TTS Model Selection",
"hint": "Select the TTS model to use. Default is gemini-2.5-flash-preview-tts, different models may support different features."
},
"gemini_tts_prefix": {
"description": "Google Gemini TTS Prefix Setting",
"hint": "Optional parameter to add specific prefix text before speech synthesis."
},
"gemini_tts_voice_name": {
"description": "Google Gemini TTS Voice Selection",
"hint": "Select the voice for speech synthesis. Default is Leda, refer to official documentation for different voice effects."
},
"character": {
"description": "GPT-SoVITS Character Selection",
"hint": "Select the voice character to use. The corresponding character model needs to be configured in GPT-SoVITS service in advance."
},
"emotion": {
"description": "GPT-SoVITS Emotion Selection",
"hint": "Select the emotional style for speech synthesis. Default is default, available emotions depend on character model support."
},
"edge_tts_voice": {
"description": "Edge TTS Voice Selection",
"hint": "Select the voice character for Microsoft Edge TTS. Default is zh-CN-XiaoxiaoNeural, refer to Microsoft official documentation for complete list."
},
"rate": {
"description": "Edge TTS Speech Rate Adjustment",
"hint": "Adjust speech rate. Format like +0% means normal rate, can increase or decrease percentage."
},
"volume": {
"description": "Edge TTS Volume Adjustment",
"hint": "Adjust speech volume. Format like +0% means normal volume, can increase or decrease percentage."
},
"pitch": {
"description": "Edge TTS Pitch Adjustment",
"hint": "Adjust speech pitch. Format like +0Hz means normal pitch, can increase or decrease Hz value."
},
"genie_onnx_model_dir": {
"description": "ONNX Model Directory",
"hint": "The directory path containing the ONNX model files"
Expand Down
69 changes: 59 additions & 10 deletions dashboard/src/i18n/locales/zh-CN/features/config-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,20 +486,20 @@
"hint": "必填项。"
},
"slack_connection_mode": {
"description": "Slack Connection Mode",
"hint": "The connection mode for Slack. `webhook` uses a webhook server, `socket` uses Slack's Socket Mode."
"description": "Slack 连接模式",
"hint": "Slack 的连接模式。`webhook` 使用 Webhook 服务器,`socket` 使用 SlackSocket 模式。"
},
"slack_webhook_host": {
"description": "Slack Webhook Host",
"hint": "Only valid when Slack connection mode is `webhook`."
"description": "Slack Webhook host",
"hint": "仅在 Slack 连接模式为 `webhook` 时有效。"
},
"slack_webhook_path": {
"description": "Slack Webhook Path",
"hint": "Only valid when Slack connection mode is `webhook`."
"hint": "仅在 Slack 连接模式为 `webhook` 时有效。"
},
"slack_webhook_port": {
"description": "Slack Webhook Port",
"hint": "Only valid when Slack connection mode is `webhook`."
"description": "Slack Webhook 端口",
"hint": "仅在 Slack 连接模式为 `webhook` 时有效。"
},
"telegram_command_auto_refresh": {
"description": "Telegram 命令自动刷新",
Expand Down Expand Up @@ -919,12 +919,61 @@
},
"provider_group": {
"provider": {
"gemini_tts_api_key": {
"description": "Google Gemini TTS API Key",
"hint": "请在 Google Cloud Console 获取 Gemini TTS API 密钥,用于身份验证和服务调用。"
},
"gemini_tts_api_base": {
"description": "Google Gemini TTS API 基础地址",
"hint": "Gemini TTS 服务的 API 接口地址,一般使用默认值即可,特殊网络环境可能需要修改。"
},
"gemini_tts_timeout": {
"description": "Google Gemini TTS 超时时间",
"hint": "设置 API 请求超时时间(秒),建议 20 秒,网络较差时可适当增加。"
},
"gemini_tts_model": {
"description": "Google Gemini TTS 模型选择",
"hint": "选择使用的 TTS 模型,默认为 gemini-2.5-flash-preview-tts,不同模型支持的特性可能不同。"
},
"gemini_tts_prefix": {
"description": "Google Gemini TTS 前缀设置",
"hint": "可选参数,用于在合成语音前添加特定前缀文本。"
},
"gemini_tts_voice_name": {
"description": "Google Gemini TTS 音色选择",
"hint": "选择合成语音的音色,默认为 Leda,不同音色效果可参考官方文档。"
},
"character": {
"description": "GPT-SoVITS 角色选择",
"hint": "选择要使用的语音角色,需要提前在 GPT-SoVITS 服务中配置好对应的角色模型。"
},
"emotion": {
"description": "GPT-SoVITS 情感选择",
"hint": "选择合成语音的情感风格,默认为 default,具体可选情感取决于角色模型的支持。"
},
"edge_tts_voice": {
"description": "Edge TTS 音色选择",
"hint": "选择微软 Edge TTS 的语音角色,默认为 zh-CN-XiaoxiaoNeural,可参考微软官方文档获取完整列表。"
},
"rate": {
"description": "Edge TTS 语速调节",
"hint": "调整语音语速,格式如 +0% 表示正常语速,可增减百分比进行调整。"
},
"volume": {
"description": "Edge TTS 音量调节",
"hint": "调整语音音量,格式如 +0% 表示正常音量,可增减百分比进行调整。"
},
"pitch": {
"description": "Edge TTS 音调调节",
"hint": "调整语音音调,格式如 +0Hz 表示正常音调,可增减 Hz 值进行调整。"
},
"genie_onnx_model_dir": {
"description": "ONNX Model Directory",
"hint": "The directory path containing the ONNX model files"
"description": "ONNX 模型目录",
"hint": "包含 ONNX 模型文件的目录路径"
},
"genie_language": {
"description": "Language"
"description": "语言",
"hint": "设置 Genie 使用的语言"
},
"xai_native_search": {
"description": "启用原生搜索功能",
Expand Down