This commit is contained in:
Niklas Mueller 2024-07-23 18:23:54 +02:00
commit 7325f650b6
6 changed files with 109 additions and 0 deletions

18
README.md Normal file
View file

@ -0,0 +1,18 @@
# STT-Function
With the Speech-to-Text (STT) Function you can transcribe a file ("convert" an audio/video file into text).
Internally Whisper from OpenAI (https://github.com/openai/whisper) is used to transcribe the audiofile.
## Structure
* The container has two folders attached, the input folder with files that should be transcribed and the output path, where the transcript should be saved to.
## Setup
Make sure [Podman](https://podman.io/docs/installation) or [Docker](https://docs.docker.com/get-docker/) is installed.
Download the Model into the Folder where you will build the container image. [Download Link](https://openaipublic.azureedge.net/main/whisper/models/e5b1a55b89c1367dacf97e3e19bfd829a01529dbfdeefa8caeb59b3f1b81dadb/large-v3.pt) or run `wget https://openaipublic.azureedge.net/main/whisper/models/e5b1a55b89c1367dacf97e3e19bfd829a01529dbfdeefa8caeb59b3f1b81dadb/large-v3.pt`
```
podman build -t stt-function .
podman run -e LANGUAGE_CODE='de' -e WHISPER_MODEL='tiny' -v '/path/to/audio_video/file/':/app/input_files/ -v /output_path/of/transcript/:/app/transcripts/ --name stt-function_container --rm -t stt-function
```