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
469 stars 85 forks source link

能切换角色说启动音,但不能录音对话。 #128

Open Xb135 opened 8 months ago

Xb135 commented 8 months ago

日志报错

37.26.133.89 - - [07/Mar/2024:06:21:35 +0000] "CONNECT hideface.mooo.com:80 HTTP/1.1" 400 157 "-" "-" "-" 37.26.133.89 - - [07/Mar/2024:06:21:35 +0000] "GET http://l.webcam02.dynv6.net/hellok?rnd=9bb5090c9dbb9776414efab72dca1eaa&rn=511586272 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" "-" 2024/03/07 06:21:35 [error] 23#23: *3 open() "/usr/share/nginx/html/hellok" failed (2: No such file or directory), client: 37.26.133.89, server: localhost, request: "GET http://l.webcam02.dynv6.net/hellok?rnd=9bb5090c9dbb9776414efab72dca1eaa&rn=511586272 HTTP/1.1", host: "l.webcam02.dynv6.net" 37.26.133.89 - - [07/Mar/2024:06:21:36 +0000] "\x16\x03\x01\x02\x00\x01\x00\x01\xFC\x03\x03\xE3\xA3\x96\x8C\xD9\xF7d\xD8\xCA\xE35P\xEB\xA8@H7\x19\x92V\xCFP\x9E\x09\xB87J\xF6\x10x\x1E\xE1 \xCCf/-\xB8?Q\x02\xE6\xF5\x04\x85\x00\x08c\xA3\x8E\xFB\x90,R{\xAE\x85\x84c\x91\xD3(w" 400 157 "-" "-" "-" 37.26.133.89 - - [07/Mar/2024:06:21:36 +0000] "\x16\x03\x01\x02\x00\x01\x00\x01\xFC\x03\x03\x00\x9B{\x81\xEE\x88\x9B\xAB+\xDB\xC6\xF8M\xAB\xCD\xC9\x1B\x87{\xDD9;z\x96\xBEG\xBAR&\xB6\x9E\xA1 #\xF1\xB1+\xD1" 400 157 "-" "-" "-" 37.26.133.89 - - [07/Mar/2024:06:21:38 +0000] "\x04\x01\x00P\x90LR\xA6\x00" 400 157 "-" "-" "-" 37.26.133.89 - - [07/Mar/2024:06:21:39 +0000] "\x05\x01\x00" 400 157 "-" "-" "-"

lewangdev commented 8 months ago

发一下你的 docker-compose.yml 配置,应该是 udp 端口或者设置有误

Xb135 commented 8 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: Asia/Shanghai

      LOG_LEVEL: DEBUG

      ROLES_FILE_PATH: /roles.json

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

      # 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: 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

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

      # OpenAI
      #OPENAI_OPENAI_API_BASE: https://one-api.xxx.com/v1
      #OPENAI_OPENAI_MODEL: gpt-3.5-turbo
      OPENAI_OPENAI_KEY: sk-Gnkw1ZnG5rUWbzVl316dddddddddddddddddd

      #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

      # 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-tts, elevenlabs, edge-tts, aliyun-tts]
      # edge-tts is Free but slow
      TTS_TYPE: edge-tts

      # Azure TTS
      #AZURE_TTS_KEY: 3eba91b6143f4d399edeeeeeeeeeeeeeeeeeeeee
      #AZURE_TTS_SERVICE_REGION: eastasiaaaa

      # 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

      AUDIO_DOWNLOAD_URL: http://*.155.186.36: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: *.155.186.36
      SPEECH_UDP_SERVER_PORT: 8085
lewangdev commented 8 months ago

使用是哪家的服务器? udp/8085端口是否开了?

Xb135 commented 8 months ago

端口开了,用的腾讯云的服务器。

Xb135 commented 8 months ago

这个有影响吗? WARNING: Default (insecure) Erlang cookie is in use. WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODECOOKIE WARNING: NOTE: Use the same cookie for all nodes in the cluster. EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual EMQX_NODENAME [node.name]: emqx@node1.emqx.io Listener ssl:default on 0.0.0.0:8883 started. Listener tcp:default on 0.0.0.0:1883 started. Listener ws:default on 0.0.0.0:8083 started. Listener wss:default on 0.0.0.0:8084 started. Listener http:dashboard on :18083 started. EMQX 5.5.0 is running now! 2024-03-08T01:50:19.634488+00:00 [warning] msg: alarm_is_activated, mfa: emqx_alarm:do_actions/3(418), message: <<"70.20% mem usage">>, name: high_system_memory_usage

lewangdev commented 8 months ago

这个有影响吗? WARNING: Default (insecure) Erlang cookie is in use. WARNING: Configure node.cookie in /opt/emqx/etc/emqx.conf or override from environment variable EMQX_NODECOOKIE WARNING: NOTE: Use the same cookie for all nodes in the cluster. EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual EMQX_NODENAME [node.name]: emqx@node1.emqx.io Listener ssl:default on 0.0.0.0:8883 started. Listener tcp:default on 0.0.0.0:1883 started. Listener ws:default on 0.0.0.0:8083 started. Listener wss:default on 0.0.0.0:8084 started. Listener http:dashboard on :18083 started. EMQX 5.5.0 is running now! 2024-03-08T01:50:19.634488+00:00 [warning] msg: alarm_is_activated, mfa: emqx_alarm:do_actions/3(418), message: <<"70.20% mem usage">>, name: high_system_memory_usage

不影响的。

方便的话把你的服务器登录信息或者1panel发我邮箱,我帮你看一下 lewang.dev@gmail.com,我的 SSH 公钥:https://github.com/lewangdev.keys

lewangdev commented 8 months ago

好了