Audio transcode

64 views
Skip to first unread message

Julien

unread,
Sep 14, 2021, 6:25:21 AM9/14/21
to UniMRCP
Hi everyone, 

I successfully developed a TTS plugin on unimrcp server.
However, I have a question about the audio steaming function. The TTS server generates 16bits linear pcm 16kHz whereas I need PCMA.

Is UniMRCP server/SofiaSip able to do the job?

Yours sincerely,
Julien BAUMGARTEN

Lewis Bergman

unread,
Sep 14, 2021, 7:38:05 AM9/14/21
to uni...@googlegroups.com
You mean something like this from page 14 of the manual?
<codecs>20 PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/45311420-686e-437d-8ee2-58fa76e6ab75n%40googlegroups.com.


--
Lewis Bergman

Julien

unread,
Sep 17, 2021, 1:56:27 AM9/17/21
to UniMRCP
Hi Lewis,

Exactly BUT this information defines the codec used in the RTP stream.
My TTS engine provides linear PCM 16bit 16kHZ and I need to stream in PCMA.

I defined PCMA in codecs section of unimrcpserver.xml file BUT I need to convert and resample the stream coming from the engine.

mayamatakeshi

unread,
Sep 17, 2021, 3:07:52 AM9/17/21
to uni...@googlegroups.com
On Fri, Sep 17, 2021 at 2:56 PM Julien <julien.b...@viatelecom.com> wrote:
Hi Lewis,

Exactly BUT this information defines the codec used in the RTP stream.
My TTS engine provides linear PCM 16bit 16kHZ and I need to stream in PCMA.

I defined PCMA in codecs section of unimrcpserver.xml file BUT I need to convert and resample the stream coming from the engine.


I never wrote a unimrcp plugin but I was expecting unimrcp headers to define some helper functions that would be commonly used by plugins.

To resample from 16000 to 8000, I would get every 2 samples, sum them and divide by 2.

Then if a function to convert from linear16 to PCMA (a-law) is not available, I would try to use linear2alaw() from here:

 

Julien

unread,
Sep 17, 2021, 5:22:34 AM9/17/21
to UniMRCP
Hi,

Thank you for your answer.
I am able to resample by using lib soxr and convert with linear2alaw function but I was looking for a "out of the box" solution.
If unimrcp server is not able to act like a bridge, i'll keep that solution.

Thx all :)

Arsen Chaloyan

unread,
Oct 9, 2021, 2:56:26 PM10/9/21
to UniMRCP
Hi Julien,

There is no integrated resampler in the MPF layer, even though that was provisioned originally.

In general, you are supposed to specify the capabilities of your plugin/engine while creating a new channel.


The specified capabilities are taken into account for negotiating codecs in the scope of SDP offer/answer and composing a media path.

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.


--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org
Reply all
Reply to author
Forward
0 new messages