How Tos

Last reviewed: 7/8/2021

Article ID: H072112

HOW: Developing applications that do more with Microsoft Speech Technology

The information in this article applies to:

  • GrammarKit 7
  • KinesicsKit 5
  • LexiconKit 7
  • ProfileKit 7
  • SpeechKit 10
  • VoiceMarkupKit 7
  • VoiceXMLKit 4

Summary

Explore ways to do more with Microsoft Speech Technology.

More Information

Chant Developer Workbench 2021 includes GrammarKit to compile speech recognition grammars, KinesicsKit to detect movement in 3D space, LexiconKit to generate pronunciations for synthesis clarity, ProfileKit to manage speech recognition profiles, SpeechKit to recognize speech and synthesize text to speech, VoiceMarkupKit to markup text for tailored speech synthesis, and VoiceXMLKit to validate and run VoiceXML. It also provides an interative toolset for editing and testing with Microsoft grammars, movement detection sensors, speaker profiles, speech synthesis, Speech Synthesis Markup Language (SSML), and VoiceXML.

Develop applications that do more with Microsoft Speech Technology

Compile speech recognition grammars with GrammarKit from source string or file and optionally persist grammar binary.

// Instantiate GrammarKit
NGrammarKit _GrammarKit = new NGrammarKit();
// Set license properties
_GrammarKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create synthesizer
NSAPI5Recognizer _Recognizer = _GrammarKit.CreateRecognizerSynthesizer();

// Compile grammar
_Recognizer.CompileFile("SAPI5XML", "c:\\myvocab.xml");

Detect movement in 3D space with KensicsKit for hands-free processing.

// Instantiate KinesicsKit
_KinesicsKit = new NKinesicsKit();
// Set license properties
_KinesicsKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create KinectSensor
_Sensor = _KinesicsKit.CreateKinectSensor();

// Turn the sensor on
_Sensor.Start();

// Turn the sensor off
_Sensor.Stop();

Generate pronunciation phonemes with LexiconKit to use with SSML for Microsoft voices.

// Instantiate LexiconKit
NLexiconKit _LexiconKit = new NLexiconKit();
// Set license properties
_LexiconKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create synthesizer
NSAPI5Synthesizer _Synthesizer = _LexiconKit.CreateSAPI5Synthesizer();

// Generate phonemes
string _Phonemes = _Synthesizer.GeneratePhonemes("tomato", "Noun");

Manage speech recognition speaker profiles with ProfileKit to enhance recognition quality.

// Instantiate ProfileKit object
NProfileKit _ProfileKit = new NProfileKit();
// Set license properties
_ProfileKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create recognizer
NSAPI5Recognizer _Recognizer = _ProfileKit.CreateSAPI5Recognizer();

// Create a new speaker profile
_Recognizer.CreateSpeaker("NewUser");

// Calibrate microphone
bool isSupported = _Recognizer.IsSupported("MicTraining");
if (isSupported)
{
    _Recognizer.ShowDialog("MicTraining", new System.Windows.Interop.WindowInteropHelper(this).Handle, string.Empty, string.Empty);
}
// Train speaker
isSupported = _Recognizer.IsSupported("UserTraining");
if (isSupported)
{
    _Recognizer.ShowDialog("UserTraining", new System.Windows.Interop.WindowInteropHelper(this).Handle, string.Empty, string.Empty);
}

// Delete the speaker
_Recognizer.DeleteSpeaker("NewUser");

Recognize speech with SpeechKit for for transcription, data entry, or command and control.

// Instantiate SpeechKit
NSpeechKit _SpeechKit = new NSpeechKit();
// Set license properties
_SpeechKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create recognizer
NSAPI5Recognizer _Recognizer = _SpeechKit.CreateSAPI5Recognizer();

// Start speech recognition from microphone audio source
_Recognizer.StartRecognition();

Generate text to speech with SpeechKit for playback or persistence to a file.

// Instantiate SpeechKit
NSpeechKit _SpeechKit = new NSpeechKit();
// Set license properties
_SpeechKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create synthesizer
NSAPI5Synthesizer _Synthesizer = _SpeechKit.CreateSAPI5Synthesizer();

// Synthesize speech for playback
_Synthesizer.Speak("Hello world.", (int)SPEAKFLAGS.SPF_ASYNC);

// Synthesize speech to file
_Synthesizer.Speak("Hello world.", (int)SPEAKFLAGS.SPF_ASYNC, "myaudio.wav", (int)SPSTREAMFORMAT.SPSF_Default);

Generate Speech Synthesis Markup Language (SSML) with VoiceMarkupKit to tailor speech synthesis.

NVoiceMarkupKit _VoiceMarkupKit = new NVoiceMarkupKit();
_VoiceMarkupKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
NSAPI5VoiceMarkup _SAPI5VoiceMarkup = _VoiceMarkupKit.CreateW3CVoiceMarkup();

string markup = _SAPI5VoiceMarkup.GenerateMarkup("Rate", "5", "This text is spoken above the baseline at rate of five");

Validate and run VoiceXML with VoiceXMLKit to design and test documents before deployment.

// Instantiate VoiceXMLKit
NVoiceXMLKit _VoiceXMLKit = new NVoiceXMLKit();
// Set license properties
_VoiceXMLKit.SetLicense("LicenseRegistrationNumber", "LicenseSerialNumber");
// Create synthesizer
NSAPI5VoiceXML _VoiceXML = _VoiceXMLKit.CreateSAPI5VoiceXML();

// Validate document
_VoiceXML.CompileDocument("mydocument.vxml"); 

// Interpret the document
_VoiceXML.RunDocument("mydocument.vxml", "Microsoft David Desktop - English (United States)", "Microsoft Speech Recognizer 8.0 for Windows (English - US)");

Develop and test applications that do more with Microsoft Speech Technology

Developers use Chant Developer Workbench with GrammarKit to create, edit and test Speech Recognition grammars, KinesicsKit to test movement detection sensors, ProfileKit to manage speaker profiles, SpeechKit to test and analyze speech recognition and speech synthesis, VoiceMarkupKit to create, edit, and test Speech Synthesis Markup Language (SSML), and with VoiceXMLKit to create, edit, and test VoiceXML documents.

Use GrammarKit to create, edit, and test speech recognition grammars.

Grammar Management
Grammar Management: Design, compile, test, and debug speech recognition grammars before deployment.

Use KinesicsKit to test movement detection sensors.

Sensor Testing
Sensor Testing: Validate sensor streams.

Use ProfileKit to manage speaker profiles.

Built-in Speaker Training
Built-in Speaker Training: Enumerate and train speech recognition profiles with recognizer built-in speaker training.

Use SpeechKit to test and analyze speech recognition and speech synthesis with Microsoft voices.

Recognizer Management
Recognizer Management: Enumerate and test recognizers with command, dictation, and grammar vocabularies.
Recognizer Management
Recognizer Management: Recognize speech from a microphone and prerecorded audio. Trace recognition events in the Events window.
Synthesizer Management
Synthesizer Management: Enumerate and test synthesizers with live playback or persisting synthesized speech to files.
Synthesizer Management
Synthesizer Management: Trace synthesis events in the Events window.

Use VoiceMarkupKit to create and edit SSML with Microsoft voices.

SSML Editing
SSML Editing: Edit L&H Native Control Sequence, SAPI 5, and W3C Speech Synthesis Markup Language (SSML) faster with built-in intelliprompt that suggest valid markup syntax.

Use VoiceXMLKit to create, edit, and test VoiceXML documents.

Conversation Management
Conversation Management: Create, validate, edit, test, and debug VoiceXML offline before deploying to voice response servers.