aria-music / zundacord

Japanese Text-to-speech bot for Discord, powered by VOICEVOX
MIT License
7 stars 4 forks source link

voicevox_engine:nvidia-ubuntu20.04-0.14.5で動作しない #66

Open Hericken opened 1 year ago

Hericken commented 1 year ago

発生した問題

voicevox/voicevox_engine:nvidia-ubuntu20.04-0.14.5で /voice コマンドを実行するとInternal errorを返す. image

server log (ZUNDACORD_LOG_LEVEL=debug)

[10:22:09.532] ERROR (32990): unhandled error
    module: 
    guild: 
    guildId: 
    user: 
    userId: 
    commandName: "voice"
    err: {
      "type": "ExpectedConstraintError",
      "message": "Invalid number value",
      "stack":
          Error: Invalid number value
              at Object.run (/workspaces/zundacord/node_modules/@sapphire/shapeshift/dist/index.js:768:72)
              at /workspaces/zundacord/node_modules/@sapphire/shapeshift/dist/index.js:207:66
              at Array.reduce (<anonymous>)
              at NumberValidator.parse (/workspaces/zundacord/node_modules/@sapphire/shapeshift/dist/index.js:207:29)
              at SelectMenuBuilder.addOptions (/workspaces/zundacord/node_modules/@discordjs/builders/dist/index.js:934:28)
              at SelectMenuBuilder.addOptions (/workspaces/zundacord/node_modules/discord.js/src/structures/StringSelectMenuBuilder.js:49:18)
              at Zundacord.<anonymous> (/workspaces/zundacord/lib/zundacord/app.js:533:18)
              at Generator.next (<anonymous>)
              at fulfilled (/workspaces/zundacord/lib/zundacord/app.js:5:58)
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      "constraint": "s.number.lessThanOrEqual",
      "given": 26,
      "expected": "expected <= 25"

対策

voicevox_engineのバージョンを nvidia-ubuntu20.04-latest から nvidia-ubuntu20.04-0.14.4に落とせば /voice コマンドが正しく動作する. docker-compose.gpu.yml

version: '3.9'

services:
  voicevox:
    image: voicevox/voicevox_engine:nvidia-ubuntu20.04-0.14.4
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              capabilities: [gpu]
sarisia commented 1 year ago

voicevox の対応スピーカー数が26以上になったので Discord のドロップダウンリストの上限数25を超えてエラーになってる. ページング対応が必要.