.NET API Usage example

Examples are from native_client/dotnet/STTConsole/Program.cs.

Creating a model instance and loading model

57
58
                using (ISTT sttClient = new STT(model ?? "output_graph.pbmm"))
                {

Deploying trained model

 93
 94
 95
 96
 97
 98
 99
100
101
102
103
                        if (extended)
                        {
                            Metadata metaResult = sttClient.SpeechToTextWithMetadata(waveBuffer.ShortBuffer,
                                Convert.ToUInt32(waveBuffer.MaxSize / 2), 1);
                            speechResult = MetadataToString(metaResult.Transcripts[0]);
                        }
                        else
                        {
                            speechResult = sttClient.SpeechToText(waveBuffer.ShortBuffer,
                                Convert.ToUInt32(waveBuffer.MaxSize / 2));
                        }

Full source code

See Full source code.