fix: 前端录音改用WAV格式(PCM 16kHz),兼容模型端
This commit is contained in:
9
main.py
9
main.py
@@ -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)
|
||||
Reference in New Issue
Block a user