Skip to content

Commit

Permalink
Adding README for self-hosted models
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleks committed Apr 1, 2024
1 parent 4422e79 commit d3b304c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,21 @@ with open("youtube_video_output.json", "w", encoding="utf-8") as f:
json.dump(r_json, f, indent=4, ensure_ascii=False)
```

## Running Local Models

To run the API with local models, you need to mount a volume to the container or
include the models in the image. You then need to modify the `.env` file to point to the local model,
as shown below:

```
WHISPER_MODEL="/app/models/custom"
```

Note that if you're using the `tensorrt_llm` whisper engine, and these are not located in the
container, the default directory these models will be saved to is `/app/src/wordcab_transcribe/whisper_models`.
If you're saving/mounting models to this directory, be sure to see the supported models in the `.env` file,
so your self-hosted model does not conflict with the default model names.

## 🚀 Contributing

### Getting started
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"tensorrt_llm==0.9.0.dev2024032600",
"Cython==3.0.10",
"youtokentome @ git+https://github.com/gburlet/YouTokenToMe.git@dependencies",
"deepmultilingualpunctuation==1.0.1",
"nemo_toolkit[asr]==1.23.0",
"tensorrt_llm==0.9.0.dev2024032600",
"aiohttp==3.9.3",
"aiofiles==23.2.1",
"boto3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def __call__(
str(processed_audio_filepath),
num_speakers=oracle_num_speakers,
out_dir=temp_dir,
num_workers=1,
num_workers=0,
)

segments = self.convert_annotation_to_segments(annotation)
Expand Down

0 comments on commit d3b304c

Please sign in to comment.