29 lines
1.2 KiB
Docker
29 lines
1.2 KiB
Docker
FROM python
|
|
|
|
ARG WHISPER_MODEL medium
|
|
# this can be tiny, base, small, medium, large
|
|
ARG WHISPER_SPEEDUP False
|
|
# this adds the option -su "speed up audio by x2 (reduced accuracy)"
|
|
ARG WHISPER_THREADS 4
|
|
# number of threads to use during computation
|
|
ARG WHISPER_PROCESSORS 1
|
|
# number of processors to use during computation
|
|
|
|
ARG PROCADDEDMEDIA True
|
|
# will gen subtitles for all media added regardless of existing external/embedded subtitles
|
|
ARG PROCMEDIAONPLAY True
|
|
# will gen subtitles for all played media regardless of existing external/embedded subtitles
|
|
ARG NAMESUBLANG aa
|
|
# use 2 letter codes @ https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes // makes it easier to see which subtitles are generated by subgen -- names file like: "Community - S03E18 - Course Listing Unavailable.aa.subgen.srt"
|
|
ARG UPDATEREPO True
|
|
# pulls and merges whisper.cpp on every start
|
|
|
|
RUN apt-get update && apt-get install -y ffmpeg git gcc
|
|
|
|
RUN pip3 install webhook_listener
|
|
EXPOSE 8090
|
|
|
|
COPY ./subgen/subgen.py /
|
|
|
|
CMD [ "python3", "-u", "/subgen.py", "$WHISPER_MODEL", "$WHISPER_SPEEDUP", "$WHISPER_THREADS", "$WHISPER_PROCESSORS", "$PROCADDEDMEDIA", "$PROCMEDIAONPLAY", "$NAMESUBLANG", "$UPDATEREPO"]
|