jpemartins / speex.js

Speex codec in Javascript. Mirror from https://code.ua.pt/projects/speex-js
214 stars 63 forks source link

Generated Ogg files are too short #15

Open dbieber opened 10 years ago

dbieber commented 10 years ago

The Ogg files generated by your demo in the Encoding some WAV to OGG section (http://www.jpemartins.com/speex.js/) are too short. Much of the original WAV audio is lost in the conversion to Ogg.

jpemartins commented 10 years ago

Hi,

Thanks a lot, for reporting this.

I seem to hear the whole clip, using the web page to encode/decode. Could you tell me you reproduced the issue i.e. file you used, sample rate and what you expect?

NOTE: The generated file is not fully compliant with Ogg spec, since I don't handle granule_pos. So if you are testing on a normal player, may be it is related to this issue.

dbieber commented 10 years ago

I'm playing the Ogg files back with VLC after encoding the samples (female.wav or wb_male_speex_21.wav) in Chrome.

dbieber commented 10 years ago

You're right though; if I use the webpage to decode back to wav, the file is OK. (And I see now this issue with some explanation: https://github.com/jpemartins/speex.js/issues/13)

jpemartins commented 10 years ago

Yeap, the problem is granule_pos as I reported in #13 . In VLC the audio might get cut.

Though I haven't found the time to fix it yet.

pgee70 commented 9 years ago

any progress on this issue??

Anniywell commented 9 years ago

Can you fix it recently?

pgee70 commented 9 years ago

Hi I ended up using another library - I modified one I downloaded, but was not able to find a URL for you. It encodes on the fly into opus format, not speech - It seems to give better quality at lower bitrates - I can also record voice for an hour into 18MB - So that is also pretty cool.

Regards Pete

On 17 Apr 2015, at 5:14 pm, Anniywell notifications@github.com wrote:

Can you fix it recently?

— Reply to this email directly or view it on GitHub https://github.com/jpemartins/speex.js/issues/15#issuecomment-93928789.