Skip to content

Instantly share code, notes, and snippets.

@IT-Berater
Created September 6, 2018 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IT-Berater/646dfa6a11290445eb6439716228f6c8 to your computer and use it in GitHub Desktop.
Save IT-Berater/646dfa6a11290445eb6439716228f6c8 to your computer and use it in GitHub Desktop.
Das Script create-tag-mp3-files-dezimal.sh erzeugt wav und mp3 Dateien im Verzeichnis mit einer Nachkommastelle.
#!/bin/bash
#
# Thomas Wenzlaff
#
# Das Script create-tag-mp3-files-dezimal.sh erzeugt wav und mp3 Dateien im Verzeichnis mit
# einer Nachkommastelle.
#
#
VERZEICHNIS="./pico2wave"
cd $VERZEICHNIS || exit
echo "Starte erzeugen ..."
counter=0
while [ $counter -le 100 ]
do
dezcounter=0
while [ $dezcounter -le 9 ]
do
echo "Erzeuge: $counter,$dezcounter.wav"
pico2wave --lang=de-DE --wave="$counter.$dezcounter.wav" "$counter,$dezcounter"
echo "Erzeuge mp3 Datei $counter.$dezcounter.mp3"
lame -b 320 "$counter.$dezcounter.wav"
((dezcounter++))
done
((counter++))
done
echo "Tagge alle $VERZEICHNIS *.mp3 Dateien"
for i in *.mp3 ; do
dateiname=$(echo "${i}" | sed 's/.mp3$//')
echo "${i}"
id3v2 -t "Ansage der Zahl $dateiname" -T "1" -A "wenzlaff.de" -a "Thomas Wenzlaff" -y "2018" -c "$dateiname" -g 39 "${i}"
done
echo "Erzeuge eine Zip Datei ..."
cd ..
zip -r mp3-0-100-dezimal.zip $VERZEICHNIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment