Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/cuda-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@ jobs:
use-local-cache: false
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
- uses: astral-sh/setup-uv@v8.2.0
- name: Install zlib (vcpkg, static — libtranscribe requires it)
# Identical to wheel-windows: static-md so no zlib1.dll exists for
# delvewheel to vendor; forward slashes because CMAKE_ARGS passes
# through scikit-build-core's CMakeInit.txt where backslashes are
# eaten as escapes.
run: |
vcpkg install zlib:x64-windows-static-md
$tc = "$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -replace '\\','/'
Add-Content $env:GITHUB_ENV "CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=$tc -DVCPKG_TARGET_TRIPLET=x64-windows-static-md"
- uses: ./.github/actions/fetch-canary
with:
hf-token: ${{ secrets.HF_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/native-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- uses: astral-sh/setup-uv@v8.2.0 # fixtures are generated via uv
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev ccache
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build ccache
- name: Install build deps (macOS)
if: runner.os == 'macOS'
run: |
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0 # fixtures are generated via uv
- name: Install build deps
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev ccache
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build ccache
- name: CPU ISA signature (segregates ccache across the heterogeneous fleet)
# ggml builds with -march=native here (the dev posture under test);
# ccache hashes the literal flag, not the ISA it resolves to, so a
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Install build deps (Vulkan SDK pieces + patchelf)
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build zlib1g-dev \
sudo apt-get install -y cmake ninja-build \
libvulkan-dev glslc spirv-headers patchelf ccache
- name: CPU ISA signature (segregates ccache across the heterogeneous fleet)
# ggml builds with -march=native here (the dev posture under test);
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: astral-sh/setup-uv@v8.2.0
- name: Install build deps
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build
- name: Dry-run transcribe-cpp-sys (full verify build, as cargo would publish it)
run: cargo publish --dry-run --allow-dirty -p transcribe-cpp-sys
- uses: ./.github/actions/fetch-canary
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: astral-sh/setup-uv@v8.2.0 # fetch-canary + the packed-smoke script
- name: Install build deps
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build
- name: Dry-run transcribe-cpp-sys (full verify build, as cargo would publish it)
run: cargo publish --dry-run --allow-dirty -p transcribe-cpp-sys
# The safe crate cannot be dry-run-verified pre-publish: it depends on
Expand Down Expand Up @@ -446,7 +446,7 @@ jobs:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- name: Install build deps
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build
- name: Publish transcribe-cpp-sys (the native-carrying crate; verifies the build)
run: cargo publish -p transcribe-cpp-sys
- name: Publish transcribe-cpp (the safe wrapper; resolves the just-published sys)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
- name: Install build deps
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev ccache
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build ccache
- name: CPU ISA signature (segregates ccache across the heterogeneous fleet)
# ggml builds with -march=native here (the dev posture under test);
# ccache hashes the literal flag, not the ISA it resolves to, so a
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:

wheel-windows:
# Blacksmith Windows Server 2025 (public beta) — same image family as
# GitHub's windows-2025, so vcvars/vcpkg/the Vulkan SDK installer behave
# GitHub's windows-2025, so vcvars and the Vulkan SDK installer behave
# identically. This lane is the overall long pole (MSVC over ggml + the
# fat-CPU tier matrix + Vulkan shaders) — expect a long wall-clock on
# 2vcpu; cost is the same as a bigger runner (per-vcpu-minute billing).
Expand Down Expand Up @@ -253,16 +253,6 @@ jobs:
- uses: ./.github/actions/fetch-canary
with:
hf-token: ${{ secrets.HF_TOKEN }}
- name: Install zlib (vcpkg, static — libtranscribe requires it)
# Static (-static-md: static lib, dynamic CRT) so no zlib1.dll exists
# at runtime and delvewheel has nothing to vendor for it. The
# toolchain file reaches scikit-build-core via CMAKE_ARGS.
run: |
vcpkg install zlib:x64-windows-static-md
# Forward slashes: CMAKE_ARGS values pass through scikit-build-core's
# CMakeInit.txt cache file, where backslashes are eaten as escapes.
$tc = "$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -replace '\\','/'
Add-Content $env:GITHUB_ENV "CMAKE_ARGS=-DCMAKE_TOOLCHAIN_FILE=$tc -DVCPKG_TARGET_TRIPLET=x64-windows-static-md"
- name: Build, repair, and test the wheel (cibuildwheel)
run: uvx --from "$env:CIBW_PIN" cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v7
Expand Down Expand Up @@ -318,7 +308,6 @@ jobs:
EOF
- name: Compile + transcribe from the sdist (no repo sources)
run: |
sudo apt-get update && sudo apt-get install -y zlib1g-dev
uv venv --seed sdist-venv --python 3.12
# The tarball is the only native source here: pip drives the full
# scikit-build-core compile (cmake/ninja arrive as build deps).
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ name: rust-ci
# the legs that can't catch a marshalling regression anyway.
#
# Windows joins here: the first cargo-driven MSVC build of this tree (static
# posture). cl.exe comes from msvc-dev-cmd, zlib from vcpkg as a static lib
# against the dynamic CRT (`x64-windows-static-md`, matching Rust's default /MD
# on x86_64-pc-windows-msvc), resolved by find_package(ZLIB) via
# CMAKE_PREFIX_PATH. The static Windows link manifest's zlib translation lives
# in cmake/transcribe-install.cmake.
# posture). cl.exe comes from msvc-dev-cmd; the build has no external library
# dependency to resolve (miniz is vendored into libtranscribe), so there is no
# vcpkg / CMAKE_PREFIX_PATH setup.
#
# Path filters follow native-ci.yml's shape: the binding's own tree plus the
# native paths it compiles from (binding behavior depends on the C side, so
Expand Down Expand Up @@ -176,7 +174,7 @@ jobs:
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> "$GITHUB_ENV"
- name: Install build deps (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build zlib1g-dev ccache
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build ccache
- name: Install build deps (macOS)
if: runner.os == 'macOS'
run: |
Expand All @@ -196,14 +194,6 @@ jobs:
shell: pwsh
run: |
choco install ninja --no-progress -y
# Static zlib against the DYNAMIC CRT (-static-md): matches Rust's
# default /MD on x86_64-pc-windows-msvc. A /MT (x64-windows-static)
# zlib would clash with the CRT rustc links. find_package(ZLIB)
# resolves it from CMAKE_PREFIX_PATH — no vcpkg toolchain file needed.
vcpkg install zlib:x64-windows-static-md
# Forward slashes: backslashes get eaten as escapes downstream.
$zlibPrefix = "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows-static-md" -replace '\\','/'
Add-Content $env:GITHUB_ENV "CMAKE_PREFIX_PATH=$zlibPrefix"
# cmake-crate honors CMAKE_GENERATOR from the environment.
Add-Content $env:GITHUB_ENV "CMAKE_GENERATOR=Ninja"
- name: CPU ISA signature (segregates ccache across the heterogeneous fleet)
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/typescript-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
# its deps), then retries with LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, which
# does — so the package-local layout the loader/pack-platform ship is
# exactly what this exercises. transcribe.dll is a RUNTIME artifact
# (build-shared/bin, not src). MSVC + Ninja + vcpkg zlib mirror rust-ci's
# (build-shared/bin, not src). MSVC + Ninja mirror rust-ci's
# Windows leg; no ccache there, so it's a cold ggml build every run.
- label: windows-x64
runner: blacksmith-2vcpu-windows-2025
Expand All @@ -121,8 +121,7 @@ jobs:
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build ccache
# Windows toolchain mirrors rust-ci's Windows leg: cl.exe ambient for the
# Ninja generator (else CMake silently falls back to the image's MinGW gcc),
# and static zlib against the dynamic CRT resolved via CMAKE_PREFIX_PATH.
# Ninja generator (else CMake silently falls back to the image's MinGW gcc).
- name: Set up MSVC (cl.exe on PATH for the Ninja generator)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -133,9 +132,6 @@ jobs:
shell: pwsh
run: |
choco install ninja --no-progress -y
vcpkg install zlib:x64-windows-static-md
$zlibPrefix = "$env:VCPKG_INSTALLATION_ROOT/installed/x64-windows-static-md" -replace '\\','/'
Add-Content $env:GITHUB_ENV "CMAKE_PREFIX_PATH=$zlibPrefix"
- name: Enable ccache launcher
if: runner.os == 'Linux'
run: |
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,13 @@ tools/transcribe-quantize/ Quantization tool source
docs/ Porting and validation guidance
scripts/ Python converter + test tooling
ggml/ Vendored ggml (see ggml/UPSTREAM for pinned SHA)
src/third_party/miniz/ Vendored miniz deflate codec (see its UPSTREAM file)
samples/ Test audio files
tests/ Unit and smoke tests
```

## License

transcribe.cpp is MIT-licensed. See [LICENSE](LICENSE) for details.
transcribe.cpp is MIT-licensed. See [LICENSE](LICENSE) for details. Vendored
third-party components (ggml, miniz — both MIT) are attributed in
[THIRD-PARTY-LICENSES.md](THIRD-PARTY-LICENSES.md).
83 changes: 83 additions & 0 deletions THIRD-PARTY-LICENSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Third-party licenses

transcribe.cpp is MIT-licensed (see [`LICENSE`](LICENSE)). It vendors and links
the third-party components below, each under its own permissive license. The
authoritative license text for each ships in-tree at the path noted; copies are
reproduced here for convenience.

| Component | License | Vendored at | Pin |
|-----------|---------|-------------|-----|
| ggml | MIT | [`ggml/LICENSE`](ggml/LICENSE) | see [`ggml/UPSTREAM`](ggml/UPSTREAM) |
| miniz | MIT | [`src/third_party/miniz/LICENSE`](src/third_party/miniz/LICENSE) | see [`src/third_party/miniz/UPSTREAM`](src/third_party/miniz/UPSTREAM) |

Prebuilt artifacts (the Swift xcframework, the native Python wheels, and the
npm platform packages) carry these same texts alongside the binaries — see each
binding's packaging for the bundled `LICENSE.ggml` / `LICENSE.miniz` files.

---

## ggml

The tensor library underlying transcribe.cpp. Vendored under `ggml/`.

```
MIT License

Copyright (c) 2023-2026 The ggml authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

---

## miniz

A single-file deflate/inflate (zlib-subset) codec. transcribe.cpp uses it only
for Whisper's temperature-fallback compression-ratio heuristic; it replaces the
previous system-zlib dependency. Vendored under `src/third_party/miniz/`.

miniz is MIT-licensed. (The comment block at the top of the amalgamated
`miniz.c` / `miniz.h` still reads "public domain" — a stale artifact from the
project's pre-relicensing history; upstream's current and authoritative license
is the MIT text below, also shipped at `src/third_party/miniz/LICENSE`.)

```
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC

All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
22 changes: 22 additions & 0 deletions bindings/python-native-cu12/LICENSE-miniz
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC

All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
4 changes: 2 additions & 2 deletions bindings/python-native-cu12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ description = "CUDA 12 native provider for transcribe-cpp (speech-to-text, ggml)
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
# Copies of the repo + ggml licenses (PEP 639 paths cannot escape the
# Copies of the repo + ggml + miniz licenses (PEP 639 paths cannot escape the
# project directory; texts are static).
license-files = ["LICENSE", "LICENSE-ggml"]
license-files = ["LICENSE", "LICENSE-ggml", "LICENSE-miniz"]
authors = [{ name = "The transcribe.cpp authors" }]
keywords = ["transcription", "speech-to-text", "asr", "ggml", "cuda"]
classifiers = [
Expand Down
10 changes: 4 additions & 6 deletions bindings/rust/sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ this crate.

## Build prerequisites

A C++ toolchain, **CMake**, and **zlib**. zlib is system-provided on Linux
(`zlib1g-dev`) and macOS; on Windows install it with
`vcpkg install zlib:x64-windows-static-md` (static lib against the dynamic CRT,
matching Rust's default `/MD` on `x86_64-pc-windows-msvc`) and point
`CMAKE_PREFIX_PATH` at the vcpkg install tree. The static link is the default;
the `shared` feature links a shared library instead.
A C++ toolchain and **CMake**. There is no external compression dependency —
the deflate codec (miniz) is vendored into the library, so no system zlib /
vcpkg setup is required on any platform. The static link is the default; the
`shared` feature links a shared library instead.

## Features

Expand Down
8 changes: 4 additions & 4 deletions bindings/rust/transcribe-cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ cargo add transcribe-cpp
```

The native library is compiled from source by the `transcribe-cpp-sys` crate, so
a first build needs a C++ toolchain, **CMake**, and **zlib** (system zlib on
Linux/macOS; on Windows, `vcpkg install zlib:x64-windows-static-md` and point
`CMAKE_PREFIX_PATH` at it). No prebuilt download and no environment variables on
the happy path.
a first build needs a C++ toolchain and **CMake**. There is no external
compression dependency (the deflate codec is vendored), so no system zlib /
vcpkg setup is required on any platform. No prebuilt download and no environment
variables on the happy path.

## Quickstart

Expand Down
32 changes: 31 additions & 1 deletion bindings/swift/THIRD-PARTY-LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The prebuilt native artifact (`TranscribeCpp.xcframework`) statically links the
following third-party code. Their license texts travel inside the xcframework
(`LICENSE.ggml`) and are reproduced here.
(`LICENSE.ggml`, `LICENSE.miniz`) and are reproduced here.

## ggml

Expand Down Expand Up @@ -33,4 +33,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## miniz

`miniz` (the vendored single-file deflate codec used for Whisper's
compression-ratio heuristic) is compiled into the native artifact.

```
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC

All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```

transcribe.cpp itself is MIT-licensed; see `LICENSE`.
Loading
Loading