How to Use Multiple Custom Keyword on prime

kailash solanki 1 Reputation point

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>>();


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 ?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,476 questions
{count} votes