HydrogenAudio

Lossy Audio Compression => Speech Codecs => Topic started by: jmvalin on 2002-08-21 18:15:49

Title: Speex wishlist
Post by: jmvalin on 2002-08-21 18:15:49
Hi,

I'm the author of Speex (http://speex.sourceforge.net) , 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.
Title: Speex wishlist
Post by: kennedyb4 on 2002-08-21 20:51:50
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:
Title: Speex wishlist
Post by: S_O on 2002-08-21 21:07:49
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).
Title: Speex wishlist
Post by: jmvalin on 2002-08-21 21:11:56
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.
Title: Speex wishlist
Post by: S_O on 2002-08-21 21:24:15
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.
Title: Speex wishlist
Post by: jmvalin on 2002-08-21 21:46:24
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.
Title: Speex wishlist
Post by: S_O on 2002-08-21 21:56:11
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).
Title: Speex wishlist
Post by: S_O on 2002-08-22 12:06:47
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.
Title: Speex wishlist
Post by: dev0 on 2002-08-22 12:21:41
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
Title: Speex wishlist
Post by: S_O on 2002-08-22 12:55:35
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".
Title: Speex wishlist
Post by: dev0 on 2002-08-22 13:18:46
I'll try to when I'm back from work...
dev0
Title: Speex wishlist
Post by: john33 on 2002-08-22 15:02:23
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.
Title: Speex wishlist
Post by: S_O on 2002-08-22 16:49:14
Great! Are the files already up? If yes could you post a direct link, because RareWares isn´t updated yet?
Title: Speex wishlist
Post by: rjamorim on 2002-08-22 17:06:20
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.
Title: Speex wishlist
Post by: jmvalin on 2002-08-22 17:16:24
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?
Title: Speex wishlist
Post by: john33 on 2002-08-22 17:30:43
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.
Title: Speex wishlist
Post by: jmvalin on 2002-08-22 18:08:08
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?
Title: Speex wishlist
Post by: S_O on 2002-08-22 18:14:02
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)
Title: Speex wishlist
Post by: rjamorim on 2002-08-22 18:19:33
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.
Title: Speex wishlist
Post by: jmvalin on 2002-08-22 18:24:06
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.
Title: Speex wishlist
Post by: john33 on 2002-08-22 18:37:09
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.
Title: Speex wishlist
Post by: Psyche on 2002-08-22 18:58:11
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!
Title: Speex wishlist
Post by: john33 on 2002-08-22 19:01:35
Quote
I have just noticed that I forgot to put "wb", shame on me

Don't forget that you also need "rb"!!
Title: Speex wishlist
Post by: Psyche on 2002-08-22 19:06:48
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.
Title: Speex wishlist
Post by: S_O on 2002-08-22 19:42:52
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.
Title: Speex wishlist
Post by: jmvalin on 2002-08-22 19:48:28
Quote
Originally posted by S_O

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.


Please send me the file (if smaller than 1 Meg) to () If it's a bug, I'll fix it. To make that easier, please give me the exact options you used for both the encoder and decoder.
Title: Speex wishlist
Post by: S_O on 2002-08-22 19:58:00
Sorry, it´s not bug, at least not in speex, it was a problem with my soundcard and 8kHz-files. A new set of new drivers fixed that.
Title: Speex wishlist
Post by: jmvalin on 2002-08-22 20:10:26
Quote
Originally posted by S_O
Sorry, it´s not bug, at least not in speex, it was a problem with my soundcard and 8kHz-files. A new set of new drivers fixed that.


You mean the missing last half second bug or the "Knackser" at 8 kbps? If it's the second, I'd like to look at it...
Title: Speex wishlist
Post by: S_O on 2002-08-22 20:19:07
No the "Knackser" was caused by my soundcard, the missing half second at the end is (at least I think so) not caused by my soundcard.
Title: Speex wishlist
Post by: S_O on 2002-08-23 23:00:02
I found out that you can compress the files with zip/rar/ace by about 5%. This is quite high, maybe you can improve the huffman-coding (or whatever you use).
Title: Speex wishlist
Post by: kennedyb4 on 2002-08-24 01:11:15
A GUI for those less computer savvy would be a big plus. There is a fellow on this site that makes great gui's all the time but I can't remember his nick.

Do you think he might add this to his project list?
Title: Speex wishlist
Post by: rjamorim on 2002-08-24 02:13:13
Quote
Originally posted by kennedyb4
A GUI for those less computer savvy would be a big plus. There is a fellow on this site that makes great gui's all the time but I can't remember his nick.


Speek. (Speex? )

Quote
Do you think he might add this to his project list?


I think this is not the right time to create a GUI. The Speex project is still in early alpha stage, and command line switches can still change.

Besides, this release isn't intended yet to be used for newbies. The purpose is to test the technology - it will still change a lot, and files encoded with this release probably won't be decodable with next release.

Regards;

Roberto.
Title: Speex wishlist
Post by: jmvalin on 2002-08-24 03:23:02
Quote
Originally posted by rjamorim

The Speex project is still in early alpha stage, and command line switches can still change.
...
The purpose is to test the technology - it will still change a lot, and files encoded with this release probably won't be decodable with next release.


Actually, the current state of Speex is more than just testing the technology. I plan to release the first beta, along with a bit-stream freeze within a month. Although I cannot promise, it is quite possible that the current 0.7.0 bit-stream will be the final one. The command-line switches will quite likely stay the same too. Only the API will change slightly in the next release, something that hasn't happened in a long while.
Title: Speex wishlist
Post by: Destroid on 2002-08-26 05:14:20
Thanks to everyone who made Speex and also for the Win32 binary. I'd been anxious to try it and was not disappionted. At about 3.5kbps the results were very nice -- makes 32kbps MP3 sound like .RA in comparison. =D
Title: Speex wishlist
Post by: kennedyb4 on 2002-08-27 03:30:07
Quote
Quote


Speek. (Speex? :




Doh  Sorry Speek 

I hear what you say about newbies. I have to confess I bought my first box strictly for audio and just started using it about 2 years ago when I first found Napster and --r3mix.

Its just the curiosity thing getting me. This is an app that I can use and from what I am hearing about it, this programme rocks a bit.

Time to be patient.