How to Use Multiple Custom Keyword on prime
I am Using Custom keyword .table file on prime like -
private async Task InitializeKeywordModel()
{
const string keywordFilePath = "ms-appx:///Keyword/keywordfirst.table";
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri(keywordFilePath));
this.model = KeywordRecognitionModel.FromFile(file.Path);
}
kresult = await krecognizer.RecognizeOnceAsync(here i need to pass collection of Model);
it's working fine for me with single keyword model. but now i have multiple keyword file So How can i use that
i tried to use like -
List<Task<KeywordRecognitionResult>> lstTasks = new List<Task<KeywordRecognitionResult>>();
lstTasks.Add(ProcessHey("keywords/keywordfirst.table"));
lstTasks.Add(ProcessHeySecond("keywords/keywordsecond.table"));
public async Task<KeywordRecognitionResult> ProcessHey(string str)
{
heymodel = KeywordRecognitionModel.FromFile(str);
var audioConfig = AudioConfig.FromWavFileInput("hey.wav");
var keywordRecognizer = new KeywordRecognizer(audioConfig);
return await Task<KeywordRecognitionResult>.Run(async () =>
{
return await keywordRecognizer.RecognizeOnceAsync(heymodel);
});
}
same as i have implemented Task method for HeySecond Keyword but it's not working
i need help in how to pass collection of model ?