You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having issue with loading a large wav file.
So what I did was: I loaded a mp3 file with more than 20min music and then saved it as wav.
But when I load the wav that I just generated it gives the error below:
/home/achang/torch/install/share/lua/5.1/audio/init.lua:56: [read_audio] Unknown length at /tmp/luarocks_audio-0.1-0-130/lua---audio/generic/sox.c:45
stack traceback:
[C]: in function 'load'
/home/achang/torch/install/share/lua/5.1/audio/init.lua:56: in function 'load'
mp3_play.lua:16: in function 'load_file'
[string "x = load_file('music.wav')"]:1: in main chunk
[C]: in function 'xpcall'
/home/achang/torch/install/share/lua/5.1/trepl/init.lua:670: in function 'repl'
...hang/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:199: in main chunk
[C]: at 0x00405d50
I use the code below to convert:
functionconvert_mp3_2_wav(file_path)
localx, sample_rate=audio.load(file_path)
localoutpath=file_path:gsub(".mp3", ".wav")
audio.save(outpath, x, sample_rate)
end
When use a player the wav file sounds fine.
The text was updated successfully, but these errors were encountered:
I am having issue with loading a large wav file.
So what I did was: I loaded a mp3 file with more than 20min music and then saved it as wav.
But when I load the wav that I just generated it gives the error below:
I use the code below to convert:
When use a player the wav file sounds fine.
The text was updated successfully, but these errors were encountered: