An example web application using the Lex JavaScript SDK to send and receive audio from the Lex PostContent API. Demonstrates how to capture an audio device, record audio, and convert the audio into a format that Lex will recognize, and play the response. All from a web browser.
if the recording is downsampled the new sample rate must also be passed to encodeWAV so that the wave header includes the new/correct sample rate.
*Issue #22
Description of changes:
Extended the encodeWAV function with a argument "sampleRate", this sample rate is now written to the wave header (not using the global variable recordSampleRate anymore). And in the exportBuffer function I pass now the new samplerate to the encodeWAV function.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
if the recording is downsampled the new sample rate must also be passed to encodeWAV so that the wave header includes the new/correct sample rate.
*Issue #22
Description of changes: Extended the encodeWAV function with a argument "sampleRate", this sample rate is now written to the wave header (not using the global variable recordSampleRate anymore). And in the exportBuffer function I pass now the new samplerate to the encodeWAV function.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.