I integrated the 30 days free trial of the Speech to Text of Microsoft Cognitive Services.
var config = SpeechConfig.FromSubscription("fake", "westus");
using (var recognizer = new SpeechRecognizer(config))
{
lock (threadLocker)
{
waitingForReco = true;
}
var result = recognizer.RecognizeOnceAsync().Result;
string newMessage = string.Empty;
if (result.Reason == ResultReason.RecognizedSpeech)
{
newMessage = result.Text;
}
else if (result.Reason == ResultReason.NoMatch)
{
newMessage = "NOMATCH: Speech could not be recognized.";
}
else if (result.Reason == ResultReason.Canceled)
{
var cancellation = CancellationDetails.FromResult(result);
newMessage = $"CANCELED: Reason={cancellation.Reason} ErrorDetails={cancellation.ErrorDetails}";
}
lock (threadLocker)
{
message = newMessage;
waitingForReco = false;
}
}
When i connect to the api with the free demo key it works. When i create an Azure Cognitive Service in Azure it always returns Canceled.
Are there any other differences i have to configure for this demo key and a production key?

