pluja / whishper

Transcribe any audio to text, translate and edit subtitles 100% locally with a web UI. Powered by whisper models!

Home Page:https://whishper.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Potential Bug - Potential User Error

eyalspier opened this issue · comments

Description

I cannot see any languages when attempting to translate. I can only chose from an empty list

To Reproduce

Steps to reproduce the behavior:
I have the following in my docker-compose.yaml:

 whishper-backend:
      container_name: whishper-backend
      image: pluja/whishper-backend:latest
      env_file:
        - ${USERDIR}/docker/whishper_data/.env
      volumes:
        - ${USERDIR}/docker/whishper_data/uploads:/app/uploads
      restart: unless-stopped
      depends_on:
        mongo:
          condition: service_healthy
      healthcheck:
        test: curl --fail http://localhost:8080/api/transcriptions || exit 1
        interval: 2s
        timeout: 2s
        retries: 5
      expose:
        - 8080
    whishper-frontend:
      container_name: whishper-web
      image: pluja/whishper-frontend:latest
      env_file:
        - ${USERDIR}/docker/whishper_data/.env
      restart: unless-stopped
      environment:
        PUBLIC_INTERNAL_API_HOST: "http://nginx:80"
        PUBLIC_TRANSLATION_API_HOST: ""
        PUBLIC_API_HOST: ${WHISHPER_HOST:-}
        PUBLIC_WHISHPER_PROFILE: ${COMPOSE_PROFILES:-false}
      expose:
        - 3000
    nginx:
      image: nginx:1
      container_name: whishper
      restart: unless-stopped
      labels:
        - swag=enable
      volumes:
        - ${USERDIR}/docker/whishper_data/nginx.conf:/etc/nginx/nginx.conf
        - ${USERDIR}/docker/whishper_data/uploads:/app/uploads
      depends_on:
        whishper-backend:
          condition: service_healthy
      ports:
        - 8082:80    
    transcription-api:
      container_name: whisper-api
#      profiles: ["cpu"]
      image: pluja/whishper-transcription-api:latest
      env_file:
        - ${USERDIR}/docker/whishper_data/.env
      volumes:
        - ${USERDIR}/docker/whishper_data/whisper_models:/app/models
        - ${USERDIR}/docker/whishper_data/uploads:/app/uploads
      environment:
        - WHISPER_MODELS_DIR=/app/models
        - UPLOAD_DIR=/app/uploads
      restart: unless-stopped
      expose:
        - 8000
    translate:
      container_name: whisper-libretranslate
#      profiles: ["cpu"]
      image: libretranslate/libretranslate:latest
      restart: unless-stopped
      volumes:
        - ${USERDIR}/docker/whishper_data/libretranslate/data:/home/libretranslate/.local/share
        - ${USERDIR}/docker/whishper_data/libretranslate/cache:/home/libretranslate/.local/cache
      env_file:
        - ${USERDIR}/docker/whishper_data/.env
      tty: true
      environment:
        LT_DISABLE_WEB_UI: "True"
        #LT_UPDATE_MODELS: True
      expose:
        - 5000
      healthcheck:
        test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
        interval: 2s
        timeout: 3s
        retries: 5

And the following simple config:

# PROFILE
COMPOSE_PROFILES=cpu # set to 'gpu' if you have GPU with cuda support, read https://whishper.net/guides/gpu

# Libretranslate Configuration
LT_LOAD_ONLY=es,en,fr,nb

# Whisper Configuration
WHISPER_MODELS=tiny,small
WHISHPER_HOST=http://whishper:8082

# Database Configuration
DB_USER=whishper
DB_PASS=whishper

As far as I can see this is a base installation for a cpu setup (except for the SWAG label for my reverse proxying of the nginx container and the container names. Everything else works fantastically though!

I see you are using a modified version of the current docker-compose.yml file. Could you try setting up using instructions in whishper.net?

When I set it up using the instructions, it failed to start the API and Translate containers - I had to modify those pieces accordingly. One I did that (and some minor changes regarding volume paths and the mentioned Swag linking), it worked and the transcriptions also function. I also see based on the logs that the language pairs are downloaded correctly. I just cannot seem to access them through the front end.

What difference in particular do you think could cause this? Maybe I can find a workaround to move it back to the base version!
Thanks again for your help!

Have you set the Libretranslate directories with correct permissions? It seems like you are using a different path for the data than where the compose is.

All the libre translate directories and files should be owned by 1032 user and group. So you should run:

chown -R 1032:1032 path/to/whishper_data/libretranslate

Correct, I just double checked. All folders and subfolders of the libretranslate path are set to 1032. Are there any other suggestions of what I could double-check here?
Thanks again for your help!

What do you see when you visit http://localhost:8082/languages?

Hi there,
I get the nginx 502 bad gateway error there. I assume this is related? Any ideas what I'm doing wrong?
Thanks again and kind regards,
Eyal

Hi, sorry for my late reply. Could you provoke the error and send here the logs you get from docker compose logs -f --tail 50?

No worries - I looked at it again right after you wrote, and realized that the "DISABLE_WEB_UI" option was set to True. I commented out that line and it worked.
I honestly don't remember when I set that to True or why, so apologies for the inconvenience!

@eyalspier can you please try the latest version released? It should fix problems with Libretranslate not downloading models after the first start.

You must update the docker-compose or reinstall using the get-whishper.sh script. Please take a look at the release page. Containers have changed in v3.

Hi there,
I tried it now, and so far it looks like it works perfectly!

Also I just discovered how powerful the edit feature is - amazing work!!!