Code Monkey home page Code Monkey logo

asterisk-sounds-convert's Introduction

asterisk-sounds-convert

mp3 to wav

lame --decode file.mp3 - | sox -v 0.5 -t wav - -t wav -b 16 -r 8000 -c 1 file.wav

ffmpeg compatible to wav

ffmpeg -i file.m4a -ac 1 -ab 128k -ar 8000 -acodec pcm_s16le file.wav

NB: Get a list of supported decoders by running ffmpeg -codecs | grep D[E.]

wav to mp3

lame -V2 input.wav output.mp3

gsm to wav

sox input.gsm -r 8000 -c 1 -w -s ouput.wav

wav to gsm

sox input.wav -r 8000 -c 1 -t gsm output.gsm

bulk

#!/bin/bash

for f in *.mp3; do
    lame --decode $f - | sox -v 0.5 -t wav - -t wav -b 16 -r 8000 -c 1 $(basename -s .mp3 $f).wav
done

bulk ffmpeg

#!/bin/bash

for f in *.*; do 
    ffmpeg -i "$f" -ac 1 -ab 128k -ar 8000 -acodec pcm_s16le "${f%.*}.wav"
done

wav to g722

ffmpeg -i vm-intro.wav -ar 16000 -acodec g722 vm-intro.g722

http://wiki.innovaphone.com/index.php?title=Howto:Convert_wave_files_in_to_G722_coder_files

wav to opus

/usr/bin/ffmpeg -i sound.wav -acodec libopus -ar 8000 -ab 8000 sound.ogg

opus to wav

opusdec --force-wav sound.ogg sound.wav

additional options for astrisk compatible

opusdec --force-wav --rate 8000 sound.ogg sound.wav

wav repair

sox -t raw -r 8000 -b 16 -c 1 -L -e signed-integer broken.wav fixed.wav

when record to wav was broken

amr to mp3

ffmpeg -i input.amr -ar 12000 output.mp3

wav to ulaw/alaw

sox -V vm-intro.wav -r 8000 -c 1 -t ul vm-intro.ulaw

sox -V vm-intro.wav -r 8000 -c 1 -t al vm-intro.alaw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.