Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wav转mp3声音变调了,已经不是人声了,而且速度也变快了 #1

Open
didikee opened this issue Jul 8, 2018 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@didikee
Copy link

didikee commented Jul 8, 2018

Mp3Encoder.Options options = new Mp3Encoder.Options()
.sampleRate(24000)
.bitrate(128)
.numChannels(1)
.quality(5)
.mode(Mp3Encoder.Options.MONO);

wav的格式为
channel 1
bitNumber 16
sampleRate 24000

@4332weizi 4332weizi added the bug Something isn't working label Jul 12, 2018
@4332weizi 4332weizi self-assigned this Jul 12, 2018
@HE-SOFT
Copy link

HE-SOFT commented Jul 26, 2018

找到解决办法了:
https://stackoverflow.com/questions/16926725/audio-speed-changes-on-converting-wav-to-mp3
转换单声道wav要在mp3_encoder.c中做以下修改
sizeof(short int) * 2 -> sizeof(short int)
lame_encode_buffer_interleaved(...) -> lame_encode_buffer(gf, wav_buffer, NULL, read, mp3_buffer, 8192)

@4332weizi
Copy link
Owner

谢谢,有时间了我改下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants