crispasr 0.8.22__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 The ggml authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,128 @@
1
+ Metadata-Version: 2.4
2
+ Name: crispasr
3
+ Version: 0.8.22
4
+ Summary: Lightweight on-device speech recognition via ggml — Python bindings for CrispASR (Whisper, Qwen3-ASR, FastConformer, Canary, Parakeet, Cohere, Granite, Voxtral, wav2vec2, and more).
5
+ Author: CrispASR contributors
6
+ License: MIT License
7
+
8
+ Copyright (c) 2023-2026 The ggml authors
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/CrispStrobe/CrispASR
29
+ Project-URL: Repository, https://github.com/CrispStrobe/CrispASR
30
+ Project-URL: Issues, https://github.com/CrispStrobe/CrispASR/issues
31
+ Project-URL: Changelog, https://github.com/CrispStrobe/CrispASR/blob/main/HISTORY.md
32
+ Keywords: asr,speech-recognition,whisper,ggml,speech-to-text,transcription
33
+ Classifier: Development Status :: 4 - Beta
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Operating System :: MacOS :: MacOS X
37
+ Classifier: Operating System :: POSIX :: Linux
38
+ Classifier: Operating System :: Microsoft :: Windows
39
+ Classifier: Programming Language :: Python :: 3
40
+ Classifier: Programming Language :: Python :: 3.8
41
+ Classifier: Programming Language :: Python :: 3.9
42
+ Classifier: Programming Language :: Python :: 3.10
43
+ Classifier: Programming Language :: Python :: 3.11
44
+ Classifier: Programming Language :: Python :: 3.12
45
+ Classifier: Programming Language :: Python :: 3.13
46
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
47
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
48
+ Requires-Python: >=3.8
49
+ Description-Content-Type: text/markdown
50
+ License-File: LICENSE
51
+ Requires-Dist: numpy>=1.20
52
+ Provides-Extra: test
53
+ Requires-Dist: pytest>=7; extra == "test"
54
+ Dynamic: license-file
55
+
56
+ # crispasr
57
+
58
+ Python bindings for [CrispASR](https://github.com/CrispStrobe/CrispASR) — lightweight on-device speech recognition via ggml.
59
+
60
+ Supports 17 ASR backends including Whisper, Qwen3-ASR, FastConformer, Canary, Parakeet, Cohere, Granite-Speech, Voxtral, wav2vec2, GLM-ASR, Kyutai-STT, Moonshine, FireRed, OmniASR, and VibeVoice-ASR.
61
+
62
+ ## Install
63
+
64
+ ```bash
65
+ pip install crispasr
66
+ ```
67
+
68
+ This wheel is **pure Python** and does **not** bundle the native library — install `libcrispasr` separately, the same way `crispasr`'s Python bindings work:
69
+
70
+ **macOS**
71
+ ```bash
72
+ brew install crispasr # once published; until then build from source
73
+ ```
74
+
75
+ **Linux / Windows / from source**
76
+ ```bash
77
+ git clone https://github.com/CrispStrobe/CrispASR
78
+ cd CrispASR
79
+ cmake -B build && cmake --build build -j
80
+ sudo cmake --install build # installs libcrispasr.{so,dylib,dll}
81
+ ```
82
+
83
+ If `libcrispasr` is in a non-standard location, set `CRISPASR_LIB_PATH`:
84
+
85
+ ```bash
86
+ export CRISPASR_LIB_PATH=/path/to/libcrispasr.so
87
+ ```
88
+
89
+ ## Quick start
90
+
91
+ ```python
92
+ from crispasr import CrispASR
93
+
94
+ model = CrispASR("ggml-base.en.bin")
95
+ for seg in model.transcribe("audio.wav"):
96
+ print(f"[{seg.start:.1f}s - {seg.end:.1f}s] {seg.text}")
97
+ model.close()
98
+ ```
99
+
100
+ Or use the unified `Session` API for non-Whisper backends (Qwen3-ASR, FastConformer, Parakeet, …):
101
+
102
+ ```python
103
+ from crispasr import Session
104
+
105
+ s = Session("qwen3-asr-0.6b-q4_k.gguf")
106
+ for seg in s.transcribe_pcm(pcm_f32, sample_rate=16000):
107
+ print(seg.text)
108
+ ```
109
+
110
+ ## API
111
+
112
+ - `CrispASR` — Whisper-compatible high-level API
113
+ - `Session` — unified API across all 17 backends
114
+ - `align_words(...)` — word-level CTC alignment
115
+ - `diarize_segments(...)` — speaker diarization (energy / xcorr / vad-turns / pyannote)
116
+ - `SpeakerEmbedder(spec)` — pluggable embedder ("auto"/"titanet", "indextts"/"ecapa", or a `.gguf` path)
117
+ - `PyannoteCache(pcm, model)` — pre-computed pyannote-seg posteriors for cross-slice consistency
118
+ - `agglomerative_cluster(embeddings, ...)` — single-linkage cosine clustering for globally stable speaker IDs
119
+ - `TitaNet` / `SpeakerDB` — standalone speaker verification + closed-roster profile matching (consent-gated; requires `expected_names` + `consent=True`, see docs/diarization-speakers.md)
120
+ - `detect_language_pcm(...)` — language ID
121
+ - `registry_lookup(...)` — auto-download known models from the model hub
122
+ - `registry_default_bundle(...)` — enumerate the exact primary, companion, and extra files used by `-m auto`, including licence-acceptance policy
123
+
124
+ See the [main repo](https://github.com/CrispStrobe/CrispASR) for full documentation, model registry, and CLI.
125
+
126
+ ## License
127
+
128
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,73 @@
1
+ # crispasr
2
+
3
+ Python bindings for [CrispASR](https://github.com/CrispStrobe/CrispASR) — lightweight on-device speech recognition via ggml.
4
+
5
+ Supports 17 ASR backends including Whisper, Qwen3-ASR, FastConformer, Canary, Parakeet, Cohere, Granite-Speech, Voxtral, wav2vec2, GLM-ASR, Kyutai-STT, Moonshine, FireRed, OmniASR, and VibeVoice-ASR.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install crispasr
11
+ ```
12
+
13
+ This wheel is **pure Python** and does **not** bundle the native library — install `libcrispasr` separately, the same way `crispasr`'s Python bindings work:
14
+
15
+ **macOS**
16
+ ```bash
17
+ brew install crispasr # once published; until then build from source
18
+ ```
19
+
20
+ **Linux / Windows / from source**
21
+ ```bash
22
+ git clone https://github.com/CrispStrobe/CrispASR
23
+ cd CrispASR
24
+ cmake -B build && cmake --build build -j
25
+ sudo cmake --install build # installs libcrispasr.{so,dylib,dll}
26
+ ```
27
+
28
+ If `libcrispasr` is in a non-standard location, set `CRISPASR_LIB_PATH`:
29
+
30
+ ```bash
31
+ export CRISPASR_LIB_PATH=/path/to/libcrispasr.so
32
+ ```
33
+
34
+ ## Quick start
35
+
36
+ ```python
37
+ from crispasr import CrispASR
38
+
39
+ model = CrispASR("ggml-base.en.bin")
40
+ for seg in model.transcribe("audio.wav"):
41
+ print(f"[{seg.start:.1f}s - {seg.end:.1f}s] {seg.text}")
42
+ model.close()
43
+ ```
44
+
45
+ Or use the unified `Session` API for non-Whisper backends (Qwen3-ASR, FastConformer, Parakeet, …):
46
+
47
+ ```python
48
+ from crispasr import Session
49
+
50
+ s = Session("qwen3-asr-0.6b-q4_k.gguf")
51
+ for seg in s.transcribe_pcm(pcm_f32, sample_rate=16000):
52
+ print(seg.text)
53
+ ```
54
+
55
+ ## API
56
+
57
+ - `CrispASR` — Whisper-compatible high-level API
58
+ - `Session` — unified API across all 17 backends
59
+ - `align_words(...)` — word-level CTC alignment
60
+ - `diarize_segments(...)` — speaker diarization (energy / xcorr / vad-turns / pyannote)
61
+ - `SpeakerEmbedder(spec)` — pluggable embedder ("auto"/"titanet", "indextts"/"ecapa", or a `.gguf` path)
62
+ - `PyannoteCache(pcm, model)` — pre-computed pyannote-seg posteriors for cross-slice consistency
63
+ - `agglomerative_cluster(embeddings, ...)` — single-linkage cosine clustering for globally stable speaker IDs
64
+ - `TitaNet` / `SpeakerDB` — standalone speaker verification + closed-roster profile matching (consent-gated; requires `expected_names` + `consent=True`, see docs/diarization-speakers.md)
65
+ - `detect_language_pcm(...)` — language ID
66
+ - `registry_lookup(...)` — auto-download known models from the model hub
67
+ - `registry_default_bundle(...)` — enumerate the exact primary, companion, and extra files used by `-m auto`, including licence-acceptance policy
68
+
69
+ See the [main repo](https://github.com/CrispStrobe/CrispASR) for full documentation, model registry, and CLI.
70
+
71
+ ## License
72
+
73
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,74 @@
1
+ """CrispASR — lightweight speech recognition via ggml."""
2
+
3
+ from ._binding import (
4
+ AlignedWord,
5
+ CrispASR,
6
+ DiarizeMethod,
7
+ DiarizeSegment,
8
+ KokoroResolved,
9
+ LidMethod,
10
+ LidResult,
11
+ Mic,
12
+ PyannoteCache,
13
+ RegistryArtifact,
14
+ RegistryBundle,
15
+ RegistryEntry,
16
+ Segment,
17
+ Session,
18
+ SessionSegment,
19
+ SessionWord,
20
+ SpeakerDB,
21
+ SpeakerEmbedder,
22
+ agglomerative_cluster,
23
+ align_words,
24
+ cache_dir,
25
+ cache_ensure_file,
26
+ detect_language_pcm,
27
+ diarize_segments,
28
+ kokoro_resolve_for_lang,
29
+ list_known_models,
30
+ mic_default_device_name,
31
+ registry_lookup,
32
+ registry_lookup_by_filename,
33
+ registry_default_bundle,
34
+ watermark_detect,
35
+ watermark_embed,
36
+ watermark_load_model,
37
+ )
38
+
39
+ __all__ = [
40
+ "AlignedWord",
41
+ "CrispASR",
42
+ "DiarizeMethod",
43
+ "DiarizeSegment",
44
+ "KokoroResolved",
45
+ "LidMethod",
46
+ "LidResult",
47
+ "Mic",
48
+ "PyannoteCache",
49
+ "RegistryArtifact",
50
+ "RegistryBundle",
51
+ "RegistryEntry",
52
+ "Segment",
53
+ "Session",
54
+ "SessionSegment",
55
+ "SessionWord",
56
+ "SpeakerDB",
57
+ "SpeakerEmbedder",
58
+ "agglomerative_cluster",
59
+ "align_words",
60
+ "cache_dir",
61
+ "cache_ensure_file",
62
+ "detect_language_pcm",
63
+ "diarize_segments",
64
+ "kokoro_resolve_for_lang",
65
+ "list_known_models",
66
+ "mic_default_device_name",
67
+ "registry_lookup",
68
+ "registry_lookup_by_filename",
69
+ "registry_default_bundle",
70
+ "watermark_detect",
71
+ "watermark_embed",
72
+ "watermark_load_model",
73
+ ]
74
+ __version__ = "0.8.22"