News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Speech (sound) - need advice..suggestions

Started by Rainstorm, September 02, 2008, 04:17:46 PM

Previous topic - Next topic

Rainstorm

hi,

I've never worked coding with sound before..
more specifically any suggestions  or tips on working with Speech  ?
what kinda background knowledge i'd need to have so i can read up on that stuff some.
(basically thinking of attempting to write an app, at sometime.. that does IP to IP voice.. enabling people to talk to one another......- something like that)
just wanna get familiar with the matter i'd need to do something along those lines.
Are there any set of Assembly instructions more suited to working with sound ?

many thanks.

Rainstorm
-

Rainstorm

I decided on using the Spee x  codec.
just, downloaded the package......it has the APIs/libraries for it & other stuff. - trying to make some sense of it, i don't know C & its all in C.
will have to figure out how to access it from assembly

ltrs

Bill Cravener

Here is an example using speech I posted using Dougie Murray's source code. I made it a bit simpler to toy around with.


http://www.masm32.com/board/index.php?topic=9024.0
My MASM32 Examples.

"Prejudice does not arise from low intelligence it arises from conservative ideals to which people of low intelligence are drawn." ~ Isaidthat

Rainstorm


Tedd

If you want to write your own codec, you'll probably want to get very friendly with MMX and/or SSE :wink
As for reading, you'll need to read up on FFT, LPC, and a whole stack of audio and speech theory.
But that's a lot of work if all you really need is a way to compress/decompress speech audio, especially when there are already so many codecs to choose from.

For Speex, you'll need to build a DLL, generate a LIB, and make an INC file - then you can call the functions as normal. And then you only need to learn how to use it :bdg From a quick look, it seems to work on floating-point values, whereas audio is usually recorded in integer samples, so you need to convert all input before passing it to the library.

Windows does have codec support anyway, so you may want to check that out as well -- it's called the "Audio Coding Manager" (ACM), and all its functions start with "acm" (they're in "msacm32.inc".)


Codecs available on my machine (should be fairly standard for Windows XP):
Microsoft IMA ADPCM CODEC
Microsoft ADPCM CODEC
Microsoft CCITT G.711 A-Law and u-Law CODEC
Microsoft GSM 6.10 Audio CODEC
DSP Group TrueSpeech(TM) Software CODEC
Microsoft G.723.1 CODEC
Windows Media Audio
Sipro Lab Telecom ACELP.net audio codec
Indeo® audio software
Fraunhofer IIS MPEG Layer-3 Codec (advanced)
Microsoft PCM Converter
No snowflake in an avalanche feels responsible.

Rainstorm

Tedd, thanks a lot for the answers & options ..... that was very helpfull.

tedd wrote..
QuoteFor Speex, you'll need to build a DLL, generate a LIB, and make an INC file - then you can call the functions as normal.
I have dloaded 2 packages of Speex & they have slightly different stuff in them.

one has.... (speex-1.2beta3-win32.zip)
*.exe & .dll files in the binary folder
*.h files in the include folder *
*.exp & .lib files in the lib folder

i think the .dll  seems to be ready in this case..- how do i convert the *.h files properly.
if you could just comment on this package too.

the other one has slightly more stuff (speex-1.2rc1.tar.gz)
for example under
\speex-1.2rc1\win32\VS2008\libspeex\
  libspeex.vcproj
  libspeex.vcproj.user
  Makefile.am
  Makefile.in

if you could possibly tell me how to make use of these files  in this second case too or how to compile them.
sry for the delay was having some probs with my connection.

tedd wrote..
QuoteFrom a quick look, it seems to work on floating-point values, whereas audio is usually recorded in integer samples, so you need to convert all input before passing it to the library.
dunno if am getting it right but i think there is an option somewhere.. about having it use integer or floating point values.

QuoteCodecs available on my machine (should be fairly standard for Windows XP):
i checked & I have exactly the same codecs on mine (using winxp pro - sp2)
will take a look at ACM too - thx for the tip - also i just dloaded the directX SDK

much appreciate all the advice & feedback!!

laters.

Mark Jones

Quote from: Rainstorm on September 06, 2008, 10:59:19 AM
the other one has slightly more stuff (speex-1.2rc1.tar.gz)
for example under
\speex-1.2rc1\win32\VS2008\libspeex\
  libspeex.vcproj
...
if you could possibly tell me how to make use of these files  in this second case too or how to compile them.

A .vcproj file is a Microsoft Visual C++ project. You could download the VC++2008 Express Edition to open those files.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08


hoverlees


Rainstorm

tedd,
i'll be using UDP... so any suggestions..... or advice concerning the networking part.

thankyou.
-

Tedd

Quote from: Rainstorm on September 08, 2008, 07:33:40 AM
i'll be using UDP... so any suggestions..... or advice concerning the networking part.
Nothing specific - udp is probably best in this case, where you can tolerate a few lost packets, and that would be preferable to waiting for slow packets (which would just cause jittered sound.)
You'll need to work out some kind of protocol though, so clients can call each other, mute, hang-up, etc, rather than only sending raw audio data. Also, certain packets might want a specific acknowledgement so you know they were actually received.
(Message me for further discussion :wink)
No snowflake in an avalanche feels responsible.