fix: 前端录音改用WAV格式(PCM 16kHz),兼容模型端

This commit is contained in:
2026-04-21 18:35:50 +08:00
parent b3cfae14a9
commit 04e8405558
7 changed files with 173 additions and 28 deletions

View File

@@ -39,4 +39,11 @@ async def index():
if __name__ == "__main__":
PORT = int(os.getenv("PORT", "19019"))
uvicorn.run(app, host="0.0.0.0", port=PORT)
SSL_KEY = os.getenv("SSL_KEY", "key.pem")
SSL_CERT = os.getenv("SSL_CERT", "cert.pem")
# 检查是否有 SSL 证书
if os.path.exists(SSL_KEY) and os.path.exists(SSL_CERT):
uvicorn.run(app, host="0.0.0.0", port=PORT, ssl_keyfile=SSL_KEY, ssl_certfile=SSL_CERT)
else:
uvicorn.run(app, host="0.0.0.0", port=PORT)