Open itsdapi opened 1 year ago
i tried
sf.write('stereo_file.mp3', np.random.randn(10, 2), 44100, format='MP3', subtype='MPEG_LAYER_III')
but it was the same result
On Linux, soundfile uses your system-installed libsndfile. What version is your libsndfile, and does it support MP3 yet?
On Linux, soundfile uses your system-installed libsndfile. What version is your libsndfile, and does it support MP3 yet?
yeah i have checked it is 1.1.0
On Linux, soundfile uses your system-installed libsndfile. What version is your libsndfile, and does it support MP3 yet?
But when i list all avaliable formats and suntypes, MP3 not showing up.
It might be that your libsndfile is the current version, but MP3 support is not enabled. Did you compile it with liblame and mpg123? Have a look at this build script to compile a working version: https://github.com/bastibe/libsndfile-binaries/blob/master/mac_build.sh
It might be that your libsndfile is the current version, but MP3 support is not enabled. Did you compile it with liblame and mpg123? Have a look at this build script to compile a working version: https://github.com/bastibe/libsndfile-binaries/blob/master/mac_build.sh
no i just download the tar.xz file and run the configure file, and sudo make install I will check it later
That's probably the reason then. The default compilation probably doesn't include MP3 support, or didn't find the required dependencies.
my code is
and the out put
Since the apt can only get libsndfile1 version 1.0.28, so i Cmake it to update to 1.1.0 like
The Soundfile version is 0.11.0b6 ubuntu server 20.04
It did generate an mp3 file but it was corrupted.