2019-04-29 13:58:42 +01:00
|
|
|
$basepath="."
|
|
|
|
$in_put="$basepath/Input"
|
|
|
|
$output="$basepath/Output"
|
2019-04-29 14:00:22 +01:00
|
|
|
$ffmpeg=Get-Command -ErrorAction SilentlyContinue ffmpeg
|
2019-04-29 13:58:42 +01:00
|
|
|
if ($ffmpeg -eq $null) {
|
2019-04-29 14:00:22 +01:00
|
|
|
$ffmpeg="$basepath/ffmpeg"
|
2019-04-29 13:58:42 +01:00
|
|
|
}
|
|
|
|
$toconvert=Get-ChildItem "$in_put/"
|
|
|
|
$toconvert|%{
|
|
|
|
$outfn=$_ -replace '\.[a-zA-Z0-9]+$','.wav'
|
|
|
|
& $ffmpeg -i "$in_put/$_" -acodec pcm_s16le -ac 1 -ar 8000 "$output/$outfn"
|
|
|
|
}
|