Hi I am trying to create a simple software which will help in translating
audio/speech into text using crowd-sourcing
#!/bin/bash
fNAME=$0
DurationOfNewFiles=20
TotalDur=$(ffmpeg -i Bharatiya_Azaadi_Ka_Itihaas.mp3 2>&1 | grep Duration
| cut -d ' ' -f 4 | sed s/,// | cut -d "." -f1)
h=$(echo $TotalDur | cut -d ":" -f1)
m=$(echo $TotalDur | cut -d ":" -f2)
s=$(echo $TotalDur | cut -d ":" -f3)
let TotalSec=$h*3600+$m*60+$s
let NumNewFiles=($h*3600+$m*60+$s)/$DurationOfNewFiles+1
echo $NumNewFiles;
for i in $(seq 1 1 $NumNewFiles)
do
let ss=$i*$DurationOfNewFiles
echo "ffmpeg -f mp3 -i $fNAME -ss $ss -t $DurationOfNewFiles -acodec
libvorbis out_$i.ogg"
done
exit 0
Above Script take (mp3) file and split that file into 20 second audio files!
== IMPROVEMENTS ==
Script can be improved like, detecting filetype , returning Errors etc,
support for youtube so that youtube videos will be downloaded and converted
into mp3 and then into smaller pieces !
This will be Step one where user will upload his- audio file to server - So
html/php coding will be done in order to upload files.
once file is uploaded, it will be splited into pieces and and information
will be saved into Database,
UI will be written so that visiting user will get a random 10-20 second
audio and he/she will type and send back to server(database),
This way we can use crowd-sourcing for audio to text conversion !
I have explained the project and those who want to contribute can code any
part of the project !
--
┌─────────────────────────┐
│ Narendra Sisodiya
│ http://narendrasisodiya.com
└─────────────────────────┘
--
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer