For voice calls, when the delay is higher than 200ms, it will affect the user experience. When the delay reaches 400ms, it will make the other user obviously perceive it. The delay of more than 1s is not acceptable in the interactive voice chat.
First, the type of delay
When playing with the source code of the website voice call, the audio data has gone through many links from collection to playback, which will cause the call delay. Generally, there are four types of delay:
1. Processing delay: it is the time consumed by the router to analyze the data packet header and decide to send the audio data to the next station in the source code of the playsite.
2. Queuing delay: the time between the time when the audio packet in the source code of the website enters the sending queue of the router and the time when it is sent. In this link, the routing queuing algorithm and the actual situation of the network will affect the delay time.
3. Transmission delay: the time it takes to transmit the audio packet of the source code of the website to the line. The delay of this link will be affected by the size of the audio packet and bandwidth.
4. Propagation delay: this refers to the time from the sending end to the receiving end of the first bit of the audio packet in the source code of the playsite, which will be affected by the transmission distance and propagation speed.
Second, the optimization idea of delay
1, adjust the buffer size of the push stream end and the player end, in play site source development, the use of a certain algorithm to predict the bandwidth, so as to reduce the sending rate, reduce the current amount of data sent, reduce network congestion, optimize the buffer push stream end; For the buffer of the player end, data consumption can be carried out by dropping frames and speeding up playback, thus reducing the delay.
2, optimize network transmission: such as playing website source code for the real-time requirements of the voice of the scene, you can choose the RTC transmission protocol, reduce the delay.
3. Choose high-quality CDN acceleration services. When developing source code for websites, it is best to choose third-party high-quality CDN service providers to guarantee transmission line bandwidth and line resources through mature technology.
4, choose the right audio codec, in the audio data codec operation, there will be a certain delay, the right codec can be very good optimization of this problem.
5, of course, in the play site source delay will be produced in different places, the impact of voice chat weight is not the same, so in the delay optimization, according to their own actual situation have a focus on the adjustment.
In play with website source development, in addition to need the support of speech even wheat technology, also can use other technical means, especially want to stand out in the market, also cannot leave to accompany playing website source function in the development, characteristic functions to meet the needs of more users, realize the rapid and agglomeration platform user traffic, and then complete the flow of cash.
Disclaimer: This article is created by Yunbao Technology, please indicate the author’s name and link to the original text, otherwise it is regarded as infringement