Hi Patrick,
see my comments below
On Mon, Nov 9, 2009 at 6:28 PM, patrick nunes <
pnun...@gmail.com> wrote:
> Hi Arsen,
>
> I am currently trying to understand how i may successfully transmit
> different encoded input audio files with uniMRCP.
> To do so, I have launched several ASR scenario tests involving both
> unimrcpclient and unimrcpserver from uniMRCP 0.8.0.
OK
>
> Here are some examples of what i have defined and hence got as a result and
> into the logs.
>
> example1 :
> Client side : Server side :
> - codecs : PCMA - codecs : PCMA
> - capabilities : LPCM / PCMA - capabilities : LPCM / PCMA
> - input : PCMA - output : undefined
> =>
> C :
> Source->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMA/8000/1]->Sink
> S :
> Source->[PCMA/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
> note : Is client source considered as LPCM because LPCM is the first defined
> capability ?
Yes, the order is considered. Current implementation finds the first
match. It doesn't look further for the best available option.
For the given example PCMA would be the best choice. It'll allow not
to use encoder/decoder at all.
>
> example2 :
> Client side : Server side :
> - codecs : PCMA - codecs : PCMA
> - capabilities : PCMA - capabilities : PCMA
> - input : PCMA - output : PCMA
> =>
> C : Source->[PCMA/8000/1]->Bridge->[PCMA/8000/1]->Sink
> S : Source->[PCMA/8000/1]->Bridge->[PCMA/8000/1]->Sink
> note: Signal is successfully received
Well.
>
> example3 :
> Client side : Server side :
> - codecs : PCMU / PCMA / L16 - codecs : PCMU / PCMA / L16
> - capabilities : PCMA - capabilities : PCMA
> - input : PCMA - output : PCMA
> =>
> C :
> Source->[PCMA/8000/1]->Decoder->LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMU/8000/1]->Sink
> S :
> Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMA/8000/1]->Sink
> note : Last input frame is indefinitely sent. Test does not stop
> automatically.
It's a bug, see below.
>
> example4 :
> Client side : Server side :
> - codecs : PCMU / PCMA / L16 - codecs : PCMU / PCMA / L16
> - capabilities : LPCM / PCMA - capabilities : LPCM / PCMA
> - input : PCMA - output : undefined
> =>
> C :
> Source->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMU/8000/1]->Sink
> S :
> Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
The same as for example 1.
>
> example5 :
> Client side : Server side :
> - codecs : PCMU / PCMA / L16 - codecs : PCMU / PCMA / L16
> - capabilities : PCMA / LPCM - capabilities : PCMA / LPCM
> - input : PCMA - output : PCMA
> =>
> C :
> Source->[PCMA/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMU/8000/1]->Sink
> S :
> Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Encoder->[PCMA/8000/1]->Sink
> note : Last input frame is indefinitely sent. Test does not stop
> automatically.
> difference between this test and the previous one is the codecs order
> defined as capabilities
I've just fixed mentioned in examples 3 and 5 behavior.
http://code.google.com/p/unimrcp/source/detail?r=1261
If needed, you can easily apply the fix to the released version by
resetting only frame type as marker has been introduced only in trunk
recently.
>
> In relation to these few examples, I understand that set payload is the
> first one of the client codecs list (if also available on server side).
Almost true, but server may force its own preference, if needed
<param name="own-preference" value="1"/>
>But I do not figure out how i could successfully transmit either a PCMA or a
> LPCM input file without modifying the capabilites codecs.
Actually, you should specify more than one capabilities if you support
all of them and want client stack and/or server to decide which codec
to use through SDP offer/answer. However, if you support only one of
the codecs at a time, you should specify only one capability.
In other words,
if your input is in linear PCM only, you should indicate LPCM only.
if encoded input is in PCMA, you should indicate PCMA only.
However, if you have the same input recorded in both formats: one in
LPCM and another in PCMA, you can indicate multiple capabilities
(LPCM,PCMA). In this case you should wait for the negotiation to
complete and only then stream an appropriate input.
>I seems that the
> order of such defined codecs is significant.
Yes.
> Could you please share your understanding about that ?
Sure, I think I did it. If anything remains unclear, feel free to ask.
>
> Also, I think there is an issue raised on examples 3 & 5. I have not really
> investigated on that, but i guess that the consecutive decoding/encoding
> stages may be the source problem.
Yes, you're right. Thanks for the detailed description. I like such
reports a lot.
>
> Regards,
>
> Patrick
>
>
> >
>
--
Arsen Chaloyan
The author of UniMRCP
http://www.unimrcp.org