Hello there!
I'm attempting to get your creation up and running on a Debian 12.1 install as per instructions in README.md. The install is up to date and the box has plenty of free storage and memory as the problem I'm about to delve into occur. vm.overcommit_memory = 1 has also been set and verified as part of my blind stab at resolving this issue.
I've successfully managed to get the bot onto our server, commands are being recognized and all seems well up to this point. The bot acknowledges our desired language, joins the voice channel when requested and plays its little fanfare. :)
However, a few errors are thrown during startup.
ghcr.io/wotschofsky/discord-live-translator log:
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 172.18.0.3:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
[ioredis] Unhandled error event: Error: connect ETIMEDOUT
at Socket.<anonymous> (/app/node_modules/ioredis/built/Redis.js:170:41)
at Object.onceWrapper (node:events:628:28)
at Socket.emit (node:events:514:28)
at Socket._onTimeout (node:net:571:8)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND redis
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26)
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 172.18.0.3:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16)
yarn run v1.22.19
$ node -r source-map-support/register dist/app.js
[2023-08-30T00:42:41.681Z] Logged in as Super Secret Bot#1337!
Otherwise the logs look alright besides of redis lusting for a config.
Redis log:
1:C 30 Aug 2023 00:42:38.733 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 30 Aug 2023 00:42:38.733 * Redis version=7.2.0, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 30 Aug 2023 00:42:38.733 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 30 Aug 2023 00:42:38.733 * monotonic clock: POSIX clock_gettime
1:M 30 Aug 2023 00:42:38.733 * Running mode=standalone, port=6379.
1:M 30 Aug 2023 00:42:38.734 * Server initialized
1:M 30 Aug 2023 00:42:38.734 * Loading RDB produced by version 7.2.0
1:M 30 Aug 2023 00:42:38.734 * RDB age 28 seconds
1:M 30 Aug 2023 00:42:38.734 * RDB memory usage when created 0.85 Mb
1:M 30 Aug 2023 00:42:38.734 * Done loading RDB, keys loaded: 1, keys expired: 0.
1:M 30 Aug 2023 00:42:38.734 * DB loaded from disk: 0.000 seconds
1:M 30 Aug 2023 00:42:38.734 * Ready to accept connections tcp
1:M 30 Aug 2023 01:42:39.053 * 1 changes in 3600 seconds. Saving...
1:M 30 Aug 2023 01:42:39.053 * Background saving started by pid 14
14:C 30 Aug 2023 01:42:39.167 * DB saved on disk
14:C 30 Aug 2023 01:42:39.167 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
1:M 30 Aug 2023 01:42:39.254 * Background saving terminated with success
Libretranslate log:
Updating language models
Found 60 models
Keep 8 models
Downloading English → French (1.0) ...
Downloading English → German (1.0) ...
Downloading English → Italian (1.0) ...
Downloading English → Spanish (1.0) ...
Downloading French → English (1.0) ...
Downloading German → English (1.0) ...
Downloading Italian → English (1.0) ...
Downloading Spanish → English (1.0) ...
Loaded support for 5 languages (8 models total)!
Running on http://0.0.0.0:5000
ghcr.io/wotschofsky/discord-live-translator/stt log:
2023-08-30T00:42:38.659Z` INFO [stt] Starting server at http://127.0.0.1:8000
2023-08-30T00:42:38.660Z INFO [actix_server::builder] starting 1 workers
2023-08-30T00:42:38.660Z INFO [actix_server::server] Actix runtime found; starting in Actix runtime
whisper_init_from_file_no_state: loading model from 'models/ggml-small.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab = 51865
whisper_model_load: n_audio_ctx = 1500
whisper_model_load: n_audio_state = 768
whisper_model_load: n_audio_head = 12
whisper_model_load: n_audio_layer = 12
whisper_model_load: n_text_ctx = 448
whisper_model_load: n_text_state = 768
whisper_model_load: n_text_head = 12
whisper_model_load: n_text_layer = 12
whisper_model_load: n_mels = 80
whisper_model_load: ftype = 1
whisper_model_load: qntvr = 0
whisper_model_load: type = 3
whisper_model_load: mem required = 743.00 MB (+ 16.00 MB per decoder)
whisper_model_load: adding 1608 extra tokens
2023-08-30T00:44:35.718Z INFO [stt] Starting server at http://127.0.0.1:8000
2023-08-30T00:44:35.719Z INFO [actix_server::builder] starting 1 workers
2023-08-30T00:44:35.719Z INFO [actix_server::server] Actix runtime found; starting in Actix runtime
The problems begin as someone starts speaking. One can see in the logs that voice is being recorded, but the following error pops up in the ghcr.io/wotschofsky/discord-live-translator log:
[2023-08-30T00:44:31.969Z] Started recording 301695752688893952 to /app/cache/rec/301695752688893952_1693356271955.wav
[2023-08-30T00:44:32.332Z] Successfully finished recording 301695752688893952 to /app/cache/rec/301695752688893952_1693356271955.wav
[2023-08-30T00:44:32.333Z] Analyzing "/app/cache/rec/301695752688893952_1693356271955.wav"...
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at recognizeRecording (/app/src/processors/recognizeRecording.ts:11:20)
at _SpeakingMap.<anonymous> (/app/src/commands/join.ts:99:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Any thoughts on what might be going on and how to resolve it? I'm a complete newbie to docker, so I figured before I poke at things further; I'd consult the oracles. :D
Best regards,
yours truely.