Open oddled opened 4 months ago
roles.json放在 config 文件夹下
修改了,现在能发声了,但是还是不能对话,按A按钮不能录音,灯变不了绿色
按A按钮有反应了,我是八爪鱼mini,但是不像说明书一样长按变绿色,得点按A才能变绿色,而且闪烁很久也没回复
八爪鱼mini默认现在是点按一下,然后直接说话,停止说话后设备自动停止录音(停止录音的时候设备会发出一个声音) 可根据灯的状态判断一下:1 绿灯常亮:处于录音状态。2 绿灯闪烁:在等待服务器返回
但是绿灯闪烁将近十秒后又变为白色常亮,并且没有语音返回
能否把服务器的日志发一下,从设备的反应来看应该是服务器报错了
2024-07-08 11:44:39,357 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,357 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,391 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,391 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,391 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,397 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,397 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,397 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,428 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,428 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,428 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,431 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,431 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,431 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,467 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,467 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,467 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,467 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,467 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,467 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,487 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,487 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,487 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,507 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,507 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,507 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,507 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,507 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,507 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,527 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,527 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,528 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,562 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,562 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,562 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,562 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,562 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,562 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,587 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,587 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,587 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,607 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,607 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,607 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,627 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,627 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,627 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,631 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,631 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,631 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,667 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,667 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,667 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,671 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,672 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,672 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,692 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,692 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,692 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,721 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,721 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,721 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,721 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,721 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,721 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,747 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,747 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,747 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,767 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,767 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,767 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,787 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 1043B 2024-07-08 11:44:39,787 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,787 - DEBUG - Received frame type: b'\x01' 2024-07-08 11:44:39,787 - DEBUG - Peer: ('223.104.204.52', 13484) Len: 20B 2024-07-08 11:44:39,787 - DEBUG - Received token: bbd50e3532c34b578550c9b19f91f1c2 RecordingId: 6 2024-07-08 11:44:39,787 - DEBUG - Received frame type: b'\x02' 2024-07-08 11:44:39,788 - DEBUG - Recording file created: /audio/recording-466a2e2b19ec425bb01a129ef6f1b975.wav 2024-07-08 11:44:39,788 - DEBUG - Current dkey=ec64c98ecee0 role=4 2024-07-08 11:44:39,789 - DEBUG - load_ssl_context verify=True cert=None trust_env=True http2=False 2024-07-08 11:44:39,789 - DEBUG - load_verify_locations cafile='/usr/local/lib/python3.11/site-packages/certifi/cacert.pem' 2024-07-08 11:44:39,797 - DEBUG - Request options: {'method': 'post', 'url': '/audio/transcriptions', 'headers': {'Content-Type': 'multipart/form-data'}, 'timeout': 5.0, 'files': [('file', SerializationIterator(index=0, iterator=SerializationIterator(index=0, iterator=<_io.BufferedReader name='/audio/recording-466a2e2b19ec425bb01a129ef6f1b975.wav'>)))], 'json_data': {'model': 'whisper-1', 'language': 'zh', 'prompt': "ok. let's begin.", 'response_format': 'json'}} 2024-07-08 11:44:39,798 - DEBUG - connect_tcp.started host='free.gpt.ge' port=443 local_address=None timeout=5.0 socket_options=None 2024-07-08 11:44:39,837 - DEBUG - connect_tcp.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f16500ca650> 2024-07-08 11:44:39,837 - DEBUG - start_tls.started ssl_context=<ssl.SSLContext object at 0x7f16515583b0> server_hostname='free.gpt.ge' timeout=5.0 2024-07-08 11:44:39,905 - DEBUG - start_tls.complete return_value=<httpcore._backends.sync.SyncStream object at 0x7f16500ca710> 2024-07-08 11:44:39,905 - DEBUG - send_request_headers.started request=<Request [b'POST']> 2024-07-08 11:44:39,906 - DEBUG - send_request_headers.complete 2024-07-08 11:44:39,906 - DEBUG - send_request_body.started request=<Request [b'POST']> 2024-07-08 11:44:40,145 - DEBUG - send_request_body.complete 2024-07-08 11:44:40,145 - DEBUG - receive_response_headers.started request=<Request [b'POST']> 2024-07-08 11:44:40,543 - DEBUG - receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'OK', [(b'Server', b'nginx'), (b'Date', b'Mon, 08 Jul 2024 03:44:40 GMT'), (b'Content-Type', b'text/html; charset=utf-8'), (b'Content-Length', b'389'), (b'Connection', b'keep-alive'), (b'Cache-Control', b'no-cache'), (b'Content-Encoding', b'gzip'), (b'Vary', b'Accept-Encoding'), (b'X-Oneapi-Request-Id', b'2024070811444049302921968948766'), (b'Cache-Control', b'no-cache')]) 2024-07-08 11:44:40,543 - INFO - HTTP Request: POST https://free.gpt.ge/audio/transcriptions "HTTP/1.1 200 OK" 2024-07-08 11:44:40,544 - DEBUG - receive_response_body.started request=<Request [b'POST']> 2024-07-08 11:44:40,544 - DEBUG - receive_response_body.complete 2024-07-08 11:44:40,544 - DEBUG - response_closed.started 2024-07-08 11:44:40,544 - DEBUG - response_closed.complete 2024-07-08 11:44:40,544 - DEBUG - HTTP Request: POST https://free.gpt.ge/audio/transcriptions "200 OK" 2024-07-08 11:44:40,544 - DEBUG - Could not read JSON from response data due to <class 'json.decoder.JSONDecodeError'> - Expecting value: line 1 column 1 (char 0) 2024-07-08 11:46:25,768 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/data/post: message data: {'msgId': 5, 'identifier': 'real_time_data', 'outParams': {'battery_level': 84, 'rssi': 26}}
语音服务这里报错了,是用的gpt转发的么?要保证返回的数据格式和openAI的一致
都是gpt,但是是代理的apikey,那该怎么修改呢
您和代理的那边确认一下,接口数据需要保持和openAI的一致
以下是服务器日志: 2024-07-08 11:06:39,332 - WARNING - Read json file:/config/roles.json failed: [Errno 2] No such file or directory: '/config/roles.json' 2024-07-08 11:06:42,120 - INFO - FoloToy Server Version: v24.25.6.1-beta 2024-07-08 11:06:42,122 - ERROR - Run error: [Errno 111] Connection refused Traceback (most recent call last): File "core/folotoy_app.py", line 141, in core.folotoy_app.FolotoyApp.start File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1429, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1592, in reconnect self._sock = self._create_socket() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4598, in _create_socket sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4623, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused 2024-07-08 11:06:42,125 - INFO - Sleep 2s to reconnect to emqx:1883 2024-07-08 11:06:44,127 - ERROR - Run error: [Errno 111] Connection refused Traceback (most recent call last): File "core/folotoy_app.py", line 141, in core.folotoy_app.FolotoyApp.start File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1429, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1592, in reconnect self._sock = self._create_socket() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4598, in _create_socket sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4623, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused 2024-07-08 11:06:44,128 - INFO - Sleep 2s to reconnect to emqx:1883 2024-07-08 11:06:46,130 - ERROR - Run error: [Errno 111] Connection refused Traceback (most recent call last): File "core/folotoy_app.py", line 141, in core.folotoy_app.FolotoyApp.start File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1429, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1592, in reconnect self._sock = self._create_socket() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4598, in _create_socket sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4623, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 851, in create_connection raise exceptions[0] File "/usr/local/lib/python3.11/socket.py", line 836, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused 2024-07-08 11:06:46,132 - INFO - Sleep 2s to reconnect to emqx:1883 2024-07-08 11:06:48,142 - INFO - Connected to MQTT Broker(emqx:1883)! 2024-07-08 11:06:48,143 - INFO - Speech server started(0.0.0.0:8085/udp) 2024-07-08 11:07:44,385 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/event/post: message data: {'msgId': 1, 'identifier': 'login', 'outParams': {'role': 6}} 2024-07-08 11:07:44,389 - DEBUG - Publish topic: /user/folotoy/ec64c98ecee0/thing/command/call, msg: {"msgId": 0, "identifier": "updatetoken", "inputParams": {"token": "1ccc286f9d8d45a481bc586318b54849"}} 2024-07-08 11:07:44,390 - DEBUG - Publish topic: /user/folotoy/ec64c98ecee0/thing/command/call, msg: {"msgId": 1, "identifier": "updateconfig", "inputParams": {"speechUdpServerHost": "116.198.242.104", "speechUdpServerPort": 8085}} 2024-07-08 11:07:44,564 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/data/post: message data: {'msgId': 0, 'identifier': 'real_time_data', 'outParams': {'battery_level': 92, 'rssi': 0}} 2024-07-08 11:07:45,923 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/command/callAck: message data: {'msgId': 0, 'identifier': 'updatetoken', 'result': 1} 2024-07-08 11:07:45,923 - DEBUG - Command call ack: True, topic_tokens: {'#': [], '+': ['ec64c98ecee0']} 2024-07-08 11:07:46,563 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/data/post: message data: {'msgId': 2, 'identifier': 'data_config', 'outParams': {'hardware_ver': 'v0.2.3', 'software_version': '24.20.4.31', 'devicekey': 'ec64c98ecee0', 'voice_start_threshold': 55, 'voice_end_threshold': 45, 'record_type': 1, 'timeout': 30, 'open_tip_type': 1, 'volume': 100, 'role': 6, 'led_brightness': 255}} 2024-07-08 11:07:46,647 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/command/callAck: message data: {'msgId': 1, 'identifier': 'updateconfig', 'result': 1} 2024-07-08 11:07:46,647 - DEBUG - Command call ack: True, topic_tokens: {'#': [], '+': ['ec64c98ecee0']} 2024-07-08 11:07:46,693 - DEBUG - Received /user/folotoy/ec64c98ecee0/thing/event/post: message data: {'msgId': 3, 'identifier': 'press_small_btn', 'outParams': {'keyCode': 6, 'changed': 1}} 2024-07-08 11:07:46,694 - DEBUG - Cannot find role config for sn=ec64c98ecee0, role=6 Exception in thread paho-mqtt-client-folotoy: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/local/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4517, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2291, in loop_forever rc = self._loop(timeout) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1680, in _loop rc = self.loop_read() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 2094, in loop_read rc = self._packet_read() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3137, in _packet_read rc = self._packet_handle() ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3803, in _packet_handle return self._handle_publish() ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4140, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 4496, in _handle_on_message on_message(self, self._userdata, message) File "core/folotoy_app.py", line 130, in core.folotoy_app.FolotoyApp.start.on_message File "core/folotoy_app.py", line 99, in core.folotoy_app.FolotoyApp.process_mqtt_message File "core/folotoy_msg_processor.py", line 212, in core.folotoy_msg_processor.FolotoyMsgProcessor.process_press_small_btn TypeError: 'NoneType' object is not iterable 以下是yml文件,用的是中转key,京东云服务器 version: '3' volumes: emqx-etc: emqx-data: emqx-log: services: emqx: image: emqx/emqx:latest restart: always ports:
./config:/config environment: TZ: Asia/Shanghai
LOG_LEVEL: DEBUG
ROLES_FILE_PATH: /config/roles.json
Default STT(Sound To Text) type
Options: [openai-whisper, azure-whisper, azure-stt, dify-stt, aliyun-asr, volcengine-asr]
STT_TYPE: openai-whisper
OpenAI Whisper
OPENAI_WHISPER_API_BASE: https://free.gpt.ge OPENAI_WHISPER_KEY: sk-RQNumbiZtE5Q9kw777282fC29e3b44D7A5893aC4D1203159 OPENAI_WHISPER_MODEL: whisper-1
Azure Whisper
AZURE_WHISPER_API_BASE: https://xxxxx.openai.azure.com AZURE_WHISPER_KEY: 9afbef65bcf6487eeeeeeeeeeeeeeeeeee AZURE_WHISPER_DEPLOYMENT_NAME: whisper AZURE_WHISPER_API_VERSION: 2023-09-01-preview
Azure STT
AZURE_STT_KEY: 3eba91b6143f4d3eeeeeeeeeeeeeeeeeeeeeeeee AZURE_STT_SERVICE_REGION: eastasia
Dify STT
DIFY_STT_API_BASE: https://api.dify.ai/v1 DIFY_STT_KEY: app-xxxxxxxxxxxxxxxxxxxxx
Aliyun ASR
ALIYUN_ASR_ACCESS_KEY_ID: LTxxxxxxxxxxxxxxxxxxxxx ALIYUN_ASR_ACCESS_KEY_SECRET: 3zWkHVxxxxxxxxxxxxxxxxxxxxx ALIYUN_ASR_APP_KEY: Ltamxxxxxxxxxxxxxxxxxxxxx
Volcengine ASR
VOLCENGINE_ASR_ACCESS_TOKEN: U5joq1ow-Goyxxxxxxxxxxxxxx VOLCENGINE_ASR_APP_ID: 4556821315 VOLCENGINE_ASR_CLUSTER_ID: volcengine_input_common
Default LLM(Large Language Model) type
Options: ['openai', 'azure-openai', 'gemini', 'dify', 'qianfan', 'xiaodu',
'ollama', 'groq', 'moonshot', 'anthropic', 'zhipu', 'lingyiwanwu',
'dashscope', 'spark-desk', 'minimax', 'aws-bedrock', 'coze']
LLM_TYPE: openai
OpenAI
OPENAI_OPENAI_API_BASE: https://free.gpt.ge OPENAI_OPENAI_MODEL: gpt-3.5-turbo OPENAI_OPENAI_KEY: sk-RQNumbiZtE5Q9kw777282fC29e3b44D7A5893aC4D1203159
Azure OpenAI
AZURE_OPENAI_KEY: ef0f2781b5a24b15baaaaaaaaaaaaaaaaaaaaaaa AZURE_OPENAI_ENDPOINT: https://xxxxx.openai.azure.com/ AZURE_OPENAI_API_VERSION: "2023-05-15"
AZURE_OPENAI_MODEL: gpt-35-turbo
DIFY
DIFY_API_BASE: https://api.dify.ai/v1 DIFY_KEY: app-5YGbxxxxxxxxxxxxxxxxxxxxx
Xiaodu API
XIAODU_CLIENT_ID: xxxxxxxxxxxxxxxxxx XIAODU_SECRET: xxxxxxxxxxxxxxxxxxxxx
GEMINI
GEMINI_KEY: AIzaSyxxxxxxxxxxxxxxxxxxk
Qianfan
QIANFAN_CLIENT_ID: 13rBTgxxxxxxxxxxxxxxxxxx QIANFAN_SECRET: zYxtMIQLexxxxxxxxxxxxxxxxxx
Moonshot
MOONSHOT_API_BASE: https://api.moonshot.cn/v1 MOONSHOT_KEY: sk-XCLMlj54GDTxxxx MOONSHOT_MODEL: moonshot-v1-8k
Aliyun Dashscope
DASHSCOPE_KEY: sk-f4x DASHSCOPE_MODEL: qwen-turbo DASHSCOPE_ENABLE_SEARCH: "true"
Lingyiwanwu
LINGYIWANWU_KEY: 4b2f584b4x LINGYIWANWU_MODEL: yi-34b-chat-200k
Zhipu
ZHIPU_KEY: 4544625bb0d0ax
ZHIPU_MODEL=glm-3-turbo
Spark Desk
SPARK_DESK_API_VERSION: v2.0 SPARK_DESK_APP_ID: d2c1xxxxxxxxxxx SPARK_DESK_API_KEY: 10610b3xxxxxxx SPARK_DESK_API_SECRET: N2I5xxxxxxxxx SPARK_DESK_TEMPERATURE: 0.7 SPARK_DESK_MAX_TOKENS: 4096
MINIMAX
MINIMAX_KEY: eyJhbGciOiJSUzI1NiIsInRxxxxxxxxxxxxxxx
AWS Bedrock
AWS_BEDROCK_ACCESS_KEY_ID: AKIAQLJIxxxxxxxxxxxxxxxxxxx AWS_BEDROCK_ACCESS_KEY_SECRET: ss07ojxxW/X7YHZkxxxxxxxxxx AWS_BEDROCK_MODEL: anthropic.claude-v2:1
FastGPT
FASTGPT_KEY: here-is-app-key-not-account-key
FASTGPT_API_BASE: https://api.fastgpt.in/api
FASTGPT_CHAT_ID: xxx
Coze
COZE_API_BASE: https://api.coze.cn/open_api/v2 COZE_PERSONAL_ACCESS_TOKEN: pat_Vl3CaNcFgf67wx COZE_BOT_ID: 73568618000000060037
If your elevenlabs is a free account, keep 2 here
VOICE_EXECUTOR_MAX_WORKERS: 2
Default TTS(Text to Sound) type
Options: [openai-tts, azure-openai-tts, azure-tts, dify-tts, elevenlabs, edge-tts, aliyun-tts, volcengine-tts]
edge-tts is Free but slow
TTS_TYPE: edge-tts
Azure TTS
AZURE_TTS_KEY: 3eba91b6143f4d399edeeeeeeeeeeeeeeeeeeeee AZURE_TTS_SERVICE_REGION: eastasia
elevenlabs
ELEVENLABS_TTS_KEY: a920b73991e68d5c9c9aaaaaaaaaaaaaaaa ELEVENLABS_TTS_MODEL: eleven_multilingual_v2
OpenAI TTS
OPENAI_TTS_KEY: sk-16XnP3HLHWho21oO2m0AAAAAAAAAAAAAAAAAAAAAA OPENAI_TTS_MODEL: tts-1
Aliyun TTS
ALIYUN_TTS_ACCESS_KEY_ID: LTAI5t91NSxxxxxxxxxxxxxxxxxxxxx ALIYUN_TTS_ACCESS_KEY_SECRET: 3zWkHVxxxxxxxxxxxxxxxxxxxxx ALIYUN_TTS_APP_KEY: Ltamxxxxxxxxxxxxx
Azure Openai TTS
AZURE_OPENAI_TTS_API_BASE: https://xxx-whisper.openai.azure.com/ AZURE_OPENAI_TTS_API_VERSION: 2024-02-15-preview AZURE_OPENAI_TTS_DEPLOYMENT_NAME: tts AZURE_OPENAI_TTS_KEY: 01fdbc75bdxxxxxx AZURE_OPENAI_TTS_MODEL: tts-1
Dify TTS
DIFY_TTS_API_BASE: https://api.dify.ai/v1 DIFY_TTS_KEY: app-5YGbAx
Volcengine TTS
VOLCENGINE_TTS_ACCESS_TOKEN: U5joq1ow-xxxxxxxxxxxx VOLCENGINE_TTS_APP_ID: 45568210000 VOLCENGINE_TTS_CLUSTER_ID: volcano_tts VOLCENGINE_TTS_VOICE_TYPE: BV700_V2_streaming VOLCENGINE_TTS_EMOTION: conniving VOLCENGINE_TTS_LANGUAGE: zh_guangxi
AUDIO_DOWNLOAD_URL: http://116.198.242.104:8082 AUDIO_SAVE_PATH: /audio
MQTT Broker
MQTT_BROKER_HOST: emqx MQTT_BROKER_PORT: 1883 MQTT_CLIENT_ID: folotoy MQTT_USERNAME: folotoy MQTT_PASSWORD: folotoy
SPEECH_UDP_SERVER_HOST: 116.198.242.104 SPEECH_UDP_SERVER_PORT: 8085