vocalstack 1.0.0a13__tar.gz → 1.0.0a15__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vocalstack
3
- Version: 1.0.0a13
3
+ Version: 1.0.0a15
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 (JSON, SRT, XLSX, PDF), or search transcripts. Covers installing, API keys, base URLs, five copy-paste programs and error handling (401, 402, 403, 429).
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 `json`, `srt`, `xlsx` and `pdf`; add `lang="<code>"` for a
114
- translated file. `export` returns the file's bytes.
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.0a13"
7
+ version = "1.0.0a15"
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"
@@ -29,7 +29,7 @@ from .errors import VocalStackError
29
29
  from .realtime import RealtimeTranscript
30
30
  from .realtime import RealtimeSession, pace_realtime
31
31
 
32
- __version__ = "1.0.0a13"
32
+ __version__ = "1.0.0a15"
33
33
 
34
34
  __all__ = [
35
35
  "DEFAULT_BASE_URL",
@@ -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
 
@@ -606,6 +608,13 @@ class Capabilities(_Base):
606
608
  speaker_label_modes: List[SpeakerLabels] = Field(alias="speakerLabelModes")
607
609
 
608
610
 
611
+ class CapturePage(_Base):
612
+ """The captured browser tab's address and title (`page`)."""
613
+
614
+ title: Optional[str] = None
615
+ url: Optional[str] = None
616
+
617
+
609
618
  class CaptureSpan(_Base):
610
619
  idx: int
611
620
  media_end: Optional[float] = Field(default=None, alias="mediaEnd")
@@ -827,6 +836,7 @@ It is created idle; `POST /v1/transcriptions/{id}/start` starts it."""
827
836
 
828
837
  broadcasts: Optional[List[str]] = None
829
838
  name: str
839
+ page: Optional["CapturePage"] = None
830
840
  settings: Optional["Settings"] = None
831
841
  source: Optional["CaptureSource"] = None
832
842
 
@@ -1325,6 +1335,7 @@ class TranscriptionJob(_Base):
1325
1335
  started_at: Optional[str] = Field(default=None, alias="startedAt")
1326
1336
  state: JobState
1327
1337
  transcription_id: str = Field(alias="transcriptionId")
1338
+ video_not_kept: Optional[bool] = Field(default=None, alias="videoNotKept")
1328
1339
 
1329
1340
 
1330
1341
  class TranscriptionMetrics(_Base):
@@ -1557,6 +1568,7 @@ class SessionOptions(_Base):
1557
1568
  identify_speakers: Optional[List["KnownSpeaker"]] = Field(default=None, alias="identifySpeakers")
1558
1569
  input: Optional["InputOptions"] = None
1559
1570
  latency_mode: Optional[LatencyMode] = Field(default=None, alias="latencyMode")
1571
+ page: Optional["CapturePage"] = None
1560
1572
  sentences: Optional["SentenceOptions"] = None
1561
1573
  speaker_labels: Optional[SpeakerLabels] = Field(default=None, alias="speakerLabels")
1562
1574
  spoken_language: Optional[str] = Field(default=None, alias="spokenLanguage")
@@ -1669,6 +1681,7 @@ file and its end."""
1669
1681
  class StartLiveTranscription(_Base):
1670
1682
  audio_source: Optional[str] = Field(default=None, alias="audioSource")
1671
1683
  device_id: Optional[str] = Field(default=None, alias="deviceId")
1684
+ page: Optional["CapturePage"] = None
1672
1685
  script_id: Optional[str] = Field(default=None, alias="scriptId")
1673
1686
  script_text: Optional[str] = Field(default=None, alias="scriptText")
1674
1687
  settings: Optional["SettingsPatch"] = None
@@ -468,12 +468,32 @@ class Transcriptions(_ParentResource):
468
468
  return _one(m.SummaryStatus, data)
469
469
 
470
470
  async def export(
471
- self, id: str, format: str, *, lang: Optional[str] = None, share_code: Optional[str] = None, listener_token: Optional[str] = None
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: ``json``, ``srt``, ``xlsx`` or ``pdf``; ``lang`` makes it read in that language. ``listener_token``: a broadcast listener's, once the transcription has ended."""
474
- resp = await self._t.raw(
475
- "GET", self._path(id, "/export"), headers={"accept": "*/*"}, query={"format": format, "lang": lang, "shareCode": share_code, "listenerToken": listener_token}
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