I have this code :
if (activity.Type == ActivityTypes.Message)
{
var audioAttachment = activity.Attachments?.FirstOrDefault(a => a.ContentType.Equals("audio/wav") || a.ContentType.Equals("application/octet-stream"));
if (audioAttachment != null)
{
var connector = new ConnectorClient(new Uri(activity.ServiceUrl));
var stream = await GetAudioStream(connector, audioAttachment);
var text = await this.speechService.GetTextFromAudioAsync(stream);
Activity reply = activity.CreateReply(text);
await connector.Conversations.ReplyToActivityAsync(reply);
}
else
{
await Conversation.SendAsync(activity, () => new Dialogs.RootDialog());
}
}
else
{
HandleSystemMessage(activity);
}
var response = Request.CreateResponse(HttpStatusCode.OK);
return response;
When i input something it check if is audio file or text and if is audio it sent to Bing Speech in order to get text out of audio file.
I tested it on Bot Framework emulator and is working but when i try to upload a file from web chat it say couldn't sent also i got this error -- There was an error sending this message to your bot: HTTP status code GatewayTimeout
I want to deploy this bot on skype and to upload audio file or to use microfon and to get text form this.