-
jovica
@JonB thank you for your prompt response. What you suggested works: A wav file gets created.
Unfortunately, AWS lex still does not seem to understand it once I submit it.
Is there a way to capture a MPEG audio? That works as I receive MPEG response from Lex bot which I have then submitted right back to it and it worked like charm, bot can "understand it and response shows that in inputTranscript text that gets returned.
-
jovica
I am trying to capture audio on my iPad to submit to AWS Lex bot using Audio recorder. This is the code that records the audio:
settings = {ns('AVFormatIDKey'):ns(1633772320), ns('AVSampleRateKey'):ns(16000), ns('AVNumberOfChannelsKey'):ns(2), ns('AVLinearPCMBitDepthKey'):ns(16), ns('AVLinearPCMIsBigEndianKey'):ns(0),ns('AVLinearPCMIsFloatKey'):ns(0)}
output_path = os.path.abspath(FileName)
out_url = NSURL.fileURLWithPath_(ns(output_path))
recorder = AVAudioRecorder.alloc().initWithURL_settings_error_(out_url, settings, None)However, Lex bot does not "understand" the submitted audio captured using above code.
I understand that Lex needs a Linear PCM but I am unsure what settings to use in the above code to achieve that.
Can somebody point me in the right direction?