FoloToy / folotoy-server-self-hosting

Config files for self-hosting the FoloToy Server. Documents: https://docs.folotoy.com
https://tool.folotoy.com
GNU General Public License v3.0
457 stars 85 forks source link

启动docker之后查看日志显示 Connection refused #112

Closed xiaoxiaosaohuo closed 9 months ago

xiaoxiaosaohuo commented 9 months ago

2024-01-13 07:59:20,765 - INFO - FoloToy Server Version: v23.50.1.4-beta 2024-01-13 07:59:20,767 - ERROR - Run error: [Errno 111] Connection refused Traceback (most recent call last): File "core/folotoy_app.py", line 126, in core.folotoy_app.FolotoyApp.start File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, 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-01-13 07:59:20,768 - INFO - Sleep 2s to reconnect 2024-01-13 07:59:22,770 - ERROR - Run error: [Errno 111] Connection refused Traceback (most recent call last): File "core/folotoy_app.py", line 126, in core.folotoy_app.FolotoyApp.start File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 3685, 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-01-13 07:59:22,770 - INFO - Sleep 2s to reconnect 2024-01-13 07:59:24,772 - INFO - Speech server started(0.0.0.0:8085/udp) 2024-01-13 07:59:24,773 - INFO - Connected to MQTT Broker(emqx:1883)!

xiaoxiaosaohuo commented 9 months ago
version: '3'
volumes:
  emqx-etc:
  emqx-data:
  emqx-log:
services:
  emqx:
    image: emqx/emqx:latest
    restart: always
    ports:
      - "1883:1883/tcp"
      - "18083:18083/tcp"
      - "8083:8083/tcp"
    volumes:
      - emqx-etc:/opt/emqx/etc    
      - emqx-data:/opt/emqx/data
      - emqx-log:/opt/emqx/log
    environment:
      EMQX_NODE_NAME: emqx@node1.emqx.io
  nginx:
    image: nginx:latest
    restart: always
    ports:
      - "8082:80/tcp"
    volumes:
      - ./audio:/usr/share/nginx/html
  folotoy:
    image: lewangdev/folotoy-server:latest
    restart: always
    ports:
      - "8085:8085/udp"
    volumes:
      - ./audio:/audio
      - ./roles.json:/roles.json
    environment:
      TZ: east/us

      LOG_LEVEL: DEBUG

      ROLES_FILE_PATH: /roles.json

      # Default STT(Sound To Text) type
      # Options: [openai-whisper, azure-whisper, azure-stt]
      STT_TYPE: azure-stt

      # OpenAI Whisper
      #OPENAI_WHISPER_API_BASE: https://one-api.xxxx.com/v1
      # OPENAI_WHISPER_KEY: sk-Gnkw1ZnG5rUWbzVl316dddddddddddddddddd
      # 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: e84462eeeeeeeeb3009a6007
      AZURE_STT_SERVICE_REGION: eastus

      # Default LLM(Large Language Model) type
      # Options: [openai, azure-openai]
      LLM_TYPE: azure-openai

      # OpenAI
      #OPENAI_OPENAI_API_BASE: https://one-api.xxx.com/v1
      OPENAI_OPENAI_KEY: sk-5N8F5VXsa7oOZI8Q874601110AAAAAAAAAAAAAAAAAAAAAA

      #Azure OpenAI
      AZURE_OPENAI_KEY: 201d94873aeee734b36afca9eeeeef2db7
      AZURE_OPENAI_ENDPOINT: https://aaa-ai.openai.azure.com/
      AZURE_OPENAI_API_VERSION: "2023-06-01-preview"

      #Baidu YIYAN API
      #LLM_TYPE: yiyan
      # YIYAN_CLIENT_ID: xxxxxxxxxxxxxxxxxx
      # YIYAN_SECRET: xxxxxxxxxxxxxxxxxxxxx

      # If your elevenlabs is a free account, keep 2 here
      VOICE_EXECUTOR_MAX_WORKERS: 2

      # Default TTS(Text to Sound) type
      # Options: [edge-tts, azure-tts, elevenlabs, openai-tts]
      # edge-tts is Free but slow
      TTS_TYPE: azure-tts

      # Azure TTS
      AZURE_TTS_KEY: e84462eeeeeeeeb3009a6007
      AZURE_TTS_SERVICE_REGION: eastus

      # elevenlabs
      ELEVENLABS_TTS_KEY: a920b73991e68d5c9c9aaaaaaaaaaaaaaaa
      ELEVENLABS_TTS_MODEL: eleven_multilingual_v2

      # OpenAI TTS
      OPENAI_TTS_KEY: sk-16XnP3HLHWho21oO2m0AAAAAAAAAAAAAAAAAAAAAA
      OPENAI_TTS_MODEL: tts-1  

      AUDIO_DOWNLOAD_URL: http://218.100.231.103: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: 218.100.231.103
      SPEECH_UDP_SERVER_PORT: 8085
lewangdev commented 9 months ago

emqx 启动比较慢,所以会打印的这样的日志,等它启动好了,就没问题了。

xiaoxiaosaohuo commented 9 months ago

但是录音之后也看不到有推送消息的日志,对话没有任何反应,这是日志,麻烦帮忙看下

 success: WebSerial VendorID 0x1a86 ProductID 0x7523
I: Alarm Voltage:3.70

I: record start button pressed
FSM=====================idle_exit==================================
FSM=====================atob========================================
FSM=====================record_enter==================================
I: [EVENT] ROBOT_LISTEN
[I] AnalogAudio.h : 58 - bool audio_tools::AnalogAudioStream::begin(audio_tools::AnalogConfig)
[I] AnalogAudioESP32.h : 48 - virtual bool audio_tools::AnalogDriverESP32::begin(audio_tools::AnalogConfig)
[I] AudioTypes.h : 88 - sample_rate: 32000
[I] AudioTypes.h : 89 - channels: 1
[I] AudioTypes.h : 90 - bits_per_sample: 16
[I] AnalogAudioBase.h : 79 - input pin1: 35
[I] AnalogAudioESP32.h : 52 - auto_center
[I] AnalogAudioESP32.h : 95 - RX_MODE
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
[I] StreamCopy.h : 139 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops
I: record end button pressed
FSM=====================record_exit==================================
[I] AnalogAudio.h : 64 - virtual void audio_tools::AnalogAudioStream::end()
[I] AnalogAudioESP32.h : 137 - end
FSM=====================atob========================================
FSM=====================wait_enter==================================
I: [EVENT] ROBOT_THINK
I: local audio url:/recordover.mp3
I: local audio change:0

I: Alarm Voltage:3.70

Timeout for 30 seconds!
FSM=====================wait_exit==================================
FSM=====================atob========================================
FSM=====================idle_enter==================================
I: [EVENT] ROBOT_IDLE

I: Try to connect to MQTT Broker ...
[197901][E][WiFiClient.cpp:268] connect(): socket error on fd 49, errno: 104, "Connection reset by peer"

I: Alarm Voltage:3.70
xiaoxiaosaohuo commented 9 months ago

azure的stt 和tts 是同一个key吧,我用的是azure的SpeechServices , endpoint是 https://eastus.api.cognitive.microsoft.com/

lewangdev commented 9 months ago

端口是否打开了?参考这里:https://docs.folotoy.com/zh/docs/faq/

image
lewangdev commented 9 months ago

azure的stt 和tts 是同一个key吧,我用的是azure的SpeechServices , endpoint是 https://eastus.api.cognitive.microsoft.com/

可以用相同的

xiaoxiaosaohuo commented 9 months ago

@lewangdev 看了下端口是打开的,并且防火墙已关闭,日志一直显示超时,下面是首次链接时的日志,看起来是连接MQTT失败了

` success: WebSerial VendorID 0x1a86 ProductID 0x7523 E (1176) esp_core_dump_f͡ No core dump partition found! E ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:1184 load:0x40078000,len:13192 load:0x40080400,len:3028 entry 0x400805e4

E (1176) esp_core_dump_f͡ No core dump partition found! E (1176) esp_core_dump_flash: No core dump partition found!

ProductKey: folotoy DeviceKey: fcb467da1270 DeviceSecret: 4CPTNOD2EKAB HardwareVersion: 0.8.1.3 LampVersion: 1.1 FSM=====================initial_enter================================== FSM=====================initial_doing================================== I: battery_setup Finish I: Alarm Voltage:3.70 FSM=====================initial_exit================================== FSM=====================atob======================================== FSM=====================wificonfig_enter================================== Failed to connect to default WiFi I: [EVENT] ROBOT_WIFI_UNINITIALIZED MAC Address: FC:B4:67:DA:12:70 Custom SSID: FoloToy-1270 wm:AutoConnect wm:Connect Wifi, ATTEMPT # 1 of 3 wm:Connecting to SAVED AP: TP-LINK_374B wm:AutoConnect: SUCCESS *wm:STA IP Address: 192.168.0.102 Connected to TP-LINK_374B channel 11 FoloToy ip: 192.168.0.102 FSM=====================wificonfig_exit================================== FSM=====================atob======================================== FSM=====================idle_enter================================== I: [EVENT] ROBOT_CONNECT_WIFI_SUCCESS I: Config load from LittleFS Successful! I: Config file:/config.json is exists! config.json size: 883 bytes Keys.json configuration file exists custom button setup Invalid IO pin or remote IO pins I: MQTT Broker is a IP:218.150.250.103:1883 I: Try to connect to MQTT Broker ... [ 6798][E][WiFiClient.cpp:268] connect(): socket error on fd 49, errno: 104, "Connection reset by peer" I: [EVENT] ROBOT_CONNECT_WIFI_FAILURE I: Try to connect to MQTT Broker ... [ 7008][E][WiFiClient.cpp:268] connect(): socket error on fd 49, errno: 104, "Connection reset by peer" I: [EVENT] ROBOT_CONNECT_WIFI_FAILURE I: Failed to connect to MQTT Broker! I: MQTT Error Code: -2, it means: I: Connect failed config is:{ "wifi": { "enable": true, "ssid": "TP-LINK_374B", "password": "**" }, "common": { "hardware_ver": "0.8.1.3", "software_ver": "23.51.3.13", "lamp_ver": "1.1", "log_level": 5, "productkey": "folotoy", "devicekey": "fcb467da1270", "firstboot": false, "role": 0, "old_role": 1, "etag": { "1": "", "2": "", "3": "", "4": "", "5": "", "6": "", "7": "" }, "voice_threshold": 3600, "record_type": 2, "timeout": 30, "open_tip_type": 1, "voltage_alarm": 3.7 }, "mqtt": { "enable": true, "broker": "218.150.250.103", "port": 1883, "cid": "fcb467da1270", "username": "fcb467da1270", "password": "4CPTNOD2***" }, "udpSpeechServer": { "address": "192.168.1.26", "port": 8085 } } Please check your config!

I: Try to connect to MQTT Broker ...

I: Alarm Voltage:3.70

I: Try to connect to MQTT Broker ... [ 37863][E][WiFiClient.cpp:268] connect(): socket error on fd 49, errno: 104, "Connection reset by peer"

lewangdev commented 9 months ago

看你日志里面配置mqtt和udp服务器的ip,不是你yml配置的

xiaoxiaosaohuo commented 9 months ago

不好意思,这个ip我贴日志的时候改了,实际上和yml是一致的,我只在贴日志的时候修改了218打头的那几个ip

xiaoxiaosaohuo commented 9 months ago

"udpSpeechServer": { "address": "192.168.1.26", "port": 8085 }。` 这个ip 是不是不对啊,和yml的SPEECH_UDP_SERVER_HOST对应不上

lewangdev commented 9 months ago

改完之后要执行 sudo docker composer up folotoy -d

xiaoxiaosaohuo commented 9 months ago

thanks, 一切正常了