DeepgramNova2<T>
Models & Types · AiDotNet.SpeechRecognition.ProprietaryAPI
A Deepgram Nova-2 stand-in: a Transformer encoder with a CTC layer, since Deepgram has disclosed only that Nova-2 is a Transformer-based end-to-end model.
Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → DeepgramNova2<T>
Implements: ISpeechRecognizer<T>
For Beginners
This model turns 16 kHz audio into an 80-band log-mel spectrogram, shortens it 4x with two convolutions and encodes it with Transformer layers. A linear layer gives every frame a probability for each token; collapsing repeats and blanks gives the transcript.
How It Works
This is a stand-in, not Deepgram’s production model. Deepgram describes Nova-2 only as a proprietary Transformer-based end-to-end recognizer trained in a two-stage curriculum; it has not said whether it is an encoder-decoder, CTC or transducer model, nor given its size. The stand-in is the plainest end-to-end Transformer recognizer: 4x convolution subsampling, sinusoidal positions added to the scaled input, 12 pre-norm Transformer encoder layers of width 512 with 8 heads and 2,048 ReLU feed-forward units (the base Transformer of Vaswani et al. 2017), and a CTC layer (Graves et al. 2006) decoded greedily. SpecAugment masks the features in training.
Example
var architecture = new NeuralNetworkArchitecture<float>(
inputType: InputType.OneDimensional,
taskType: NeuralNetworkTaskType.SpeechRecognition,
inputSize: 16000, outputSize: 34);
var model = new DeepgramNova2<float>(architecture);
var text = model.Transcribe(waveform).Text;
Constructors
| Constructor | Summary |
|---|---|
DeepgramNova2(NeuralNetworkArchitecture<T> architecture, DeepgramNova2Options options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
DeepgramNova2(NeuralNetworkArchitecture<T> architecture, string modelPath, DeepgramNova2Options 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() |
|
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 and the CTC layer with greedy decoding. |
string DetectLanguage(Tensor<T> audio) |