Audio
The audio editor is a multitrack editor in the page. Open WAV, MP3, AAC, Ogg or FLAC - the 8 kHz recordings telephone systems make included - and arrange them as clips on tracks: cut, copy, paste, split, trim, move, fade in and out with four curve shapes, change the volume of a stretch, play backwards. Nothing touches the original recordings, and every step undoes. Mute, solo, volume and pan per track; zoom from the whole recording to single samples; a frequency view for any track; markers and regions.
Loudness is measured to the broadcast standards and set to the target for streaming, podcasts, speech or broadcast; silence is found and removed. And it is built for call recordings: give it the transcript a speech-to-text service returns and it finds card numbers, security codes, bank details, phone numbers, email addresses, postcodes and dates of birth however they were said - and card numbers keyed in on the phone's keypad - and bleeps them on every track, keeping a log of what was removed. Audio never leaves the page.
Redacting a card payment call
A made-up customer call, generated in the page: the agent on one track, the caller on the other, with a transcript. Find the personal data, bleep it, play it back, export the redacted call and the log. The voices are synthetic babble, so listen for the bleeps rather than the words.
// Node 18 or later, from the Gold package: bleep every call recorded today before it is archived.
import { decodeWav, encodeWav, readWords, findRedactions, singleClipProject, addRedactions, renderProject } from './dist/node/bmx-audio-editor.mjs';
for (const call of await todaysCalls()) {
const audio = decodeWav(await readFile(call.wav));
const words = readWords(await readFile(call.transcript, 'utf8'));
const found = findRedactions({ words, samples: audio.channels[0], sampleRate: audio.sampleRate });
const project = addRedactions(singleClipProject(audio, 'call'), found).project;
await writeFile(call.archivePath, encodeWav(renderProject(project, new Map([['call', audio]]))));
await log(call.id, found.map(f => ({ start: f.start, end: f.end, what: f.label })));
}
Tidying a recorded talk
A talk recorded from the back of a room: long pauses, and far too quiet. Find the pauses, take them out, and bring the level up to the podcast target - each step undoes.
Get the code
<script src="/assets/bmx-components.min.js"></script> <bmx-audio-editor id="au-talk" label="Recorded talk" style="inline-size: 100%; --bmx-audio-editor-height: 18rem"></bmx-audio-editor>