Files
batch-speech-utils/lib/redact.js
T
2024-06-13 03:05:13 -04:00

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 };