Chirp3<T>

Models & Types · AiDotNet.SpeechRecognition.Multilingual

Chirp 3: Google Cloud’s third-generation Chirp recognizer, a USM-family Conformer with a CTC layer.

Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → Chirp3<T>

Implements: ISpeechRecognizer<T>

For Beginners

Chirp 3 is the third generation of the speech model Google serves in its cloud. It listens to 16 kHz audio turned into a 128-band spectrogram, encodes it with a large Conformer, and outputs for every 40 ms frame a probability for each token; collapsing repeats and blanks gives the transcript.

How It Works

References:

  • Paper: “Google USM: Scaling Automatic Speech Recognition Beyond 100 Languages” (Zhang et al., Google, 2023)
  • Model: “Chirp 3” (Google Cloud Speech-to-Text V2, 2025)

Google has not published Chirp 3’s network; it presents Chirp 3 as the latest generation of its USM-based Chirp models. This class therefore builds the published USM-CTC architecture: the paper’s Conformer-2B (Table 2: 32 layers, 1536 wide, 16 heads, kernel 5) over 128-dimensional log-mel features (section 2.7) with BEST-RQ’s 4x convolutional reduction, 8-second chunk-wise attention (section 2.4) and a CTC layer, with BEST-RQ pre-training (Pretrain) under the 16-codebook multi-softmax loss. Rotary position encoding stands in for the paper’s relative attention. The MOST speech-text stage and noisy student training of the USM paper are data procedures outside the network.

Example

// Create a Chirp 3 recognizer
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.OneDimensional,
    taskType: NeuralNetworkTaskType.SpeechRecognition,
    inputHeight: 16000, inputWidth: 1, inputDepth: 1, outputSize: 32000);
var model = new Chirp3<double>(architecture);
            
// Or load an exported ONNX model
var onnxModel = new Chirp3<double>(architecture, "chirp3.onnx");

Constructors

Constructor Summary
Chirp3(NeuralNetworkArchitecture<T> architecture, Chirp3Options options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer)
Chirp3(NeuralNetworkArchitecture<T> architecture, string modelPath, Chirp3Options options)

Properties

Property Summary
IReadOnlyList<string> SupportedLanguages { get; }
bool SupportsStreaming { get; }
bool SupportsWordTimestamps { get; }

Methods

Method Summary
IReadOnlyDictionary<string, T> DetectLanguageProbabilities(Tensor<T> audio)
IStreamingTranscriptionSession<T> StartStreamingSession(string language)
ModelMetadata<T> GetModelMetadata()
T Pretrain(Tensor<T> audio) One BEST-RQ pre-training step (section 2.2) on waveforms [S] or [batch, S].
T PretrainingLoss(Tensor<T> audio, Random random) The BEST-RQ pre-training loss of waveforms [S] or [batch, S] with the multi-softmax of Zhang et al.
Task<TranscriptionResult<T>> TranscribeAsync(Tensor<T> audio, string language, bool? includeTimestamps, CancellationToken cancellationToken)
Tensor<T> ForwardForTraining(Tensor<T> input)
TranscriptionResult<T> Transcribe(Tensor<T> audio, string language, bool? includeTimestamps) Transcribes audio: the encoder, projection and CTC layer give per-frame distributions, decoded greedily.
string DetectLanguage(Tensor<T> audio)