How to track the progress of a enrollProfileAsync call in the microsoft-cognitiveservices-speech-sdk
Suman Bhagavathula
0
Reputation points
I have Speech Recognition service approved and enabled for my scenario. I am trying to create a profile and enroll using a audio file. The first step (profile creation) completed, but the enrollProfileAsync seems to take forever for a 5 min audio file. Is there a way to track the progress and estimate completion time? I am using the below code snippet and getting stuck on penultimate line (enrollProfileAsync call). Any help is appreciated.
const enrollFile = "myEnrollFile.wav"; // 16000 Hz, Mono
// now create the speech config with the credentials for the subscription
const speechConfig = sdk.SpeechConfig.fromSubscription(subscriptionKey, serviceRegion);
const client = new sdk.VoiceProfileClient(speechConfig);
const locale = "en-us";
const profile = await client.createProfileAsync(sdk.VoiceProfileType.TextIndependentIdentification, locale);
const audioConfig = sdk.AudioConfig.fromWavFileInput(fs.readFileSync(enrollFile));
console.log("Profile id: " + profile.profileId +" created, now enrolling using file: " + enrollFile);
const enrollResult = await client.enrollProfileAsync(profile, audioConfig);
console.log("(Enrollment result) Reason: " + sdk.ResultReason[enrollResult.reason]);
Sign in to answer