I'm using Communication Service from Azure to make an outbound call following this example Make an outbound call using Call Automation. This Communication Service is connected to an Azure Speech Service.
I'm receiving the call in my phone, but when I try to play the TextSource:
var GoodbyePlaySource = new TextSource(text)
{
VoiceName = "es-ES-EstrellaNeural"
};
await callConnectionMedia.PlayToAllAsync(GoodbyePlaySource);
I receive the error
Action failed due to a Cognitive Services authentication error. Please check your authorization input and ensure it is correct.
In the configuration of the call, I set the CognitiveServicesEndpoint:
CallInvite callInvite = new CallInvite(target, caller);
var createCallOptions = new CreateCallOptions(callInvite, callbackUri)
{
CallIntelligenceOptions = new CallIntelligenceOptions() { CognitiveServicesEndpoint = new Uri(cognitiveServiceEndpoint) },
};
With the endpoint of my Speech Service:
var cognitiveServiceEndpoint = "https://[REGION].api.cognitive.microsoft.com/";
But I suppose that I've to add the KEY of the Speech Service somewhere to authenticate, but I can't see where is the place or maybe the error doesn't have to do with this?