vocalstack 1.0.0a13__tar.gz → 1.0.0a14__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.0a13 → vocalstack-1.0.0a14}/PKG-INFO +1 -1
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/SKILL.md +4 -3
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/pyproject.toml +1 -1
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/__init__.py +1 -1
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/_models.py +3 -1
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/resources.py +25 -5
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/.gitignore +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/LICENSE +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/README.md +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/skills/vocalstack/SKILL.md +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/_http.py +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/client.py +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/errors.py +0 -0
- {vocalstack-1.0.0a13 → vocalstack-1.0.0a14}/src/vocalstack/realtime.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.0a14
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vocalstack
|
|
3
|
-
description: Use when writing Python code that calls the VocalStack speech API with the vocalstack package, for example to transcribe an audio or video URL or a local file, stream live audio for realtime transcription, fetch or export a transcript (
|
|
3
|
+
description: Use when writing Python code that calls the VocalStack speech API with the vocalstack package, for example to transcribe an audio or video URL or a local file, stream live audio for realtime transcription, fetch or export a transcript (PDF, XLSX, SRT, VTT, text, Markdown, JSON), or search transcripts. Covers installing, API keys, base URLs, five copy-paste programs and error handling (401, 402, 403, 429).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# VocalStack Python SDK
|
|
@@ -110,8 +110,9 @@ asyncio.run(main(sys.argv[1]))
|
|
|
110
110
|
## 3. Fetch a transcript or an export file
|
|
111
111
|
|
|
112
112
|
The transcript holds segments (with word timings), sentences and speakers.
|
|
113
|
-
Export formats are `
|
|
114
|
-
translated file
|
|
113
|
+
Export formats are `pdf`, `xlsx`, `srt`, `vtt`, `txt`, `md` and `json`; add
|
|
114
|
+
`lang="<code>"` for a translated file, `speaker_labels="off"` (or `"on"`, `"auto"`),
|
|
115
|
+
`timestamps="off"`, `start_s`/`end_s` for one part and `summary=True`. `export` returns the file's bytes.
|
|
115
116
|
|
|
116
117
|
```python
|
|
117
118
|
import asyncio, os, sys
|
|
@@ -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.0a14"
|
|
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"
|
|
@@ -46,7 +46,9 @@ NotVoicedReason = Literal["rewrite"]
|
|
|
46
46
|
|
|
47
47
|
DoneReason = Literal["eof", "max_duration", "cancelled"]
|
|
48
48
|
|
|
49
|
-
ExportFormat = Literal["json", "srt", "xlsx", "pdf"]
|
|
49
|
+
ExportFormat = Literal["json", "srt", "vtt", "txt", "md", "xlsx", "pdf"]
|
|
50
|
+
|
|
51
|
+
ExportTimestamps = Literal["off", "paragraph", "line"]
|
|
50
52
|
|
|
51
53
|
FileUploadState = Literal["uploading", "complete"]
|
|
52
54
|
|
|
@@ -468,12 +468,32 @@ class Transcriptions(_ParentResource):
|
|
|
468
468
|
return _one(m.SummaryStatus, data)
|
|
469
469
|
|
|
470
470
|
async def export(
|
|
471
|
-
self,
|
|
471
|
+
self,
|
|
472
|
+
id: str,
|
|
473
|
+
format: str,
|
|
474
|
+
*,
|
|
475
|
+
lang: Optional[str] = None,
|
|
476
|
+
share_code: Optional[str] = None,
|
|
477
|
+
listener_token: Optional[str] = None,
|
|
478
|
+
speaker_labels: Optional[str] = None,
|
|
479
|
+
timestamps: Optional[str] = None,
|
|
480
|
+
start_s: Optional[float] = None,
|
|
481
|
+
end_s: Optional[float] = None,
|
|
482
|
+
summary: Optional[bool] = None,
|
|
472
483
|
) -> bytes:
|
|
473
|
-
"""An export file: ``
|
|
474
|
-
|
|
475
|
-
"
|
|
476
|
-
|
|
484
|
+
"""An export file: ``pdf``, ``xlsx``, ``srt``, ``vtt``, ``txt``, ``md`` or ``json``; ``lang`` makes it read in that language. ``speaker_labels``: ``auto``, ``on`` or ``off`` for this file (default: the transcription's own); ``timestamps``: ``paragraph``, ``line`` or ``off``; ``start_s``/``end_s`` keep one window; ``summary`` puts the summary first. ``listener_token``: a broadcast listener's, once the transcription has ended."""
|
|
485
|
+
query = {
|
|
486
|
+
"format": format,
|
|
487
|
+
"lang": lang,
|
|
488
|
+
"shareCode": share_code,
|
|
489
|
+
"listenerToken": listener_token,
|
|
490
|
+
"speakerLabels": speaker_labels,
|
|
491
|
+
"timestamps": timestamps,
|
|
492
|
+
"startS": None if start_s is None else str(start_s),
|
|
493
|
+
"endS": None if end_s is None else str(end_s),
|
|
494
|
+
"summary": "true" if summary else None,
|
|
495
|
+
}
|
|
496
|
+
resp = await self._t.raw("GET", self._path(id, "/export"), headers={"accept": "*/*"}, query=query)
|
|
477
497
|
return resp.content
|
|
478
498
|
|
|
479
499
|
async def audio(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|