refactor(api): TOML 配置 SSOT、统一错误契约、Auth/事务加固与可观测性 (#33)
配置 SSOT(TOML + .env) 统一错误契约 Auth 与事务边界 Redis / Celery 可靠性:业务 Redis(DB/0)与 Celery broker/backend(DB/1)显式拆分;连接池、sync client 可观测性(OpenTelemetry + LGTM)
This commit is contained in:
@@ -7,6 +7,7 @@ import uuid
|
||||
|
||||
from app.core.business_telemetry import business_span
|
||||
from app.core.logging import get_logger
|
||||
from app.core.runtime_constants import tts_defaults
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
@@ -208,7 +209,7 @@ class TencentTTSProvider:
|
||||
max_chars = MAX_CHARS_PER_REQUEST_EN if is_en else MAX_CHARS_PER_REQUEST_ZH
|
||||
|
||||
# Default "alloy" aligns with OpenAI TTS naming. Caller 链路里目前不会传具体音色,
|
||||
# 因此实际只走 default_voice 分支,对应 settings.tts_voice_type / tts_voice_type_en。
|
||||
# 因此实际只走 default_voice 分支,对应 tts_defaults.voice_type / tts_voice_type_en。
|
||||
v = voice.lower()
|
||||
if v == "alloy":
|
||||
voice_type = default_voice
|
||||
|
||||
Reference in New Issue
Block a user