mirror of
https://github.com/jambonz/batch-speech-utils.git
synced 2026-07-04 19:32:03 +00:00
17 lines
499 B
JavaScript
17 lines
499 B
JavaScript
const { redactAudioDeepgram } = require('./make-redact-audio-deepgram');
|
|
|
|
const assert = require('assert');
|
|
|
|
function getRedactedAudio(vendor, transcriptionData, audioPath, audioOutputPath) {
|
|
assert.ok(['deepgram', 'otherVendor'].includes(vendor), 'vendor not supported');
|
|
|
|
if (vendor === 'deepgram') {
|
|
return redactAudioDeepgram(transcriptionData, audioPath, audioOutputPath);
|
|
}
|
|
else {
|
|
throw new Error(`Unsupported vendor: ${vendor}`);
|
|
}
|
|
}
|
|
|
|
module.exports = { getRedactedAudio };
|