mirror of
https://github.com/BerriAI/litellm.git
synced 2026-12-05 01:59:27 +00:00
* feat(zoom_ai): add Zoom Scribe speech-to-text on /v1/audio/transcriptions Adds the zoom_ai provider for Zoom Scribe Fast, so zoom_ai/<model> works with litellm.transcription, litellm.atranscription and the proxy's /v1/audio/transcriptions. Each call uploads the audio and a JSON config to /v2/aiservices/scribe/transcribe with a ZOOM_AI_API_KEY bearer token and a per-request x-zm-trackingid. ZOOM_AI_API_BASE overrides the endpoint. Models are passed through to Scribe, which validates them, so new Scribe models work without a release. A bare language code becomes its documented Scribe locale, building on the shared BARE_ISO_639_1_TO_BCP47 map, and a language-specific model such as zoom-scribe-fr sends its own locale when the caller sets none. zoom-scribe-multilingual and whisper send continuous language detection unless the caller chooses a mode. Scribe options (diarization, word_time_offsets, channel_separation, profanity_filter, segmentation_mode, vocabulary, vocabulary_id and language_detection) are decoded from proxy form strings to the types Scribe expects. Only response_format json is supported for now, and other formats are rejected before the request is sent. Cost comes from the seconds Scribe reports as billed, priced by new cost map rows for the documented models. Errors carry Zoom's JSON reason, and any other upstream body is left out of the message. * feat(zoom_ai): add zoom_ai/auto and bill the model Scribe ran zoom_ai/auto leaves the model out of the request so Scribe picks one from the request's settings. Spend is priced at the model Scribe reports it ran, using cost map rows for the documented models from Zoom's official pricing. * feat(zoom_ai): return Scribe segments, speakers, channels, languages, word timings and polished text Every response carries Scribe's segments with their channel, and their speaker and language when Scribe reports them. Word timestamps and srt/vtt turn on word_time_offsets, diarized_json turns on diarization, and text_polishing returns Scribe's polished text beside the transcript. whisper no longer gets continuous detection, which Scribe refuses for it, and the upload names only the file, since Zoom refuses a file name that carries a directory path. * fix(zoom_ai): type the zoom_ai model set and mark the list response fields as mutable-ok Clears the basedpyright and type-discipline gates flagged by make lint. * fix(zoom_ai): carry each segment's speaker onto its words so subtitles split on speaker changes * fix(zoom_ai): save Zoom models added in the Admin UI under the zoom_ai provider The Add Model form resolves a provider key through provider_map or by lowercasing it, so ZoomAI became zoomai and every call on a UI-added Zoom model failed. ZOOM_AI lowercases to zoom_ai, which the existing every-provider resolution test in provider_info_helpers.test.tsx checks * fix(zoom_ai): shape responses per format, bill add-ons and price auto fallbacks * fix(zoom_ai): detect language on auto, mask every transcript copy, bill polishing only when returned zoom_ai/auto now asks Scribe for one-time language detection with no model, so non-English audio is no longer transcribed as en-US. Whisper joins Multilingual in getting continuous detection when no language is pinned. Text polishing is billed only when polished text comes back. The transcription output guardrail now sends text, polished_text, segment text and word text in one call and writes each masked value back, so PII no longer leaks through the detailed formats. * fix(zoom_ai): stop auto-detecting language for whisper, which Scribe rejects * fix(guardrails): send each transcript copy to the guardrail once and mask words a multi-word match spans * fix(zoom_ai): price an auto pick with no price of its own at the Fast rate * fix(transcription guardrail): keep a masked name masked when the same name comes up again Map guardrailed words back by keeping matching words in place and putting a mask on the first word it covers, so a repeated first name can no longer take the mask's place * fix(guardrails): keep a transcript segment's own lines together when its text has a line break * fix(transcription guardrail): leave no unmasked copy when a guardrail returns fewer texts Line up the texts a guardrail returns with the ones it was sent, so a copy it returned no text for comes back empty instead of keeping its original words. A guardrail that returns no texts still leaves the transcript as it was * fix(transcription guardrail): mask a blocked phrase that spans two words in the word list * fix(transcription guardrail): keep every transcript copy when a guardrail returns fewer texts unchanged * fix(transcription guardrail): treat only an unchanged leading part of the sent texts as no change --------- Co-authored-by: Chenda Liao <cdliao84@gmail.com> Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| audio_transcription | ||
| __init__.py | ||
| test_zoom_ai_provider_registration.py | ||