Maximum audio/video delay for peer to peer communication - audio

Is there any standard for tolerable delay in audio and video communication for web ? I have noticed delay using my WebRTC application and want to compare it with the standard (if any).
Wikipedia has mentioned following delays:
Live audio : several hundred ms to a few seconds,
Telephone Calls : 200ms,
IP calls: min 20ms, max 150ms
Computer audio: 500ms
From book "Deploying QoS for Cisco IP and Next Generation Networks: The Definitive Guide" By Vinod Joseph, Brett Chapman:
Voice : 150ms one way
Interactive video: 150ms (upto 200ms)
live : 150ms
video on demand : 150ms
Multimedia conferencing and streaming: >400ms
Which one should i compare with ? Interactive video, Multimedia conferencing or IP calls ?

There is for instance several recommendations of the ITU (International Telecommunication Union):
Y.1541: Network aspects (network delay, jitter, packet loss, etc.)
G.114: Mouth-To-Ear delay ( < 200ms OK, > 400ms KO ) - audio only

Related

Microsoft Azure cognition services - Speaker Recognition - Rate Limit

I use Microsoft Azure and the cognition service to be able to use the Speaker Recognition API.
I have a subscription "Pay as you go" with the Standard Pricing Tier (5 calls per second) . I use Unity to make the voice recording and to send the audio to the server.
Every 5 seconds, I send the audio to the server inside the update function of the C# script.
But around 30 seconds of speech, I got the error 429 : code: RateLimitExceeded, message : Rate limit is exceeded. Try again later.
If anyone use it, do you know why I got this response from the server, while I have a subscription to avoid this limit.
I joined the Microsoft assistant, and they told me that the subscription is active, but I don't see any direct debit.
If you look at the note in the readme section here https://github.com/Microsoft/Cognitive-SpeakerRecognition-Windows,
Note: Make sure that the number of requests per minute resulting from tunning the step size won't exceed your subscription's rate limit.
For example, applying a step size of 1 on an audio file of size 1 minute will result in 60 requests. Applying a step size of 2 on the same audio file will result in 30 requests. For your convenience, we have provided sample audios to enroll 2 speakers and a sample audio for streaming. These audios are found under SpeakerRecognition\Windows\Streaming\SPIDStreamingAPI-WPF-Samples\SampleAudios.
Also, according to the API link on https://azure.microsoft.com/en-us/services/cognitive-services/speaker-recognition/
The audio file format must meet the following requirements:
Container - WAV
Encoding - PCM
Rate - 16K
Sample Format - 16 bit
Channels - Mono

BLE connection interval

From BT snoop log below, found BLE central device and peripheral device got connected after a few loops of negotiation about
connection parameters, include connection interval, connection latency and supervisor timeout etc.
As found in bt snoop log, the connection interval will be set to 1 second, my question is:
Why not found the connection between them disappear 1 second later after they connected?
What’s the real meaning of connection interval?
As you know BLE has a pillar that is to be low energy consumption.
The main rule is turn on the radio as little as possible and turn off the radio as soon as possibile.
When a connection is established the radio signal isn't always active even when a peer want to transmit. The transmission phase has the radio turns on and off more times.
The connection interval is the time between two connection event and inside each connection event there is packets transmission.
Suppose the peer wants to transmitt 10 packets : the radio signal is on for packets transmission (max 6 packets) then turned off for a time that is the connection interval ... now 6 packets are transmitted. After connection interval, the radio is turned on to transmit tha last 4 packets and so on.
The connection interval can be from 7.5 ms and 4 s and it depends on both peers.
Of course, lesser connection interval means high baud rate transmission but more power consumption and vice versa.
Paolo.
BLE is a radio communication protocol that work in the 2.4GHz spectrum.
If you measure the radio current on a CRO, while it is in a connection, you will get a graph something similar to shown above.
The peaks indicate that radio is turned ON. Between the peaks the device is sleeping to save power.
To put it simply, connection interval is the time interval between the peaks.
Meaning it is the time for which the device sleeps after sending a packet and then wakes up to send a packet again.
This timing is synchronized between the two communication devices. It is like two people agreeing to meet at a particular time and place.

How can I add latency to a http audio stream

I want to create a server which relays a http stream with about 1 min of latency.
In other words, I have a server A streaming audio at http://a.crappyserver.com:8000/stream.mp3. How can I create another stream at, say http://b.crappyserver.com:8080/stream.mp3, which has the same audio with about 1 min lag.
UPDATE: I can only use an arch linux server to do so
You could put the streaming audio into a circular queue which holds a minute of data. Just allocate storage and keep track of publish and consume index values.

Using Fleck Websocket for 10k simultaneous connections

I'm implementing a websocket-secure (wss://) service for an online game where all users will be connected to the service as long they are playing the game, this will use a high number of simultaneous connections, although the traffic won't be a big problem, as the service is used for chat, storage and notifications... not for real-time data synchronization.
I wanted to use Alchemy-Websockets, but it doesn't support TLS (wss://), so I have to look for another service like Fleck (or other).
Alchemy has been tested with high number of simultaneous connections, but I didn't find similar tests for Fleck, so I need to get some real info from users of fleck.
I know that Fleck is non-blocking and uses Async calls, but I need some real info, cuz it might be abusing threads, garbage collector, or any other aspect that won't be visible to lower number of connections.
I will use c# for the client as well, so I don't need neither hybiXX compatibility, nor fallback, I just need scalability and TLS support.
I finally added Mono support to WebSocketListener.
Check here how to run WebSocketListener in Mono.
10K connections is not little thing. WebSocketListener is asynchronous and it scales well. I have done tests with 10K connections and it should be fine.
My tests shows that WebSocketListener is almost as fast and scalable as the Microsoft one, and performs better than Fleck, Alchemy and others.
I made a test on a Windows machine with Core2Duo e8400 processor and 4 GB of ram.
The results were not encouraging as it started delaying handshakes after it reached ~1000 connections, i.e. it would take about one minute to accept a new connection.
These results were improved when i used XSockets as it reached 8000 simultaneous connections before the same thing happened.
I tried to test on a Linux VPS with Mono, but i don't have enough experience with Linux administration, and a few system settings related to TCP, etc. needed to change in order to allow high number of concurrent connections, so i could only reach ~1000 on the default settings, after that he app crashed (both Fleck test and XSocket test).
On the other hand, I tested node.js, and it seemed simpler to manage very high number of connections, as node didn't crash when reached the limits of tcp.
All the tests where echo test, the servers send the same message back to the client who sent the message and one random other connected client, and each connected client sends a random ~30 chars text message to the server on a random interval between 0 and 30 seconds.
I know my tests are not generic enough and i encourage anyone to have their own tests instead, but i just wanted to share my experience.
When we decided to try Fleck, we have implemented a wrapper for Fleck server and implemented a JavaScript client API so that we can send back acknowledgment messages back to the server. We wanted to test the performance of the server - message delivery time, percentage of lost messages etc. The results were pretty impressive for us and currently we are using Fleck in our production environment.
We have 4000 - 5000 concurrent connections during peak hours. On average 40 messages are sent per second. Acknowledged message ratio (acknowledged messages / total sent messages) never drops below 0.994. Average round-trip for messages is around 150 miliseconds (duration between server sending the message and receiving its ack). Finally, we did not have any memory related problems due to Fleck server after its heavy usage.

Rate limit for libspotify

I just started to observe the following error message from [CocoaLibSpotify didLogMessage] in my iOS App.
I [snd:381] Rate limited. Waiting 3s
Does anyone know what the libspotify API rate limit is? I saw that the web API limit is 10/second/IP. Is is the same for libspotify?
Thanks in advance.
libspotify APIs are executed on your local machine - there's no rate limit in calling them.
You've provided pretty much zero context for this, but I think what you're seeing is that you're playing a track and CocoaLibSpotify has filled a playback buffer. libSpotify won't give audio data at faster than 1.5x realtime, so it's waiting before it tries to refill the buffer.
That message is perfectly normal, and the "I" in front of it means it's only an informational message.
I have seen that message in the normal Linux desktop client as well. I only get it when I am browsing music and I skip too many tracks too quickly. There is a server side rate limit of how fast you can fetch new tracks in Spotify. This info message probably relates to that limit but it could also be what iKenndac writes.
I'm experiencing the same. When I skip too much through the tracks, it prints out an Information Message "Rate limited waiting 3s".
But maybe they should print out a message in the UI ?
Otherwise it will confuse the unexperienced users.

Resources