summaryrefslogtreecommitdiffstats
path: root/contrib/gen_testdata.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gen_testdata.sh')
-rwxr-xr-xcontrib/gen_testdata.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/gen_testdata.sh b/contrib/gen_testdata.sh
new file mode 100755
index 0000000..a8bb8c9
--- /dev/null
+++ b/contrib/gen_testdata.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# script to generate a .s16 file (s16le with 8kHz) from an arbitrary MP3
+# usage: gen_testdata.sh foo.mp3 foo.s16
+
+WAV=`mktemp`
+MP3=$1
+S16=$1
+
+mpg123 -w "$WAV" "$MP3"
+sox "$WAV" -b 16 -c 1 -r 8000 "$S16"
+rm "$WAV"