Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Speex wishlist (Read 12057 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Speex wishlist

Hi,

I'm the author of Speex , an open-source speech codec, and I've found a couple threads about Speex on this forum. Speex is now at 0.7.0 and I'm thinking about freezing the bit-stream soon, so I'd like to have comments on the actual code/bit-stream so I can fix any problem/add important features before the bit-stream freeze. Anything else you'd like to see in Speex? Any bug?

I've also seen many people looking for Win32 versions. Most of Speex (the libspeex library) is completely platform-independent ANSI C code and I've had many reports of libspeex compiling fine on Win32. However, the command-line programs (speexenc,speexdec) use the libogg library (from Ogg Vorbis) to store the file and I'm not sure what the Win32 status of this library is. I do not have a Win32 development environment, but if someone is willing to build a Win32 project and adapt the code, I'm willing to cooperate and include the result in the next release.

Speex wishlist

Reply #1
Yeah, I would love to use this on my Windows box!

A little Gui would  also be great.  Thanks alot for your work on this. I send lots of voice e-mails and get screwed by hotmails size limitations all the time:mad:

Speex wishlist

Reply #2
Yes, I would also like windows-speex a lot, I downloaded the examples and was very suprised about the nearly perfect quality! I would like to see how it perform against Floggy-Vorbis (this 3-6KBit/s files from Garf). I tried several times to compile it, but with no luck. It would be also very useful for LQ-videos (tv-rip series etc.), maybe Tobias will implement it in his DirectShow-Filters for OGG Media-Files (these files are also playable under Linux with MPlayer).

 

Speex wishlist

Reply #3
Quote
Originally posted by S_O
Yes, I would also like windows-speex a lot [...] I tried several times to compile it, but with no luck.


Can you tell me what the errors are? (Did you have libogg installed?). I don't have a Win32 development environment so I need some feedback to do the port.

Speex wishlist

Reply #4
I´m not a programmer and my c++ knowledge is very limited.
I tried compiling with M$ Visual C++ 6. First there is no project-file (*.dsp; *.dsw), so I don´t know which the main-file is. I ried the testenc.c from the libspeex-directory. The error-messages are:
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_decoder_destroy
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_encoder_destroy
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_decode
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_bits_rewind
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_bits_write
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_encode
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_bits_reset
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_bits_init
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_encoder_ctl
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_decoder_ctl
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_decoder_init
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_encoder_init
testenc.obj : error LNK2001: Nichtaufgeloestes externes Symbol _speex_nb_mode

I also tired the speexenc.c from the src-directory. Here I have some other problems with "VERSION" and mising ";". I could fix that with repplacing VERSION with 0.7.0. After fixing that I get the same errors as above.

Speex wishlist

Reply #5
Quote
Originally posted by S_O
I´m not a programmer and my c++ knowledge is very limited.
I tried compiling with M$ Visual C++ 6. First there is no project-file (*.dsp; *.dsw), so I don´t know which the main-file is. I ried the testenc.c from the libspeex-directory. The error-messages are:
...


Try compiling in C, maybe it's just a matter of C++ mangling and 'extern "C"'s... One way or another, it's a linking problem. Maybe one way to work around this is to put all the files in libspeex (except the test*.c ones) along with speexenc and try compiling that as one project, without library. I think MSVC has a special (non-standard) syntax for making symbols exportable outside a library. If you don't want to go through all that, I'm pretty sure cygwin will compile Speex without any problem.

Speex wishlist

Reply #6
Quote
Maybe one way to work around this is to put all the files in libspeex (except the test*.c ones) along with speexenc and try compiling that as one project, without library.

I allready did that, otherwise the speexenc.d can´t find speex.h
Quote
Try compiling in C, maybe it's just a matter of C++ mangling and 'extern "C"'s... One way or another, it's a linking problem.

How to switch the compiler from c++ to c?
Quote
I'm pretty sure cygwin will compile Speex without any problem.

I´m yust downloading it, hopefully it´s easy to use (at least the installer looks easy).

Speex wishlist

Reply #7
I thought I install it, open the makefile, press compile and that´s it, but that would be to easy. It´s only an win32-dos-application which looks like that:
Code: [Select]
Stefan1@STEFAN ~

$
??? Behind the "$" I can write a command. But I never used Linux/Unix so I have no idea what I have to do to compile it.

Speex wishlist

Reply #8
If you don't have any experiences with GNU/Linux/Unix, I'd advise you not to use cygwin, because it is just an POSIX layer + apps for Win32, which brings you all the glory of GNU and Unix to your Win32 desktop. By the way, what you see (the DOS-box) is the bash (unix shell).
dev0
"To understand me, you'll have to swallow a world." Or maybe your words.

Speex wishlist

Reply #9
Are you able to compile with cygwin? if yes it would be great if you could send me the binaries or upload them on your "Müllkippe".

Speex wishlist

Reply #10
I'll try to when I'm back from work...
dev0
"To understand me, you'll have to swallow a world." Or maybe your words.

Speex wishlist

Reply #11
OK, guys. I have just uploaded win32 binaries to Roberto, so they should be available sometime soon.

Playback is enabled in the decoder so you can hear what you have without having to decode to wave file. These were compiled with ICL6.0, but the project files will work with MSVC as well.

Give me a while and I'll upload the amended sources, including the project files. The major changes were in the decoder mainly to enable playback.

Have fun!!

Edit @15:28
Just uploaded the revised sources to Roberto. The path info is saved and assumes the root speex dir to be called 'Speex'. 'ogg_static.lib' will be compiled as an included library, so you will need to amend the project files to point to wherever you have the lib_ogg sources. 'wave_out.c' and wave_out.h' are additional files in the 'src' sub-dir that provide the win32 playback functions. You may also need to amend the path of the include files, but they should be alright except probably for 'ogg.h' in the 'ogg/include/ogg' sub-dir.

Speex wishlist

Reply #12
Great! Are the files already up? If yes could you post a direct link, because RareWares isn´t updated yet?

Speex wishlist

Reply #13
Quote
Originally posted by S_O
Great! Are the files already up? If yes could you post a direct link, because RareWares isn´t updated yet?


Just uploaded the files, and updated RareWares.

Regards;

Roberto.

Speex wishlist

Reply #14
Quote
Originally posted by john33
Playback is enabled in the decoder so you can hear what you have without having to decode to wave file. These were compiled with ICL6.0, but the project files will work with MSVC as well.


Great! I'll apply the patch to Speex so that future versions can work too. Should I add the win32 directory (with the project files) too?

Speex wishlist

Reply #15
Quote
Should I add the win32 directory (with the project files) too?

I would suggest doing so to make it easy for win32 users to compile.

Speex wishlist

Reply #16
Quote
Originally posted by john33
 
I would suggest doing so to make it easy for win32 users to compile.


BTW, is this patch "final" or do you want me to wait for a second version? Also, do speexenc and speexdec have the same functionality under Win32 and POSIX?

Speex wishlist

Reply #17
Yust finished my first Speex-test with the result it sounds very good when one person talking, but when many people are talking sometimes some voices sound like background-noise. For testing I used the Dolby Headphone audio-only trailer (1:55 only voices). Unfortunately I yust have a mp3 of it as original, but it sounds very good.
As commandline I used: speexenc -w --vbr --comp 10 -V ddhead-wb.wav ddhead-wb.spx
Also the bitrate is quite high, for wideband ~26KBit/s, for narrowband ~16KBit/s. At the same samplerate (8kHz) Vorbis produced 6KBit/s files, unfortunately I don´t have this Vorbis-Encoder to compare this trailer with it. I will also compare WMA with it (yes, the second time I use WMA)

Speex wishlist

Reply #18
Quote
Originally posted by S_O
I will also compare WMA with it (yes, the second time I use WMA)


I suggest you try it with Windows Media Encoder's ACELP.NET as well.

Speex wishlist

Reply #19
Quote
Originally posted by S_O
Yust finished my first Speex-test with the result it sounds very good when one person talking, but when many people are talking sometimes some voices sound like background-noise.


This is normal behaviour for a speech codec. Speex will usually work much better than Vorbis or MP3 on a single speech sample, but it will be worse on music or multiple voices.

As for the bit-rates, I suggest you play with the --quality option (1 to 10, default is 8). Speex supports bit-rates ranging from 6 kbps to 18 kbps (24 kbps in the next release) in narrowband and from 10 kbps to 28 kbps in wideband.

Speex wishlist

Reply #20
Quote
originally posted by jmvalin
BTW, is this patch "final" or do you want me to wait for a second version? Also, do speexenc and speexdec have the same functionality under Win32 and POSIX?

Well, it's "final" as far as I'm concerned in relation to MSVC/Intel compiles, but it may need some further mods for other win32 compilers.

One area where it would bear looking at is in the Windows audio setup in 'speexdec.c'.
Code: [Select]
Set_WIN_Params (INVALID_FILEDESC, rate, SAMPLE_SIZE, 1)

The final '1' just before the closing brace relates to the number of channels: it can only be 1 or 2, but I hard coded for mono since I believe that is the only option at present, and I didn't notice a variable I could use there. So, ideally, that needs to be changed to a variable.

Speex wishlist

Reply #21
yeah, now i can start crying. I've spent the last couple of hours trying to make a project file to build speex, but I've been unsuccessful. The thing is, that speexenc would compile but the resulting output would be not valid. And the same for speexdec.

Nevermind, I have just noticed that I forgot to put "wb", shame on me  .
To the hell with my work!

Speex wishlist

Reply #22
Quote
I have just noticed that I forgot to put "wb", shame on me

Don't forget that you also need "rb"!!

Speex wishlist

Reply #23
I _had_ the "rb" it was only the "wb" missing, once I put it, it worked.

If I had spent those hours studying instead of "netting"  I wouldn't have problems passing that sh*tty electronics exam. :reading: Off to studying.

Speex wishlist

Reply #24
Ok, I tested with WMA v8 and ACEPL.net:

speex 16kHz ~15KBit/s (quality 5): sound is a bit noisy, but you can understand nearly everything, yust some problems with more than one voice.

acelp.net 16kHz 16KBit/s: sound is similar to speex, but it rattles (word translated with google, could make no sense) very often, but sound is cleaner than speex, but with more than one voice you can understand less.

wma v8 16kHz 16KBit/s: typically crappy metallic wma sound, very annoying, but you can understand nearly everything, problems with more than one voice are bigger than in speex/acelp.

speex 8kHz ~7,8KBit/s (quality 3): with two speakers talking you can still understand everything, with more than two voices it´s yust noise. sounds better than acelp/wma. Two strange "Knackser" (google doesn´t translate it, typically problem with LPs), must be a bug in the encoder/decoder.

acelp.net 8kHz 8,5KBit/s: with more than one voice you can´t understand one word, the word "headphones" sound more like "headzzphonezzzzzz". speex sounds better.

wma v8 8kHz 8KBit/s: it sounds extremly wma-metallic, here you also cannot understand one word when more than person talks. it sounds very very annoying.

I would say speex is overall the best codec for low-bitrate speek-encoding, but it is not perfect and in some cases acelp is better. wma is crap at all.
One bug, probably in the win32-implemetation: The last half second is cut off in the player.