AWSTranscribe<T>
Models & Types · AiDotNet.SpeechRecognition.ProprietaryAPI
An Amazon Transcribe stand-in: a streaming Conformer transducer, since Amazon has not disclosed Transcribe’s architecture.
Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → AWSTranscribe<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 Conformer blocks that attend within short chunks, so each output depends on bounded context. A small LSTM remembers the tokens written so far and a joint network combines it with each audio frame to pick the next token or “nothing yet”.
How It Works
This is a stand-in, not Amazon’s production model. Amazon has not published the architecture of Transcribe; the streaming recognizers in Amazon’s published speech research are RNN transducers (for example ConvRNN-T, Radfar et al. 2022, arXiv 2209.14868). The stand-in is therefore the standard streaming transducer: Conformer (L) of Gulati et al. 2020, Table 1 (17 blocks, width 512, 8 heads, a 32-wide depthwise kernel), a single-layer 640-unit LSTM prediction network and a 640-wide joint network (section 3.1), with attention limited to chunks of 10 encoder frames for streaming. SpecAugment masks the features in training. The paper’s blocks use relative positional encoding; these use rotary position encoding.
Example
var architecture = new NeuralNetworkArchitecture<float>(
inputType: InputType.OneDimensional,
taskType: NeuralNetworkTaskType.SpeechRecognition,
inputSize: 16000, outputSize: 34);
var model = new AWSTranscribe<float>(architecture);
var text = model.Transcribe(waveform).Text;
Constructors
| Constructor | Summary |
|---|---|
AWSTranscribe(NeuralNetworkArchitecture<T> architecture, AWSTranscribeOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
AWSTranscribe(NeuralNetworkArchitecture<T> architecture, string modelPath, AWSTranscribeOptions 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 transducer with greedy decoding. |
string DetectLanguage(Tensor<T> audio) |