Remove sample rate parameter usage from JavaScript binding
This commit is contained in:
parent
97bab38a7e
commit
385279bc20
@ -118,9 +118,9 @@ audioStream.on('finish', () => {
|
||||
// We take half of the buffer_size because buffer is a char* while
|
||||
// LocalDsSTT() expected a short*
|
||||
if (args['extended']) {
|
||||
console.log(metadataToString(model.sttWithMetadata(audioBuffer.slice(0, audioBuffer.length / 2), 16000)));
|
||||
console.log(metadataToString(model.sttWithMetadata(audioBuffer.slice(0, audioBuffer.length / 2))));
|
||||
} else {
|
||||
console.log(model.stt(audioBuffer.slice(0, audioBuffer.length / 2), 16000));
|
||||
console.log(model.stt(audioBuffer.slice(0, audioBuffer.length / 2)));
|
||||
}
|
||||
const inference_stop = process.hrtime(inference_start);
|
||||
console.error('Inference took %ds for %ds audio file.', totalTime(inference_stop), audioLength.toPrecision(4));
|
||||
|
@ -66,7 +66,6 @@ Model.prototype.enableDecoderWithLM = function() {
|
||||
*
|
||||
* @param {object} aBuffer A 16-bit, mono raw audio signal at the appropriate sample rate.
|
||||
* @param {number} aBufferSize The number of samples in the audio signal.
|
||||
* @param {number} aSampleRate The sample-rate of the audio signal.
|
||||
*
|
||||
* @return {string} The STT result. Returns undefined on error.
|
||||
*/
|
||||
@ -81,7 +80,6 @@ Model.prototype.stt = function() {
|
||||
*
|
||||
* @param {object} aBuffer A 16-bit, mono raw audio signal at the appropriate sample rate.
|
||||
* @param {number} aBufferSize The number of samples in the audio signal.
|
||||
* @param {number} aSampleRate The sample-rate of the audio signal.
|
||||
*
|
||||
* @return {object} Outputs a :js:func:`Metadata` struct of individual letters along with their timing information. The user is responsible for freeing Metadata by calling :js:func:`FreeMetadata`. Returns undefined on error.
|
||||
*/
|
||||
@ -93,7 +91,6 @@ Model.prototype.sttWithMetadata = function() {
|
||||
/**
|
||||
* Create a new streaming inference state. The streaming state returned by this function can then be passed to :js:func:`Model.feedAudioContent` and :js:func:`Model.finishStream`.
|
||||
*
|
||||
* @param {number} aSampleRate The sample-rate of the audio signal.
|
||||
* @return {object} an opaque object that represents the streaming state.
|
||||
*
|
||||
* @throws on error
|
||||
|
Loading…
Reference in New Issue
Block a user