[Speex-dev] Mixing Codebook?

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Tue Mar 25 18:01:49 PDT 2008


> ok, lets get to the point. :)
> I would need to mix some audio streams realtime. After googling a little
> I had only two answers:
> 1 - decode,mix,encode
> 2 - lower quality, send streams at the same time and mix at the client.
> 
> I didnt like either solutions.
> 
> I´m not an audio expert, so I´m just saying something silly. I readed
> that speex uses a fixed "codebook". So I think that in a simplistic way
> this means that the encoded data are indexes in this codebook and some
> transformation information.
> Is it possible to create a "mixing codebook"? the idea is to generate
> all the mix combinations of each entry in the codebook., so two encoded
> frames could be merged and point to this different codebook, maybe
> selected in the rtp header.

Well, you *might* be able to do that at the frame level. Considering
that 15 kbps corresponds to 300 bits. The the case of mixing two
streams, you'd need a 600-bit codebook (2^600 entries). There's just a
tiny implementation detail when it comes to storage. What you need to do
to solve it is:
1) Find a way to encode a (very very) large number of terabytes in
every electron (or other fundamental particle)
2) Manage to use every particle in the universe to store your codebook
3) Prevent the whole thing from turning into a black hole.

You do what you want, but I suggest you go with one of the two solutions
you listed above (decode,mix,encode or multiple streams).

	Jean-Marc


More information about the Speex-dev mailing list