diff --git a/README.md b/README.md index 354b925..08baa55 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ > HTTP wrapper around [openai/whisper](https://github.com/openai/whisper). - -> ⚠️ WARNING: The latest version has an unsolved bug and will not work until [issue #75](https://github.com/bellingcat/whisperbox-transcribe/issues/75) can be solved, help is welcome! - ## Overview This project wraps OpenAI's `whisper` speech-to-text models with a HTTP API. diff --git a/app/worker/main.py b/app/worker/main.py index edff4f4..d767d78 100644 --- a/app/worker/main.py +++ b/app/worker/main.py @@ -67,11 +67,11 @@ def transcribe(self: TranscribeTask, job_id: UUID) -> None: job = session.query(models.Job).filter(models.Job.id == job_id).one_or_none() if job is None: - logger.warn("[{job.id}]: Received unknown job, abort.") + logger.warn("[unknown]: Received unknown job, abort.") return if job.status in [models.JobStatus.error, models.JobStatus.success]: - logger.warn("[{job.id}]: job has already been processed, abort.") + logger.warn(f"[{job.id}]: job has already been processed, abort.") return logger.debug(f"[{job.id}]: start processing {job.type} job.") diff --git a/conf/rabbitmq.conf b/conf/rabbitmq.conf index fad073a..6c46b6d 100644 --- a/conf/rabbitmq.conf +++ b/conf/rabbitmq.conf @@ -1 +1,2 @@ vm_memory_high_watermark.absolute = 192MB +consumer_timeout = 31622400000 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 04fe4c5..f270763 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -24,7 +24,7 @@ services: - "traefik.http.routers.web.rule=(Host(`${TRAEFIK_DOMAIN}`))" worker: - command: watchmedo auto-restart -d app/worker -p *.py --recursive celery -- --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool solo + command: watchmedo auto-restart -d app/worker -p *.py --recursive celery -- --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool prefork volumes: - ./:/etc/whisperbox-transcribe/ diff --git a/pyproject.toml b/pyproject.toml index 1d15440..379716e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "whisperbox-transcribe" description = "" -version = "1.0.0" +version = "1.0.1" dependencies=[ "celery ==5.3.6", diff --git a/worker.Dockerfile b/worker.Dockerfile index d20d19e..4be2151 100644 --- a/worker.Dockerfile +++ b/worker.Dockerfile @@ -28,4 +28,4 @@ RUN python download_models.py ${WHISPER_MODEL} COPY app ./app -CMD celery --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool=solo +CMD celery --app=app.worker.main.celery worker --loglevel=info --pool=prefork --concurrency=1 diff --git a/worker.gpu.Dockerfile b/worker.gpu.Dockerfile index 37000de..794e72f 100644 --- a/worker.gpu.Dockerfile +++ b/worker.gpu.Dockerfile @@ -36,4 +36,4 @@ ENV PATH /opt/venv/bin:$PATH COPY scripts/download_models.py . RUN python download_models.py ${WHISPER_MODEL} -CMD celery --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool=solo +CMD celery --app=app.worker.main.celery worker --loglevel=info --concurrency=1 --pool=prefork