Whisper X
Overview
The DataCrunch Whisper Inference Service provides access to the Whisper large model endpoints. It supports both Whisper large v2 and the latest Whisper large v3 models. These endpoints include advanced options such as WhisperX with diarization, phoneme alignment for word-level timestamps, and subtitle generation in SRT format.
Version Support
Whisper v2: Whisper v2 shows improved dependability if the language is unknown or if Whisper v3’s language identification is not reliable.
Whisper v3: If the language is known and language identification is reliable, it is better to opt for the Whisper v3 model.
Examples of API Usage
To use the Whisper API, replace <VERSION>
in the URL with v2
for version 2 or v3
for version 3.
For example, use https://inference.datacrunch.io/v1/audio/whisperx-v2/generate
.
Transcribing Audio
To transcribe audio, submit a request with the audio file URL.
Translating Audio
For translation of the transcribed output to English:
Generating Subtitles
When creating subtitles it is best to set processing_type="align"
, to ensure word-level alignment. Omitting the alignment will result in longer subtitle chunks, potentially leading to worse user experience. Setting output="subtitles"
ensures that the output is in SRT format.
Performing Speaker Diarization
For speaker diarization (assigning speaker labels to text segments), set processing_type
to diarize
:
API Specification
API Parameters
audio_input (
str
, required): URL of the audio file. This is a required parameter.translate (
bool
, optional): If enabled, provides the English translation of the output. Defaults tofalse
.language (
str
, optional): Optional two-letter language code to specify the input language for accurate language detection.processing_type (
str
, optional): Defines the processing action. Supported types:diarize
,align
.output (
str
), optional): Determines the output format. Options:subtitles
(in SRT format),raw
(time-stamped text). Default israw
.
Copyright notice: WhisperX includes software developed by Max Bain.
Last updated