Re: RTP makes high tone pitch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

you say below, that a few hundred milliseconds would be an acceptable latency. Why then do you set the values so low? Setting the loopback latency to 1ms and max_latency to 10ms is not a good idea and will probably not work as expected.
The latency you specify for the loopback includes source and sink latency
(= source latency + sink latency + loopback buffer latency), so a reasonable value
for you would be around 50 ms or larger when you are using an USB device.
The max_latency parameter is only intended to be used when the latency grows
too much and should not be specified unless the latency increases significantly
over time.

Something similar applies to module-rtp-recv. Specifying a latency of 1ms at
8000 Hz means that you have just 8 audio frames of latency. So here I would
go for something like 100ms.

Both, module-loopback and module-rtp-recv try to adjust to the requested
latency by changing the sample rate. This is probably what you hear. In
particular, while module-loopback stops when the sample rate is more than
1% away from the base rate, there is no such limit for module-rtp-recv.

To debug the situation I would run PA with debug logging and also add
the log-interval=1 parameter to module-loopback. This produces quite a
lot of output, but then you should be able to see what happens and can
adjust your parameters for optimum performance. To enable debug logging
and to send the output to a file you can use

pacmd set-log-level 4
pacmd set-log-target file://tmp/pulse.log

The log settings will revert to the default values when PA is restarted.
Hope this helps.

Regards
       Georg

On 19.03.23 16:14, Lars Stollenwerk wrote:
Hi all,

I am using PulseAudio to implement a kind of intercom: In our ham radio club
house we want to install in every room a raspberry pi with PulseAudio running;
this is what I call a 'client'. Each client is connecet to a microphone and a
speaker using a USB sound card. To send and receive the audio signal over
network, on each client a set of PulseAudio modules is started using 'pactl
load-module ...'. The follwing modules are started:

Sending path
------------
Signal path: mic-source -> loopback -> null-sink -> rtp-send

module-null-sink
     sink_name=rtp-tx-sink
     rate=8000
     channels=1
module-loopback
     source=<mic-source>
     sink=rtp-tx-sink
     latency_msec=1
     max_latency_msec=10
     fast_adjust_threshold_msec=100
     adjust_time=1
     rate=8000
     channels=1
module-rtp-send
     rate=8000
     channels=1
     loop=false
     source=rtp-tx-sink.monitor
     destination=224.0.0.47

Receiving path
--------------
Signal path: rtp-recv -> null-sink -> loopback -> speaker-sink

module-null-sink
     sink_name=rtp-rx-sink
     rate=8000
     channels=1
module-loopback
     source=rtp-rx-sink.monitor
     sink=<speaker-sink>
     latency_msec=1
     max_latency_msec=10
     fast_adjust_threshold_msec=100
     adjust_time=1
     rate=8000
     channels=1
module-rtp-recv
     latency_msec=1
     sink=rtp-rx-sink
     sap_address=224.0.0.47

The null-sinks are used to mute the stream when necessary.

Generally, the set-up works. However, often the pitch of the voice is much too
high. I. e., the voice can be well understood but sounds more or less like a
Helium voice.

The values for latency are all chosen to be very small. The reason is that we
can accept short drop-outs, but not a big latency (few 100 ms is the maxium
acceptable).  I have tryed to increase max_latency_msec of the loopback
devices to 60 ms - without success.

My question to the community is: Does anyone know where the high pitch voice
comes from? And how to avoid this?

I am thankful for any help!

Best ragards
Lars
--
        /   ePistulae: formica@xxxxxxxx
   O-O-@
   / | \    PGP Key  : 0x6E5651C4
  FORMICA   Homepage : http://www.Opppf.de/





[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux