anton-bot / Facebook-Messenger-Voice-Message-Converter

Converts the Facebook Messenger voice messages from video/mp4 or audio/aac to the PCM/WAV format suitable for Bing Speech API
MIT License
7 stars 3 forks source link

Error in the code #1

Open stelazh opened 7 years ago

stelazh commented 7 years ago

I cannot use this sample ..i have problem in : //Convert MP4 to WAV var wavFolder = Utils.GetHomeFolder() + WebConfigurationManager.AppSettings["WAVFilesFolder"]; var converter = new AudioFileFormatConverter(mp4, wavFolder); var wav = converter.ConvertMP4ToWAV();

                    //Convert .WAV file to text
                    var bing = new MicrosoftCognitiveSpeechService(); //gets the path + filename
                    var text = await bing.GetTextFromAudioAsync(wav); //takes path+filename to WAV file, returns text

Utils.GetHomeFolder don't exist in current context

For bing.GetTextFromAudioAsync(wav) errorfile i got this message : cannot convert from 'string' to 'System.IO.Stream'

anton-bot commented 7 years ago

Utils.GetHomeFolder - you can write your own method that returns the full path to the home directory.

GetTextFromAudioAsync - your function doesn't take a string, it takes a stream. It should take a string (path and filename).