vocalstack 1.0.0a2__tar.gz → 1.0.0a4__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.
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/PKG-INFO +4 -6
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/README.md +3 -5
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/SKILL.md +1 -31
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/pyproject.toml +1 -1
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/skills/vocalstack/SKILL.md +1 -31
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/__init__.py +1 -1
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/_models.py +276 -312
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/client.py +2 -2
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/realtime.py +1 -1
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/resources.py +108 -184
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/.gitignore +0 -0
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/LICENSE +0 -0
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/_http.py +0 -0
- {vocalstack-1.0.0a2 → vocalstack-1.0.0a4}/src/vocalstack/errors.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vocalstack
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0a4
|
|
4
4
|
Summary: VocalStack speech API SDK (asyncio): one client grouped by resource, typed models from the API contract, realtime WebSocket streaming.
|
|
5
5
|
Project-URL: Homepage, https://vocalstack.com
|
|
6
6
|
License-Expression: MIT
|
|
@@ -48,7 +48,6 @@ pip install vocalstack
|
|
|
48
48
|
- [Quickstart](https://github.com/vocalstack/python-sdk/blob/main/docs/quickstart.md): An API key, the SDK, and your first transcript in a dozen lines.
|
|
49
49
|
- [Transcribe a file](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-file.md): Upload a file, wait for its job, read the transcript and export it. Asynchronous; nothing to keep open.
|
|
50
50
|
- [Transcribe a link](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-link.md): The server fetches a public URL, a YouTube video or a recording on a video or audio site, then transcribes it like a file. Asynchronous, with a fetch phase first.
|
|
51
|
-
- [Transcribe a batch of files](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-batch.md): Send many files or links as one batch, start it once, and read every transcript when it is done. Cheaper than one transcription per file.
|
|
52
51
|
- [Search your transcriptions](https://github.com/vocalstack/python-sdk/blob/main/docs/search-transcriptions.md): Find transcriptions by words in their name or link, site, language, kind, tag and date, keep the shared ones, and play each with its share code.
|
|
53
52
|
- [Stream a microphone](https://github.com/vocalstack/python-sdk/blob/main/docs/stream-a-microphone.md): Live audio in, transcript events out, over one WebSocket. Drafts replace the live tail; commits append.
|
|
54
53
|
- [Stream a file at full speed](https://github.com/vocalstack/python-sdk/blob/main/docs/stream-a-file.md): Send a file's bytes through a realtime session and read the transcript as fast as the server makes it. Nothing is stored.
|
|
@@ -69,15 +68,14 @@ pip install vocalstack
|
|
|
69
68
|
| transcription | a file, link, microphone or stream, transcribed and stored | `vs.transcriptions` |
|
|
70
69
|
| recording | one take inside a broadcast or a transcription | `vs.recordings` |
|
|
71
70
|
| job | a file or link recording's transcription work | `vs.jobs` |
|
|
72
|
-
| batch | many files transcribed together, for less than one transcription each | `vs.batches` |
|
|
73
71
|
|
|
74
|
-
The other groups: `vs.corrections`, `vs.share_links`, `vs.
|
|
75
|
-
`vs.search`, `vs.me`, `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
72
|
+
The other groups: `vs.corrections`, `vs.share_links`, `vs.speakers`,
|
|
73
|
+
`vs.voices`, `vs.search`, `vs.me`, `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
76
74
|
Method names are the document's `operationId`s in snake_case
|
|
77
75
|
(`broadcasts.start_recording` is `POST /v1/broadcasts/{id}/recordings`).
|
|
78
76
|
Request fields are keyword arguments, in snake_case or the wire's camelCase
|
|
79
77
|
(`settings={"spokenLanguage": "en"}`); lists return lists; binary answers
|
|
80
|
-
(`recordings.export`, `recordings.clip`, `
|
|
78
|
+
(`recordings.export`, `recordings.clip`, `speakers.sample`, ...) return bytes.
|
|
81
79
|
|
|
82
80
|
```python
|
|
83
81
|
VocalStack(
|
|
@@ -35,7 +35,6 @@ pip install vocalstack
|
|
|
35
35
|
- [Quickstart](https://github.com/vocalstack/python-sdk/blob/main/docs/quickstart.md): An API key, the SDK, and your first transcript in a dozen lines.
|
|
36
36
|
- [Transcribe a file](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-file.md): Upload a file, wait for its job, read the transcript and export it. Asynchronous; nothing to keep open.
|
|
37
37
|
- [Transcribe a link](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-link.md): The server fetches a public URL, a YouTube video or a recording on a video or audio site, then transcribes it like a file. Asynchronous, with a fetch phase first.
|
|
38
|
-
- [Transcribe a batch of files](https://github.com/vocalstack/python-sdk/blob/main/docs/transcribe-a-batch.md): Send many files or links as one batch, start it once, and read every transcript when it is done. Cheaper than one transcription per file.
|
|
39
38
|
- [Search your transcriptions](https://github.com/vocalstack/python-sdk/blob/main/docs/search-transcriptions.md): Find transcriptions by words in their name or link, site, language, kind, tag and date, keep the shared ones, and play each with its share code.
|
|
40
39
|
- [Stream a microphone](https://github.com/vocalstack/python-sdk/blob/main/docs/stream-a-microphone.md): Live audio in, transcript events out, over one WebSocket. Drafts replace the live tail; commits append.
|
|
41
40
|
- [Stream a file at full speed](https://github.com/vocalstack/python-sdk/blob/main/docs/stream-a-file.md): Send a file's bytes through a realtime session and read the transcript as fast as the server makes it. Nothing is stored.
|
|
@@ -56,15 +55,14 @@ pip install vocalstack
|
|
|
56
55
|
| transcription | a file, link, microphone or stream, transcribed and stored | `vs.transcriptions` |
|
|
57
56
|
| recording | one take inside a broadcast or a transcription | `vs.recordings` |
|
|
58
57
|
| job | a file or link recording's transcription work | `vs.jobs` |
|
|
59
|
-
| batch | many files transcribed together, for less than one transcription each | `vs.batches` |
|
|
60
58
|
|
|
61
|
-
The other groups: `vs.corrections`, `vs.share_links`, `vs.
|
|
62
|
-
`vs.search`, `vs.me`, `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
59
|
+
The other groups: `vs.corrections`, `vs.share_links`, `vs.speakers`,
|
|
60
|
+
`vs.voices`, `vs.search`, `vs.me`, `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
63
61
|
Method names are the document's `operationId`s in snake_case
|
|
64
62
|
(`broadcasts.start_recording` is `POST /v1/broadcasts/{id}/recordings`).
|
|
65
63
|
Request fields are keyword arguments, in snake_case or the wire's camelCase
|
|
66
64
|
(`settings={"spokenLanguage": "en"}`); lists return lists; binary answers
|
|
67
|
-
(`recordings.export`, `recordings.clip`, `
|
|
65
|
+
(`recordings.export`, `recordings.clip`, `speakers.sample`, ...) return bytes.
|
|
68
66
|
|
|
69
67
|
```python
|
|
70
68
|
VocalStack(
|
|
@@ -20,9 +20,6 @@ labels and translation. The `vocalstack` package has one asyncio client,
|
|
|
20
20
|
- A **job** is a file or link recording's transcription work:
|
|
21
21
|
`await vs.jobs.wait(recording_id)` polls it until it is `done` or `failed`
|
|
22
22
|
(`on_progress=lambda job: ...` sees each read: `job.state`, `job.progress.pct`).
|
|
23
|
-
- A **batch** is many files transcribed together for less than one
|
|
24
|
-
transcription each: `vs.batches.create()`, `add_file`/`add_url` per file,
|
|
25
|
-
`start`, then `wait` (section 6).
|
|
26
23
|
- A **broadcast** is a link listeners open to follow a live recording.
|
|
27
24
|
- A **realtime session** (`vs.realtime`) is a socket you stream audio into and
|
|
28
25
|
read the transcript from. Nothing is stored. "Session" means only this.
|
|
@@ -196,32 +193,6 @@ for h in res.hits:
|
|
|
196
193
|
print(f"{h.similarity:.2f}", h.passage.media_start, h.passage.text)
|
|
197
194
|
```
|
|
198
195
|
|
|
199
|
-
## 6. A batch of files
|
|
200
|
-
|
|
201
|
-
Many files at once cost less as a batch: one create, one minimum charge for
|
|
202
|
-
the whole batch. Its files get transcripts, exports and speaker labels (when
|
|
203
|
-
`settings.speakerLabels` asks), never a summary, title, share link or voices.
|
|
204
|
-
|
|
205
|
-
```python
|
|
206
|
-
import asyncio, os, sys
|
|
207
|
-
from vocalstack import VocalStack
|
|
208
|
-
|
|
209
|
-
async def main(paths):
|
|
210
|
-
async with VocalStack(os.environ.get("VOCALSTACK_BASE_URL"), api_key=os.environ["VOCALSTACK_API_KEY"]) as vs:
|
|
211
|
-
batch = await vs.batches.create(name="Interviews", settings={"spokenLanguage": "en"})
|
|
212
|
-
for path in paths:
|
|
213
|
-
await vs.batches.add_file(batch.id, file=path) # or add_url(batch.id, url)
|
|
214
|
-
await vs.batches.start(batch.id)
|
|
215
|
-
done = await vs.batches.wait(batch.id) # done (or stopped); check done.counts.failed
|
|
216
|
-
for tx in done.files or []:
|
|
217
|
-
if tx.job and tx.job.state == "done":
|
|
218
|
-
snap = await vs.recordings.transcript(tx.job.recording_id)
|
|
219
|
-
print(tx.name, " ".join(s.text for s in snap.sentences))
|
|
220
|
-
# vs.batches.export(batch.id, "srt") is every finished transcript in one zip.
|
|
221
|
-
|
|
222
|
-
asyncio.run(main(sys.argv[1:]))
|
|
223
|
-
```
|
|
224
|
-
|
|
225
196
|
## Errors
|
|
226
197
|
|
|
227
198
|
A failed call raises `vocalstack.VocalStackError` with `.code`, `.message`,
|
|
@@ -257,8 +228,7 @@ except VocalStackError as e:
|
|
|
257
228
|
- The other groups: `vs.transcriptions` (`list`, `get`, `update`, `archive`,
|
|
258
229
|
`restore`, `purge`, `list_share_links`, `create_share_link`), `vs.recordings`
|
|
259
230
|
(`get`, `summarize`, `summary`, `translation`, `audio_url`, `subscribe`),
|
|
260
|
-
`vs.
|
|
261
|
-
`export`, `stop`, `delete`), `vs.corrections`, `vs.share_links`, `vs.voices`, `vs.broadcasts`,
|
|
231
|
+
`vs.corrections`, `vs.share_links`, `vs.speakers`, `vs.voices`, `vs.broadcasts`,
|
|
262
232
|
`vs.me` (`get`, `usage`), `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
263
233
|
Each method is its operation's name in the OpenAPI document, in snake_case
|
|
264
234
|
(`transcriptions.create` is `POST /v1/transcriptions`).
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vocalstack"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.0a4"
|
|
8
8
|
description = "VocalStack speech API SDK (asyncio): one client grouped by resource, typed models from the API contract, realtime WebSocket streaming."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -20,9 +20,6 @@ labels and translation. The `vocalstack` package has one asyncio client,
|
|
|
20
20
|
- A **job** is a file or link recording's transcription work:
|
|
21
21
|
`await vs.jobs.wait(recording_id)` polls it until it is `done` or `failed`
|
|
22
22
|
(`on_progress=lambda job: ...` sees each read: `job.state`, `job.progress.pct`).
|
|
23
|
-
- A **batch** is many files transcribed together for less than one
|
|
24
|
-
transcription each: `vs.batches.create()`, `add_file`/`add_url` per file,
|
|
25
|
-
`start`, then `wait` (section 6).
|
|
26
23
|
- A **broadcast** is a link listeners open to follow a live recording.
|
|
27
24
|
- A **realtime session** (`vs.realtime`) is a socket you stream audio into and
|
|
28
25
|
read the transcript from. Nothing is stored. "Session" means only this.
|
|
@@ -196,32 +193,6 @@ for h in res.hits:
|
|
|
196
193
|
print(f"{h.similarity:.2f}", h.passage.media_start, h.passage.text)
|
|
197
194
|
```
|
|
198
195
|
|
|
199
|
-
## 6. A batch of files
|
|
200
|
-
|
|
201
|
-
Many files at once cost less as a batch: one create, one minimum charge for
|
|
202
|
-
the whole batch. Its files get transcripts, exports and speaker labels (when
|
|
203
|
-
`settings.speakerLabels` asks), never a summary, title, share link or voices.
|
|
204
|
-
|
|
205
|
-
```python
|
|
206
|
-
import asyncio, os, sys
|
|
207
|
-
from vocalstack import VocalStack
|
|
208
|
-
|
|
209
|
-
async def main(paths):
|
|
210
|
-
async with VocalStack(os.environ.get("VOCALSTACK_BASE_URL"), api_key=os.environ["VOCALSTACK_API_KEY"]) as vs:
|
|
211
|
-
batch = await vs.batches.create(name="Interviews", settings={"spokenLanguage": "en"})
|
|
212
|
-
for path in paths:
|
|
213
|
-
await vs.batches.add_file(batch.id, file=path) # or add_url(batch.id, url)
|
|
214
|
-
await vs.batches.start(batch.id)
|
|
215
|
-
done = await vs.batches.wait(batch.id) # done (or stopped); check done.counts.failed
|
|
216
|
-
for tx in done.files or []:
|
|
217
|
-
if tx.job and tx.job.state == "done":
|
|
218
|
-
snap = await vs.recordings.transcript(tx.job.recording_id)
|
|
219
|
-
print(tx.name, " ".join(s.text for s in snap.sentences))
|
|
220
|
-
# vs.batches.export(batch.id, "srt") is every finished transcript in one zip.
|
|
221
|
-
|
|
222
|
-
asyncio.run(main(sys.argv[1:]))
|
|
223
|
-
```
|
|
224
|
-
|
|
225
196
|
## Errors
|
|
226
197
|
|
|
227
198
|
A failed call raises `vocalstack.VocalStackError` with `.code`, `.message`,
|
|
@@ -257,8 +228,7 @@ except VocalStackError as e:
|
|
|
257
228
|
- The other groups: `vs.transcriptions` (`list`, `get`, `update`, `archive`,
|
|
258
229
|
`restore`, `purge`, `list_share_links`, `create_share_link`), `vs.recordings`
|
|
259
230
|
(`get`, `summarize`, `summary`, `translation`, `audio_url`, `subscribe`),
|
|
260
|
-
`vs.
|
|
261
|
-
`export`, `stop`, `delete`), `vs.corrections`, `vs.share_links`, `vs.voices`, `vs.broadcasts`,
|
|
231
|
+
`vs.corrections`, `vs.share_links`, `vs.speakers`, `vs.voices`, `vs.broadcasts`,
|
|
262
232
|
`vs.me` (`get`, `usage`), `vs.languages`, `vs.rtmp`, `vs.events`, `vs.meta`.
|
|
263
233
|
Each method is its operation's name in the OpenAPI document, in snake_case
|
|
264
234
|
(`transcriptions.create` is `POST /v1/transcriptions`).
|