Maitre_yoda_models/wake-word/wake-word/addNoise.sh

13 lines
252 B
Bash
Executable File

#!/bin/bash
NOISEDIR=$1
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
for f in *.wav
do
NOISEFILE=$(find ${NOISEDIR} -type f | shuf -n 1)
sox -m -v 0.9 $f -v 0.1 ${NOISEFILE} noise.$f trim 0 `soxi -D $f`
done