scribed 0.0.1__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.
Files changed (61) hide show
  1. scribed-0.0.1/.gitignore +120 -0
  2. scribed-0.0.1/LICENSE +21 -0
  3. scribed-0.0.1/PKG-INFO +213 -0
  4. scribed-0.0.1/README.md +164 -0
  5. scribed-0.0.1/pyproject.toml +193 -0
  6. scribed-0.0.1/scribed/__init__.py +173 -0
  7. scribed-0.0.1/scribed/__main__.py +45 -0
  8. scribed-0.0.1/scribed/backends/__init__.py +13 -0
  9. scribed-0.0.1/scribed/backends/_template/__init__.py +1 -0
  10. scribed-0.0.1/scribed/backends/_template/adapter.py +48 -0
  11. scribed-0.0.1/scribed/backends/_template/config.py +33 -0
  12. scribed-0.0.1/scribed/backends/assemblyai/__init__.py +1 -0
  13. scribed-0.0.1/scribed/backends/assemblyai/adapter.py +117 -0
  14. scribed-0.0.1/scribed/backends/assemblyai/config.py +37 -0
  15. scribed-0.0.1/scribed/backends/deepgram/__init__.py +1 -0
  16. scribed-0.0.1/scribed/backends/deepgram/adapter.py +207 -0
  17. scribed-0.0.1/scribed/backends/deepgram/config.py +34 -0
  18. scribed-0.0.1/scribed/backends/elevenlabs/__init__.py +1 -0
  19. scribed-0.0.1/scribed/backends/elevenlabs/adapter.py +154 -0
  20. scribed-0.0.1/scribed/backends/elevenlabs/config.py +36 -0
  21. scribed-0.0.1/scribed/backends/faster_whisper/__init__.py +1 -0
  22. scribed-0.0.1/scribed/backends/faster_whisper/adapter.py +85 -0
  23. scribed-0.0.1/scribed/backends/faster_whisper/config.py +42 -0
  24. scribed-0.0.1/scribed/backends/google_speech/__init__.py +1 -0
  25. scribed-0.0.1/scribed/backends/google_speech/adapter.py +152 -0
  26. scribed-0.0.1/scribed/backends/google_speech/config.py +46 -0
  27. scribed-0.0.1/scribed/backends/groq/__init__.py +1 -0
  28. scribed-0.0.1/scribed/backends/groq/adapter.py +92 -0
  29. scribed-0.0.1/scribed/backends/groq/config.py +35 -0
  30. scribed-0.0.1/scribed/backends/openai/__init__.py +1 -0
  31. scribed-0.0.1/scribed/backends/openai/adapter.py +91 -0
  32. scribed-0.0.1/scribed/backends/openai/config.py +28 -0
  33. scribed-0.0.1/scribed/backends/vosk/__init__.py +1 -0
  34. scribed-0.0.1/scribed/backends/vosk/adapter.py +158 -0
  35. scribed-0.0.1/scribed/backends/vosk/config.py +39 -0
  36. scribed-0.0.1/scribed/backends/whisper/__init__.py +1 -0
  37. scribed-0.0.1/scribed/backends/whisper/adapter.py +85 -0
  38. scribed-0.0.1/scribed/backends/whisper/config.py +38 -0
  39. scribed-0.0.1/scribed/backends/whispercpp/__init__.py +1 -0
  40. scribed-0.0.1/scribed/backends/whispercpp/adapter.py +88 -0
  41. scribed-0.0.1/scribed/backends/whispercpp/config.py +41 -0
  42. scribed-0.0.1/scribed/base.py +352 -0
  43. scribed-0.0.1/scribed/catalog.py +325 -0
  44. scribed-0.0.1/scribed/credentials.py +244 -0
  45. scribed-0.0.1/scribed/data/SCHEMA.md +65 -0
  46. scribed-0.0.1/scribed/data/backends.json +622 -0
  47. scribed-0.0.1/scribed/data/skills/scribed/SKILL.md +57 -0
  48. scribed-0.0.1/scribed/data/skills/scribed-add-backend/SKILL.md +102 -0
  49. scribed-0.0.1/scribed/data/skills/scribed-choose-backend/SKILL.md +51 -0
  50. scribed-0.0.1/scribed/data/skills/scribed-install-backend/SKILL.md +67 -0
  51. scribed-0.0.1/scribed/install.py +343 -0
  52. scribed-0.0.1/scribed/make_backend.py +375 -0
  53. scribed-0.0.1/scribed/registry.py +221 -0
  54. scribed-0.0.1/scribed/services.py +122 -0
  55. scribed-0.0.1/scribed/status.py +303 -0
  56. scribed-0.0.1/scribed/tools.py +269 -0
  57. scribed-0.0.1/scribed/translation.py +107 -0
  58. scribed-0.0.1/scribed/util.py +189 -0
  59. scribed-0.0.1/tests/__init__.py +0 -0
  60. scribed-0.0.1/tests/test_scribed.py +364 -0
  61. scribed-0.0.1/tests/util.py +23 -0
@@ -0,0 +1,120 @@
1
+ .claude/handoffs/
2
+ .claude/scratch/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+
10
+ .DS_Store
11
+ # C extensions
12
+ *.so
13
+
14
+ # TLS certificates
15
+ ## Ignore all PEM files anywhere
16
+ *.pem
17
+ ## Also ignore any certs directory
18
+ certs/
19
+
20
+ # Distribution / packaging
21
+ .Python
22
+ build/
23
+ develop-eggs/
24
+ dist/
25
+ downloads/
26
+ eggs/
27
+ .eggs/
28
+ lib/
29
+ lib64/
30
+ parts/
31
+ sdist/
32
+ var/
33
+ wheels/
34
+ *.egg-info/
35
+ .installed.cfg
36
+ *.egg
37
+ MANIFEST
38
+ _build
39
+
40
+ # PyInstaller
41
+ # Usually these files are written by a python script from a template
42
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
43
+ *.manifest
44
+ *.spec
45
+
46
+ # Installer logs
47
+ pip-log.txt
48
+ pip-delete-this-directory.txt
49
+
50
+ # Unit test / coverage reports
51
+ htmlcov/
52
+ .tox/
53
+ .coverage
54
+ .coverage.*
55
+ .cache
56
+ nosetests.xml
57
+ coverage.xml
58
+ *.cover
59
+ .hypothesis/
60
+ .pytest_cache/
61
+
62
+ # Translations
63
+ *.mo
64
+ *.pot
65
+
66
+ # Django stuff:
67
+ *.log
68
+ local_settings.py
69
+ db.sqlite3
70
+
71
+ # Flask stuff:
72
+ instance/
73
+ .webassets-cache
74
+
75
+ # Scrapy stuff:
76
+ .scrapy
77
+
78
+ # Sphinx documentation
79
+ docs/_build/
80
+ docs/*
81
+
82
+ # PyBuilder
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # pyenv
89
+ .python-version
90
+
91
+ # celery beat schedule file
92
+ celerybeat-schedule
93
+
94
+ # SageMath parsed files
95
+ *.sage.py
96
+
97
+ # Environments
98
+ .env
99
+ .venv
100
+ env/
101
+ venv/
102
+ ENV/
103
+ env.bak/
104
+ venv.bak/
105
+
106
+ # Spyder project settings
107
+ .spyderproject
108
+ .spyproject
109
+
110
+ # Rope project settings
111
+ .ropeproject
112
+
113
+ # mkdocs documentation
114
+ /site
115
+
116
+ # mypy
117
+ .mypy_cache/
118
+
119
+ # PyCharm
120
+ .idea
scribed-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thor Whalen
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.
scribed-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,213 @@
1
+ Metadata-Version: 2.4
2
+ Name: scribed
3
+ Version: 0.0.1
4
+ Summary: One facade over many speech-to-text (ASR) engines, plus a ledger to help you choose between them.
5
+ Project-URL: Homepage, https://github.com/thorwhalen/scribed
6
+ Project-URL: Repository, https://github.com/thorwhalen/scribed
7
+ Project-URL: Documentation, https://thorwhalen.github.io/scribed
8
+ Author: Thor Whalen
9
+ License: mit
10
+ License-File: LICENSE
11
+ Keywords: asr,audio-to-text,facade,speech-to-text,transcription,whisper
12
+ Requires-Python: >=3.10
13
+ Provides-Extra: assemblyai
14
+ Requires-Dist: assemblyai>=0.30; extra == 'assemblyai'
15
+ Provides-Extra: audio
16
+ Requires-Dist: numpy>=1.23; extra == 'audio'
17
+ Requires-Dist: soundfile>=0.12; extra == 'audio'
18
+ Provides-Extra: cli
19
+ Requires-Dist: argcomplete>=3; extra == 'cli'
20
+ Requires-Dist: argh>=0.30; extra == 'cli'
21
+ Provides-Extra: deepgram
22
+ Requires-Dist: deepgram-sdk<4,>=3; extra == 'deepgram'
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
25
+ Requires-Dist: pytest>=7.0; extra == 'dev'
26
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
27
+ Provides-Extra: docs
28
+ Requires-Dist: sphinx-rtd-theme>=1.0; extra == 'docs'
29
+ Requires-Dist: sphinx>=6.0; extra == 'docs'
30
+ Provides-Extra: elevenlabs
31
+ Requires-Dist: elevenlabs>=1.0; extra == 'elevenlabs'
32
+ Provides-Extra: faster-whisper
33
+ Requires-Dist: faster-whisper>=1.0; extra == 'faster-whisper'
34
+ Provides-Extra: google
35
+ Requires-Dist: google-cloud-speech>=2.21; extra == 'google'
36
+ Provides-Extra: groq
37
+ Requires-Dist: groq>=0.11; extra == 'groq'
38
+ Provides-Extra: openai
39
+ Requires-Dist: openai>=1; extra == 'openai'
40
+ Provides-Extra: table
41
+ Requires-Dist: pandas>=1.5; extra == 'table'
42
+ Provides-Extra: vosk
43
+ Requires-Dist: vosk>=0.3.45; extra == 'vosk'
44
+ Provides-Extra: whisper
45
+ Requires-Dist: openai-whisper>=20231117; extra == 'whisper'
46
+ Provides-Extra: whispercpp
47
+ Requires-Dist: pywhispercpp>=1.2; extra == 'whispercpp'
48
+ Description-Content-Type: text/markdown
49
+
50
+ # scribed
51
+
52
+ One façade over many speech-to-text (ASR) engines — plus a **ledger** to help you choose between them.
53
+
54
+ Transcription ("turn this audio into text") is solved a dozen ways: local engines
55
+ (Whisper, faster-whisper, whisper.cpp, Vosk), fast cheap cloud APIs (Groq, OpenAI),
56
+ and feature-rich premium services (Deepgram, AssemblyAI, Google, ElevenLabs) —
57
+ each with its own install, API, pricing, latency, language coverage, and
58
+ diarization quirks. `scribed` gives you a uniform call, a browsable catalog of
59
+ every option, and the tools to wrap any of them.
60
+
61
+ ```python
62
+ import scribed
63
+
64
+ text = scribed.transcribe_text("talk.mp3") # just the text, default backend
65
+ t = scribed.transcribe("talk.mp3") # full result: text + timed segments
66
+ print(t) # -> the transcript
67
+ print(t.srt) # -> SRT subtitles
68
+ for seg in t:
69
+ print(seg.start, seg.speaker, seg.text) # iterate timed (optionally diarized) segments
70
+ ```
71
+
72
+ The same call, the same `Transcript` back, no matter which engine ran.
73
+
74
+ ## Install
75
+
76
+ `import scribed` is dependency-free. Install only the backends you use, via extras:
77
+
78
+ ```bash
79
+ pip install "scribed[faster-whisper]" # local, free — recommended default
80
+ pip install "scribed[whispercpp]" # local, free, light (great on Apple Silicon)
81
+ pip install "scribed[vosk]" # local, free, streaming/offline
82
+ pip install "scribed[openai]" # cloud API (whisper-1 / gpt-4o-transcribe)
83
+ pip install "scribed[groq]" # cloud API — fastest & cheapest hosted Whisper
84
+ pip install "scribed[deepgram]" # cloud API — real-time + diarization
85
+ pip install "scribed[cli]" # the `scribed` command
86
+ ```
87
+
88
+ ## Backends that ship today
89
+
90
+ | Backend | `backend=` id | Local / Remote | Cost | Diarize | Stream | Notable |
91
+ |---|---|---|---|---|---|---|
92
+ | faster-whisper | `faster-whisper` | local | free | – | – | **Recommended local default** — Whisper via CTranslate2, no system ffmpeg |
93
+ | OpenAI Whisper | `whisper` | local | free | – | – | The reference PyTorch Whisper (needs system ffmpeg) |
94
+ | whisper.cpp | `whispercpp` | local | free | – | ~ | Pure C/C++ — light, excellent on Apple Silicon / edge |
95
+ | Vosk | `vosk` | local | free | ~ | ✓ | Fully offline, streaming, tiny models (Raspberry Pi / mobile) |
96
+ | OpenAI | `openai` | remote | paid | – | ✓ | Simple & ubiquitous; whisper-1 / gpt-4o-transcribe |
97
+ | Groq | `groq` | remote | free tier | – | – | Fastest & cheapest hosted Whisper (OpenAI-compatible) |
98
+ | Deepgram | `deepgram` | remote | free tier | ✓ | ✓ | Nova-3: real-time + diarization, cheap, feature-rich |
99
+ | AssemblyAI | `assemblyai` | remote | free tier | ✓ | ✓ | Audio intelligence (diarization, sentiment, topics, summary) |
100
+ | Google STT | `google-speech` | remote | free tier | ✓ | ✓ | Widest language coverage (125+); Chirp models |
101
+ | ElevenLabs | `elevenlabs` | remote | free tier | ✓ | ~ | Scribe v1 — top accuracy, diarization, audio-event tags |
102
+
103
+ …plus more engines catalogued in the ledger (NVIDIA Parakeet/Canary, WhisperX,
104
+ wav2vec2, Moonshine, sherpa-onnx, AWS Transcribe, Azure Speech, Speechmatics,
105
+ Gladia, Rev, Fireworks, Cloudflare …) that you can turn into a working façade
106
+ with one command (see *Add a backend* below).
107
+
108
+ ### Getting a backend running
109
+
110
+ Some backends need more than `pip install` (Whisper's *system* ffmpeg, GPU wheels,
111
+ first-run model weights, or an API key). scribed turns that into structured,
112
+ OS-aware guidance — handy for humans and AI agents alike:
113
+
114
+ ```python
115
+ scribed.doctor() # what's usable now vs what each missing one needs
116
+ scribed.check("faster-whisper") # -> True/False (usable right now?)
117
+ print(scribed.requirements("whisper").instructions()) # exact plan: system deps + pip + weights
118
+ scribed.install("faster-whisper", yes=True) # plan, or actually run the pip install
119
+ ```
120
+
121
+ ## The ledger — choose with eyes open
122
+
123
+ The catalog describes *every* engine we researched, not only the ones with a
124
+ working façade. It lives in data (`scribed/data/backends.json`), not code, so you
125
+ can read, filter, diff, and extend it:
126
+
127
+ ```python
128
+ scribed.catalog # the whole ledger
129
+ scribed.find(is_local=True, open_source=True) # only local OSS engines
130
+ scribed.find(diarization="yes", is_remote=True) # speaker-labelling cloud APIs
131
+ scribed.find(implemented=True) # only what scribed can run today
132
+ scribed.catalog.supports_language("French") # engines that list French
133
+ scribed.catalog.to_dataframe() # browse as a pandas table
134
+ ```
135
+
136
+ `implemented` is computed live from the registry, so the ledger can never lie
137
+ about what scribed can actually run.
138
+
139
+ ## The result model
140
+
141
+ Every backend returns the same `Transcript` — progressive disclosure from "just
142
+ the text" to full structure:
143
+
144
+ ```python
145
+ t = scribed.transcribe("interview.wav", backend="deepgram", diarize=True)
146
+
147
+ str(t) # the full transcript text
148
+ t.text # same string
149
+ t.language # detected language
150
+ t.duration # audio duration (seconds)
151
+ for seg in t: # Segment: .text .start .end .speaker .confidence .words
152
+ ...
153
+ t.words # flattened word-level units (when the engine reports them)
154
+ t.speakers # ['speaker_0', 'speaker_1', ...] when diarized
155
+ t.srt # SRT subtitles
156
+ t.vtt # WebVTT subtitles
157
+ t.raw # the untouched backend response
158
+ ```
159
+
160
+ ## Three tiers of access
161
+
162
+ ```python
163
+ scribed.transcribe(audio) # 1. facade, default backend
164
+ scribed.services.deepgram.transcribe(audio, diarize=True) # 2. pick a backend explicitly
165
+ scribed.services.deepgram.adapter # 3. the raw engine adapter
166
+ ```
167
+
168
+ ## CLI
169
+
170
+ ```bash
171
+ pip install "scribed[cli]"
172
+ scribed transcribe talk.mp3 --backend faster-whisper --output srt
173
+ scribed backends --capability diarize
174
+ scribed find --local --free --diarization
175
+ scribed status # readiness table: all ⊇ implemented ⊇ set-up ⊇ tested
176
+ scribed doctor # what's usable now, how to install the rest
177
+ scribed requirements whisper # exact install plan
178
+ ```
179
+
180
+ ## Add a backend
181
+
182
+ The catalog is large; scribed ships a façade for a curated subset and gives you
183
+ the machinery (and a SKILL) to wrap any other in minutes:
184
+
185
+ ```python
186
+ from scribed.make_backend import scaffold_backend, validate_adapter
187
+
188
+ scaffold_backend("speechmatics") # generate scribed/backends/speechmatics/ from the ledger entry
189
+ # ...fill in param_map (config.py) and implement adapter.py's _transcribe...
190
+ validate_adapter("speechmatics") # smoke-test it end to end
191
+ ```
192
+
193
+ A backend is just a subpackage with a `config.py` (`BACKEND_CONFIG`) and an
194
+ `adapter.py` (`Adapter(BaseTranscriberAdapter)` implementing `_transcribe`). The
195
+ registry discovers it automatically; engine SDKs are imported lazily so
196
+ `import scribed` stays dependency-free.
197
+
198
+ ## Design notes
199
+
200
+ - **Dependency-free import.** The base package declares no dependencies; every
201
+ engine SDK is an optional extra, imported lazily inside its adapter.
202
+ - **Data-driven ledger.** Engine metadata is curated research in JSON, separate
203
+ from code.
204
+ - **Normalized everything.** One input type (path / URL / bytes / file / numpy
205
+ waveform), one result type (`Transcript`), one vocabulary of options translated
206
+ per-engine via each backend's `param_map`.
207
+
208
+ `scribed` is the speech-to-text sibling of [`ocracy`](https://github.com/thorwhalen/ocracy)
209
+ (the same pattern for OCR).
210
+
211
+ ## License
212
+
213
+ MIT
@@ -0,0 +1,164 @@
1
+ # scribed
2
+
3
+ One façade over many speech-to-text (ASR) engines — plus a **ledger** to help you choose between them.
4
+
5
+ Transcription ("turn this audio into text") is solved a dozen ways: local engines
6
+ (Whisper, faster-whisper, whisper.cpp, Vosk), fast cheap cloud APIs (Groq, OpenAI),
7
+ and feature-rich premium services (Deepgram, AssemblyAI, Google, ElevenLabs) —
8
+ each with its own install, API, pricing, latency, language coverage, and
9
+ diarization quirks. `scribed` gives you a uniform call, a browsable catalog of
10
+ every option, and the tools to wrap any of them.
11
+
12
+ ```python
13
+ import scribed
14
+
15
+ text = scribed.transcribe_text("talk.mp3") # just the text, default backend
16
+ t = scribed.transcribe("talk.mp3") # full result: text + timed segments
17
+ print(t) # -> the transcript
18
+ print(t.srt) # -> SRT subtitles
19
+ for seg in t:
20
+ print(seg.start, seg.speaker, seg.text) # iterate timed (optionally diarized) segments
21
+ ```
22
+
23
+ The same call, the same `Transcript` back, no matter which engine ran.
24
+
25
+ ## Install
26
+
27
+ `import scribed` is dependency-free. Install only the backends you use, via extras:
28
+
29
+ ```bash
30
+ pip install "scribed[faster-whisper]" # local, free — recommended default
31
+ pip install "scribed[whispercpp]" # local, free, light (great on Apple Silicon)
32
+ pip install "scribed[vosk]" # local, free, streaming/offline
33
+ pip install "scribed[openai]" # cloud API (whisper-1 / gpt-4o-transcribe)
34
+ pip install "scribed[groq]" # cloud API — fastest & cheapest hosted Whisper
35
+ pip install "scribed[deepgram]" # cloud API — real-time + diarization
36
+ pip install "scribed[cli]" # the `scribed` command
37
+ ```
38
+
39
+ ## Backends that ship today
40
+
41
+ | Backend | `backend=` id | Local / Remote | Cost | Diarize | Stream | Notable |
42
+ |---|---|---|---|---|---|---|
43
+ | faster-whisper | `faster-whisper` | local | free | – | – | **Recommended local default** — Whisper via CTranslate2, no system ffmpeg |
44
+ | OpenAI Whisper | `whisper` | local | free | – | – | The reference PyTorch Whisper (needs system ffmpeg) |
45
+ | whisper.cpp | `whispercpp` | local | free | – | ~ | Pure C/C++ — light, excellent on Apple Silicon / edge |
46
+ | Vosk | `vosk` | local | free | ~ | ✓ | Fully offline, streaming, tiny models (Raspberry Pi / mobile) |
47
+ | OpenAI | `openai` | remote | paid | – | ✓ | Simple & ubiquitous; whisper-1 / gpt-4o-transcribe |
48
+ | Groq | `groq` | remote | free tier | – | – | Fastest & cheapest hosted Whisper (OpenAI-compatible) |
49
+ | Deepgram | `deepgram` | remote | free tier | ✓ | ✓ | Nova-3: real-time + diarization, cheap, feature-rich |
50
+ | AssemblyAI | `assemblyai` | remote | free tier | ✓ | ✓ | Audio intelligence (diarization, sentiment, topics, summary) |
51
+ | Google STT | `google-speech` | remote | free tier | ✓ | ✓ | Widest language coverage (125+); Chirp models |
52
+ | ElevenLabs | `elevenlabs` | remote | free tier | ✓ | ~ | Scribe v1 — top accuracy, diarization, audio-event tags |
53
+
54
+ …plus more engines catalogued in the ledger (NVIDIA Parakeet/Canary, WhisperX,
55
+ wav2vec2, Moonshine, sherpa-onnx, AWS Transcribe, Azure Speech, Speechmatics,
56
+ Gladia, Rev, Fireworks, Cloudflare …) that you can turn into a working façade
57
+ with one command (see *Add a backend* below).
58
+
59
+ ### Getting a backend running
60
+
61
+ Some backends need more than `pip install` (Whisper's *system* ffmpeg, GPU wheels,
62
+ first-run model weights, or an API key). scribed turns that into structured,
63
+ OS-aware guidance — handy for humans and AI agents alike:
64
+
65
+ ```python
66
+ scribed.doctor() # what's usable now vs what each missing one needs
67
+ scribed.check("faster-whisper") # -> True/False (usable right now?)
68
+ print(scribed.requirements("whisper").instructions()) # exact plan: system deps + pip + weights
69
+ scribed.install("faster-whisper", yes=True) # plan, or actually run the pip install
70
+ ```
71
+
72
+ ## The ledger — choose with eyes open
73
+
74
+ The catalog describes *every* engine we researched, not only the ones with a
75
+ working façade. It lives in data (`scribed/data/backends.json`), not code, so you
76
+ can read, filter, diff, and extend it:
77
+
78
+ ```python
79
+ scribed.catalog # the whole ledger
80
+ scribed.find(is_local=True, open_source=True) # only local OSS engines
81
+ scribed.find(diarization="yes", is_remote=True) # speaker-labelling cloud APIs
82
+ scribed.find(implemented=True) # only what scribed can run today
83
+ scribed.catalog.supports_language("French") # engines that list French
84
+ scribed.catalog.to_dataframe() # browse as a pandas table
85
+ ```
86
+
87
+ `implemented` is computed live from the registry, so the ledger can never lie
88
+ about what scribed can actually run.
89
+
90
+ ## The result model
91
+
92
+ Every backend returns the same `Transcript` — progressive disclosure from "just
93
+ the text" to full structure:
94
+
95
+ ```python
96
+ t = scribed.transcribe("interview.wav", backend="deepgram", diarize=True)
97
+
98
+ str(t) # the full transcript text
99
+ t.text # same string
100
+ t.language # detected language
101
+ t.duration # audio duration (seconds)
102
+ for seg in t: # Segment: .text .start .end .speaker .confidence .words
103
+ ...
104
+ t.words # flattened word-level units (when the engine reports them)
105
+ t.speakers # ['speaker_0', 'speaker_1', ...] when diarized
106
+ t.srt # SRT subtitles
107
+ t.vtt # WebVTT subtitles
108
+ t.raw # the untouched backend response
109
+ ```
110
+
111
+ ## Three tiers of access
112
+
113
+ ```python
114
+ scribed.transcribe(audio) # 1. facade, default backend
115
+ scribed.services.deepgram.transcribe(audio, diarize=True) # 2. pick a backend explicitly
116
+ scribed.services.deepgram.adapter # 3. the raw engine adapter
117
+ ```
118
+
119
+ ## CLI
120
+
121
+ ```bash
122
+ pip install "scribed[cli]"
123
+ scribed transcribe talk.mp3 --backend faster-whisper --output srt
124
+ scribed backends --capability diarize
125
+ scribed find --local --free --diarization
126
+ scribed status # readiness table: all ⊇ implemented ⊇ set-up ⊇ tested
127
+ scribed doctor # what's usable now, how to install the rest
128
+ scribed requirements whisper # exact install plan
129
+ ```
130
+
131
+ ## Add a backend
132
+
133
+ The catalog is large; scribed ships a façade for a curated subset and gives you
134
+ the machinery (and a SKILL) to wrap any other in minutes:
135
+
136
+ ```python
137
+ from scribed.make_backend import scaffold_backend, validate_adapter
138
+
139
+ scaffold_backend("speechmatics") # generate scribed/backends/speechmatics/ from the ledger entry
140
+ # ...fill in param_map (config.py) and implement adapter.py's _transcribe...
141
+ validate_adapter("speechmatics") # smoke-test it end to end
142
+ ```
143
+
144
+ A backend is just a subpackage with a `config.py` (`BACKEND_CONFIG`) and an
145
+ `adapter.py` (`Adapter(BaseTranscriberAdapter)` implementing `_transcribe`). The
146
+ registry discovers it automatically; engine SDKs are imported lazily so
147
+ `import scribed` stays dependency-free.
148
+
149
+ ## Design notes
150
+
151
+ - **Dependency-free import.** The base package declares no dependencies; every
152
+ engine SDK is an optional extra, imported lazily inside its adapter.
153
+ - **Data-driven ledger.** Engine metadata is curated research in JSON, separate
154
+ from code.
155
+ - **Normalized everything.** One input type (path / URL / bytes / file / numpy
156
+ waveform), one result type (`Transcript`), one vocabulary of options translated
157
+ per-engine via each backend's `param_map`.
158
+
159
+ `scribed` is the speech-to-text sibling of [`ocracy`](https://github.com/thorwhalen/ocracy)
160
+ (the same pattern for OCR).
161
+
162
+ ## License
163
+
164
+ MIT