Skip to content

feat: Phase 1 quick wins — TTS request-id, Whisper models, redaction, response fields, captions - #164

Open
dg-coreylweathers wants to merge 1 commit into
mainfrom
feat/phase-1-quick-wins
Open

feat: Phase 1 quick wins — TTS request-id, Whisper models, redaction, response fields, captions#164
dg-coreylweathers wants to merge 1 commit into
mainfrom
feat/phase-1-quick-wins

Conversation

@dg-coreylweathers

Copy link
Copy Markdown
Contributor

Phase 1 — Quick-win release (Tier C)

Part of the JS-SDK parity program. Bundles the small, self-contained ergonomics/completeness items into one reviewable PR. Each concern is its own commit.

What's included

  • Add method to get request ID from TTS requests #89 — TTS request-id / response metadata. TTS REST discarded the response headers, so dg-request-id was unrecoverable. Adds SpeakMetadata and speak_to_file_with_metadata / speak_to_stream_with_metadata; existing methods keep their signatures. Also drops a stray println! from speak_to_file.
  • Support whisper models #128 — Named Whisper model variants. Model::Whisper, WhisperTiny/Base/Small/Medium/Large (were only reachable via Model::CustomId).
  • Support all redaction options #87 — Extended redaction. Redact::Pii, Redact::Phi, Redact::AggressiveNumbers.
  • Public paragraph fields of transcription #129 — Public response fields. Paragraph & Audio Intelligence response types had private fields with no accessors; now pub + #[non_exhaustive].
  • Extra metadata support #130extra on streaming response. Surfaced on stream_response::Metadata and the terminal Metadata message.
  • Captions helper. common::captions::srt / webvtt (+ Response::to_srt/to_webvtt) mirroring @deepgram/captions. New captions example.

Verification (run in a Rust 1.97 container)

  • cargo build --all-features --all-targets
  • cargo test --all --all-features ✅ (137 passed)
  • cargo clippy --all-features --all-targets -- -D warnings
  • cargo fmt --all --check
  • cargo doc --all-features (-D warnings) ✅
  • Per-feature cargo check (no-default / listen / speak / manage) ✅

SemVer note

cargo semver-checks reports 2 breaking changes, both from #130 on deserialize-only streaming types (Metadata marked #[non_exhaustive]; extra added to Metadata and TerminalResponse). Everything else is additive (verified). These are flagged BREAKING in the changelog and are covered by the single accumulated 0.11.0 release at the end of the program (a 0.x minor bump permits breaking changes). Per the program's changelog discipline, Cargo.toml is not bumped per-PR.

Closes #89, #128, #87, #129, #130

…, response fields, captions

Tier C quick wins toward JS-SDK parity:
- #89: TTS REST response metadata — SpeakMetadata (dg-request-id, model
  name/uuid, char count, content type) via new speak_to_file_with_metadata
  / speak_to_stream_with_metadata; existing methods unchanged. Drops a
  stray stdout println from speak_to_file.
- #128: named Whisper Model variants (Whisper, WhisperTiny/Base/Small/
  Medium/Large), previously only via Model::CustomId.
- #87: Redact::Pii, Redact::Phi, Redact::AggressiveNumbers.
- #129: public #[non_exhaustive] fields on paragraph/Audio-Intelligence
  response types (Paragraph, Sentence, Entity, Intents, Sentiments,
  Topics, Summary, and friends).
- #130: extra metadata surfaced on the streaming response.
- SRT/WebVTT caption generation (common::captions) mirroring
  @deepgram/captions, plus captions and text_to_speech_request_id examples.

BREAKING CHANGE: streaming stream_response::Metadata and
StreamResponse::TerminalResponse are now #[non_exhaustive] and carry an
extra field (deserialize-only types; covered by the accumulated 0.11.0
release, where a 0.x minor bump permits breaking changes).

Closes #89, #128, #87, #129, #130

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add method to get request ID from TTS requests

1 participant