Skip to content

Commit a3d64de

Browse files
author
skitsanos
committed
docs: Add binary distribution guide and dylib troubleshooting
1 parent 8278018 commit a3d64de

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,34 @@ DIARIZE_SEGMENTATION_MODEL=.cache/sherpa-onnx-pyannote-segmentation-3-0/model.on
116116
DIARIZE_EMBEDDING_MODEL=.cache/wespeaker_en_voxceleb_CAM++.onnx
117117
```
118118

119+
## Binary distribution
120+
121+
Pre-built binaries can be deployed without Rust or build tools. The binary needs FFmpeg on PATH and the sherpa-onnx shared libraries alongside it:
122+
123+
```
124+
transcribeit # binary
125+
lib/ # sherpa-onnx shared libraries
126+
libsherpa-onnx-c-api.dylib
127+
libonnxruntime.dylib
128+
```
129+
130+
On first run, use `transcribeit setup` to download models and additional components. The binary looks for shared libraries in `lib/` relative to itself — no environment variables needed at runtime.
131+
132+
To build a distributable binary:
133+
134+
```bash
135+
cargo build --release
136+
# Copy binary + libs
137+
cp target/release/transcribeit dist/
138+
cp vendor/sherpa-onnx-*/lib/lib*.dylib dist/lib/
139+
```
140+
141+
To build without sherpa-onnx (no shared library dependency):
142+
143+
```bash
144+
cargo build --release --no-default-features
145+
```
146+
119147
## License
120148

121149
This project is licensed under the [Business Source License 1.1](LICENSE).

docs/troubleshooting.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,28 @@ Fix:
213213
SenseVoice models are capable of detecting emotions and audio events (laughter, applause, music, etc.), but the sherpa-onnx C API strips these tags from the output. Only the transcription text is available. This is a limitation of the sherpa-onnx C-level bindings, not of transcribeit.
214214

215215
Additionally, the SenseVoice 2025 model is a quality regression compared to the 2024 version. Prefer using the 2024 SenseVoice model for best results.
216+
217+
### Binary fails with "Library not loaded: libsherpa-onnx-c-api.dylib"
218+
219+
Symptoms:
220+
- `dyld: Library not loaded: @rpath/libsherpa-onnx-c-api.dylib`
221+
- Binary crashes immediately on startup
222+
223+
Fix: The binary expects sherpa-onnx shared libraries in a `lib/` directory next to itself:
224+
225+
```
226+
transcribeit # binary
227+
lib/ # create this directory
228+
libsherpa-onnx-c-api.dylib
229+
libonnxruntime.dylib
230+
libonnxruntime.1.23.2.dylib
231+
```
232+
233+
Copy the dylibs from `vendor/sherpa-onnx-*/lib/` or download them with `transcribeit setup -c sherpa-libs`.
234+
235+
If you see a hardcoded path from another machine (e.g., `/Users/someone/...`), the binary was built with an old `build.rs`. Rebuild with the latest code — the portable `@executable_path/lib` rpath is now used.
236+
237+
To avoid this dependency entirely, build without sherpa-onnx:
238+
```bash
239+
cargo build --release --no-default-features
240+
```

0 commit comments

Comments
 (0)