Discussed on the mailing list.
SoX can't encode amr-wb... because it's compiled with libopencore-amrwb.
But libopencore-amrwb is a DEcoder.
Needs to be compiled with vo-amrwbenc ENcoder.
sox -d output.amr-wb
sox WARN formats: amr-wb can't encode at 48000Hz; using 16000Hz
sox WARN formats: amr-wb can't encode stereo; setting channels to 1
sox FAIL formats: can't open output file `output.amr-wb'
SoX was compiled without AMR-WB encoding support.
Build script.
I've had another look at this problem.
Using Ubuntu, SoX is insisting on compiling against libopencore-amrnb libopencore-amrwb.
I have libopencore-amrnb-dev libopencore-amrwb-dev packages installed because they are used when compiling other programs eg FFmpeg.
My workaround is to uninstall those two dev packages and compile SoX against temporary local static builds of amrnb and amrwb.
Then re-install the dev packages afterwards.
My build script is attached.
Nobody's shown any interest in this bug so I'm gonna mark it as 'fixed'
Now SoX will convert to amr-nb AND amr-wb.
@ubuntu:~$ sox foo.wav foo.amr-nb
sox WARN formats: amr-nb can't encode at 44100Hz; using 8000Hz
sox WARN formats: amr-nb can't encode stereo; setting channels to 1
@ubuntu:~$ mediainfo foo.amr-nb
General
Complete name : foo.amr-nb
Format : AMR
Format/Info : Adaptive Multi-Rate
File size : 18.9 KiB
Audio
Format : AMR
Format/Info : Adaptive Multi-Rate
Format profile : Narrow band
Channel(s) : 1 channel
Sampling rate : 8 000 Hz
Bit depth : 13 bits
@ubuntu:~$ sox foo.wav foo.amr-wb
sox WARN formats: amr-wb can't encode at 44100Hz; using 16000Hz
sox WARN formats: amr-wb can't encode stereo; setting channels to 1
@ubuntu:~$ mediainfo foo.amr-wb
General
Complete name : foo.amr-wb
Format : AMR
Format/Info : Adaptive Multi-Rate
File size : 26.4 KiB
Audio
Format : AMR
Format/Info : Adaptive Multi-Rate
Format profile : Wide band
Channel(s) : 1 channel
Sampling rate : 16.0 KHz
Bit depth : 14 bits