Hi guys, This is my first post, I?m a brazilian programmer and I think speex is a great project. :) I'm working on a free software project and I was planning to use speex on it. I have used the java speex version in another project and that worked well, and this time I was planning to use a JNI version to get the latest features. 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... if this was a stupid question, sorry for taking your time. :) Thanks, and keep the good job! Ricardo Andere de Mello (Gandhi) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20080325/a89a8552/attachment.htm
> 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
heh...:) maybe I?ll just answer "the number is 42". ;) well... some guys did mixing using *G.722 *encoded frames... maybe we could ask them: 8P http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel5/4054516/4054517/04054870.pdf?isnumber=4054517&prod=CNF&arnumber=4054870&arSt=2045&ared=2048&arAuthor=G.+Agnello%3B+R.+M.+Dansereau and a little off-topic, but fun for audio gurus like you, a very complicated way to mix two mp3 streams: http://www.freshpatents.com/Processing-of-encoded-signals-dt20060302ptan20060047523.php?type=description []s, gandhi On Tue, Mar 25, 2008 at 10:01 PM, Jean-Marc Valin < jean-marc.valin at usherbrooke.ca> wrote:> > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20080325/bcfb4e8f/attachment.htm