How do I manage profiles with Microsoft Speech Platform?
Last reviewed: 3/1/2012
HOW Article ID: H031203
The information in this article applies to:
- ProfileKit 4
Summary
ProfileKit 4 provides support for Microsoft Speech Platform.
More Information
Chant ProfileKit 4 provides support for training, backup, and restore of Microsoft Speech Platform speaker profiles.
Both 32-bit and 64-bit applications can train, backup, and restore Microsoft Speech Platform speaker profiles. The 32-bit Microsoft Speech Platform runtime must be installed to support 32-bit applications. The 64-bit Microsoft Speech Platform runtime must be installed to support 64-bit applications.
All current Microsoft Speech Platform versions are supported: v10.0, v10.1, v10.2 and v11.0. Only one version may be installed at a time. The runtimes, recognizers, and voices can be downloaded from Microsoft:
- Microsoft Speech Platform v10.0 Runtimes
- Microsoft Speech Platform v10.0 Recognizers and Voices
- Microsoft Speech Platform v10.1 Runtimes
- Microsoft Speech Platform v10.1 Recognizers and Voices
- Microsoft Speech Platform v10.2 Runtimes
- Microsoft Speech Platform v10.2 Recognizers and Voices
- Microsoft Speech Platform v11.0 Runtimes
- Microsoft Speech Platform v11.0 Recognizers and Voices
The recognizer for which to train, backup, and restore a speaker profile can be selected by setting the CSPEngine property to recognizer name or by setting the CNPEngineAPI value to CEMSPSR. The voice to use for custom training can be selected by setting the CSPEngine property to voice name or by setting the CNPEngineAPI value to CEMSPTTS.
private Chant.ProfileKit.NChantPM NChantPM1;
// Instantiate NChantPM object
NChantPM1 = new NChantPM(this);
NChantPM1.SetNumberProperty(ChantNumberProperty.CNPEngineAPI, (int)ChantEngineAPI.CEMSPSR);
// Set the current speaker
NChantPM1.SetStringProperty(ChantStringProperty.CSPSpeaker, "Default Speaker");
// Example 1
// Training the speaker with ProfileKit grammar training
NChantPM1.SetTrainingProperty(ChantTrainingProperty.CTPTrainingPhraseText, "red\nblue\norange\ngreen\npurple\nyellow\nbrown\n");
// Start training with dialog hidden
NChantPM1.StartTraining("", 0, ChantRecordingObject.CROMultiMedia, ChantAudioFormat.CAFDefault, false);
// Example 2
// Training the speaker with ProfileKit using a grammar file
NChantPM1.SetTrainingProperty(ChantTrainingProperty.CTPTrainingGrammarVocab, "colors.xml");
// Start training with dialog hidden using pre-recorded audio file
NChantPM1.StartTraining("mytraining.wav", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFDefault, false);
// Example 3
// Start training with dialog hidden using text file
NChantPM1.StartTraining("mydocument.txt", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFText, false);
CChantPM* m_pChantPM; // ChantPM object
// Instantiate ChantPM object
m_pChantPM = new CChantPM();
m_pChantPM->SetNumberProperty(CNPEngineAPI, CEMSPSR);
// Set the current speaker
pChantPM->SetStringProperty(CSPSpeaker, L"Default Speaker");
// Example 1
// Training the speaker with ProfileKit grammar training
pChantPM->SetTrainingProperty(CTPTrainingPhraseText, L"red\nblue\norange\ngreen\npurple\nyellow\nbrown\n");
// Start training with dialog hidden
pChantPM->StartTraining(NULL, 0, CROMultiMedia, CAFDefault, false);
// Example 2
// Training the speaker with ProfileKit using a grammar file
pChantPM->SetTrainingProperty(CTPTrainingGrammarVocab, L"colors.xml");
// Start training with dialog hidden using pre-recorded audio file
pChantPM->StartTraining(L"mytraining.wav", 0, CROFile, CAFDefault, false);
// Example 3
// Start training with dialog hidden using text file
pChantPM->StartTraining(L"mydocument.txt", 0, CROFile, CAFText, false);
CChantPM* ChantPM1; // ChantPM object
// Instantiate ChantPM object
ChantPM1 = new CChantPM();
ChantPM1->SetNumberProperty(CNPEngineAPI, CEMSPSR);
// Set the current speaker
pChantPM->SetStringProperty(CSPSpeaker, "Default Speaker");
// Example 1
// Training the speaker with ProfileKit grammar training
pChantPM->SetTrainingProperty(CTPTrainingPhraseText, "red\nblue\norange\ngreen\npurple\nyellow\nbrown\n");
// Start training with dialog hidden
pChantPM->StartTraining(NULL, 0, CROMultiMedia, CAFDefault, false);
// Example 2
// Training the speaker with ProfileKit using a grammar file
pChantPM->SetTrainingProperty(CTPTrainingGrammarVocab, "colors.xml");
// Start training with dialog hidden using pre-recorded audio file
pChantPM->StartTraining("mytraining.wav", 0, CROFile, CAFDefault, false);
// Example 3
// Start training with dialog hidden using text file
pChantPM->StartTraining("mydocument.txt", 0, CROFile, CAFText, false);
var
ChantPM1: TChantPM;
begin
// Instantiate ChantPM object
ChantPM1 := TChantPM.Create();
ChantPM1.SetNumberProperty(CNPEngineAPI, CEMSPSR);
// Set the current speaker
NChantPM1.SetStringProperty(CSPSpeaker, 'Default Speaker');
// Example 1
// Training the speaker with ProfileKit grammar training
ChantPM1.SetTrainingProperty(CTPTrainingPhraseText, 'red\nblue\norange\ngreen\npurple\nyellow\nbrown\n');
// Start training with dialog hidden
ChantPM1.StartTraining(nil, 0, CROMultiMedia, CAFDefault, False);
// Example 2
// Training the speaker with ProfileKit using a grammar file
ChantPM1.SetTrainingProperty(CTPTrainingGrammarVocab, 'colors.xml');
// Start training with dialog hidden using pre-recorded audio file
ChantPM1.StartTraining('mytraining.wav', 0, CROFile, CAFDefault, False);
// Example 3
// Start training with dialog hidden using text file
ChantPM1.StartTraining('mydocument.txt', 0, CROFile, CAFText, False);
end;
private JChantPM JChantPM1;
// Instantiate ChantPM object
JChantPM1 = new JChantPM();
JChantPM1.setNumberProperty(ChantNumberProperty.CNPEngineAPI, ChantEngineAPI.CEMSPSR);
// Set the current speaker
JChantPM1.setStringProperty(ChantStringProperty.CSPSpeaker, "Default Speaker");
// Example 1
// Training the speaker with ProfileKit grammar training
JChantPM1.setTrainingProperty(ChantTrainingProperty.CTPTrainingPhraseText, "red\nblue\norange\ngreen\npurple\nyellow\nbrown\n");
// Start training with dialog hidden
JChantPM1.startTraining("", 0, ChantRecordingObject.CROMultiMedia, ChantAudioFormat.CAFDefault, false);
// Example 2
// Training the speaker with ProfileKit using a grammar file
JChantPM1.setTrainingProperty(ChantTrainingProperty.CTPTrainingGrammarVocab, "colors.xml");
// Start training with dialog hidden using pre-recorded audio file
JChantPM1.startTraining("mytraining.wav", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFDefault, false);
// Example 3
// Start training with dialog hidden using text file
JChantPM1.startTraining("mydocument.txt", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFText, false);
WChantPM1.SetNumberProperty(CNPEngineAPI, CEMSPSR);
// Set the current speaker
WChantPM1.SetStringProperty(CSPSpeaker, "Default Speaker");
// Example 1
// Training the speaker with ProfileKit grammar training
WChantPM1.SetTrainingProperty(CTPTrainingPhraseText, "red\nblue\norange\ngreen\npurple\nyellow\nbrown\n");
// Start training with dialog hidden
WChantPM1.StartTraining("", 0, CROMultiMedia, CAFDefault, false);
// Example 2
// Training the speaker with ProfileKit using a grammar file
WChantPM1.SetTrainingProperty(CTPTrainingGrammarVocab, "colors.xml");
// Start training with dialog hidden using pre-recorded audio file
WChantPM1.StartTraining("mytraining.wav", 0, CROFile, CAFDefault, false);
// Example 3
// Start training with dialog hidden using text file
WChantPM1.StartTraining("mydocument.txt", 0, CROFile, CAFText, false);
Dim WithEvents XChantPM1 As XChantPM
XChantPM1.SetNumberProperty CNPEngineAPI, CEMSPSR
' Set the current speaker
XChantPM1.SetStringProperty(CSPSpeaker, "Default Speaker");
' Example 1
' Training the speaker with ProfileKit grammar training
XChantPM1.SetTrainingProperty CTPTrainingPhraseText, "red" + vbCrLf + "blue" + vbCrLf + "orange" + vbCrLf + "green" + vbCrLf + "purple" + vbCrLf + "yellow" + vbCrLf + "brown" + vbCrLf
' Start training with dialog hidden
XChantPM1.StartTraining vbNull, 0, CROMultiMedia, CAFDefault, False
' Example 2
' Training the speaker with ProfileKit using a grammar file
XChantPM1.SetTrainingProperty CTPTrainingGrammarVocab, "colors.xml"
' Start training with dialog hidden using pre-recorded audio file
XChantPM1.StartTraining "mytraining.wav", 0, CROFile, CAFDefault, False
' Example 3
' Start training with dialog hidden using using text file
XChantPM1.StartTraining "mydocument.txt", 0, CROFile, CAFText, False
Dim WithEvents NChantPM1 As NChantPM
' Instantiate ChantPM object
NChantPM1 = New NChantPM(Me)
NChantPM1.SetNumberProperty(ChantNumberProperty.CNPEngineAPI, ChantEngineAPI.CEMSPSR)
' Set the current speaker
NChantPM1.SetStringProperty(ChantStringProperty.CSPSpeaker, "Default Speaker");
' Example 1
' Training the speaker with ProfileKit grammar training
NChantPM1.SetTrainingProperty(ChantTrainingProperty.CTPTrainingPhraseText, "red" + vbCrLf + "blue" + vbCrLf + "orange" + vbCrLf + "green" + vbCrLf + "purple" + vbCrLf + "yellow" + vbCrLf + "brown" + vbCrLf)
' Start training with dialog hidden
NChantPM1.StartTraining("", 0, ChantRecordingObject.CROMultiMedia, ChantAudioFormat.CAFDefault, false)
' Example 2
' Training the speaker with ProfileKit using a grammar file
NChantPM1.SetTrainingProperty(ChantTrainingProperty.CTPTrainingGrammarVocab, "colors.xml")
' Start training with dialog hidden using pre-recorded audio file
NChantPM1.StartTraining("mytraining.wav", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFDefault, false)
' Example 3
' Start training with dialog hidden using using text file
NChantPM1.StartTraining("mydocument.txt", 0, ChantRecordingObject.CROFile, ChantAudioFormat.CAFText, false)