@sf-voice/media — requires a runtime with fetch, FormData, and Blob.
Current version: 0.1.1. Pin it while the API is moving.
Install
Create a client
Ingest
ingest(request) submits a recording and returns immediately with a task_id.
From a URL
From S3
From a file
file accepts Blob, ArrayBuffer, or Uint8Array.
Common fields
Response
Tasks
Poll until ready
pollTask throws SfVoiceMediaPollTimeoutError if the task doesn’t reach ready or failed within the timeout.
Check once
Task shape
Search
search(request) returns timestamped matches across indexed recordings.
By asset class
By specific assets
Search all indexed assets
scope: "all" searches across your indexed assets. Use asset_class or asset_ids for anything customer-facing.
Search fields
Result shape
start_ms and end_ms are milliseconds into the source recording. Use them to seek a player to the matching segment.
Assets
Errors