Self-adaptive voice anti-shake method based on asynchronous cache

By adopting an adaptive voice anti-shake method based on asynchronous cache in PTT voice communication, dynamically adjusting the buffered data volume, solving the audio quality problems caused by voice jitter in battlefield environments, and achieving more stable and high-quality voice transmission.

CN119421116APending Publication Date: 2025-02-11西安超越申泰信息科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411384463.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In complex battlefield environments, there is a problem of voice jitter in PTT voice communication, resulting in poor audio quality.

Method used

Adaptive voice anti-shake method based on asynchronous cache is adopted, by creating voice data receiving threads and playback threads, using a ring buffer to perform data processing, and dynamically adjust the buffered data volume according to the signal strength of the ad hoc network and the difference in historical playback.

Benefits of technology

It achieves the improvement of the smoothness of voice playback and audio quality, shortens playback delay, and improves the stability of voice transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119421116A_ABST
    Figure CN119421116A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of voice information transmission, and discloses a self-adaptive voice anti-shake method based on asynchronous caching, and the method comprises the steps of asynchronous caching, self-adaptive dynamic adjustment and source end recognition and distinguishing. Weighted judgment can be carried out according to the ad hoc network signal strength in the current environment in combination with the historically played voice receiving and playing difference, namely the size of data stored in the buffer area, the setting of the voice buffer data size is dynamically adjusted, the playing delay is shortened on the premise that voice playing is smooth, and then the audio quality of voice playing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of voice information transmission, for example, to an adaptive voice anti-jitter method based on asynchronous buffering. Background Art

[0002] Under the informationization conditions, battlefield situations are complicated, and timely and effective information transmission has always been an important factor affecting the war situation. PTT voice communication, as a means of obtaining and transmitting information in real time, is indispensable in battlefield command and battlefield information sharing. The complex battlefield environment will cause the stability of the self-organizing network signal, and the transmission of audio data in the network environment may be delayed, and the network delay will also change at different time periods. This change in network delay will cause jitter at the voice receiving end, and the jitter will cause audio quality distortion and intermittent.

[0003] Therefore, in the existing technical solutions, there is a problem of voice jitter during information transmission, which leads to poor audio quality.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0006] The present disclosure provides an adaptive voice anti-jitter method based on asynchronous buffering, which includes:

[0007] Apply for a memory range of preset size as a ring buffer;

[0008] Create a voice data receiving thread for receiving the voice data sent by the sending end and save the voice data to the ring buffer;

[0009] Create a voice playing thread, the voice playing thread reads the voice data in the ring buffer and sends it to the voice playing interface while the voice data receiving thread receives the voice data;

[0010] The receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the circular buffer;

[0011] Parse the voice data stored in the circular buffer and play the voice. After the voice communication is completed, determine the source of the voice data and make weighted adjustments to the preset data volume based on the strength of the self-organizing network signal in the current environment and the difference in voice reception and playback during historical playback.

[0012] In some embodiments, the receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the ring buffer, including:

[0013] Wait for the command to obtain the voice information distributed by the module, configure the system voice interface and parse the source address in the voice data packet;

[0014] Determine whether it is the first reception within the effective time. If it is the first reception, set the number of initial voice playback start packets according to the local and source signal strengths, and wait for voice data;

[0015] If it is not the first reception, wait for voice data;

[0016] When the amount of data in the ring buffer reaches the set start playback value, the voice message is sent through the system voice interface.

[0017] In some embodiments, the method further comprises:

[0018] Determine whether there is next frame data;

[0019] If there is another frame of data, wait for a preset time to continue receiving the voice information sent by the system voice interface;

[0020] If there is no next frame of data, the single voice playback ends and the system voice interface is closed, and the number of initial voice playback start packets is revised according to the actual playback performance.

[0021] In some embodiments, the above-mentioned weighted adjustment of the preset data volume according to the signal strength of the ad hoc network in the current environment and the difference in voice reception and playback of historical playback includes:

[0022] Get the current signal strength, record the historical voice status, and calculate the correlation and weighting coefficient;

[0023] The preset data volume is revised based on the correlation degree and the weighting coefficient, wherein the preset data volume is a data volume threshold of a starting playback buffer zone.

[0024] In some embodiments, the data encoding format corresponding to the voice data sent by the above-mentioned sending end includes command type, command length and command content, wherein the command content includes the destination IP address, source IP address, voice length and voice data volume.

[0025] In some embodiments, the receiving and playing of voice information uses multithreading;

[0026] Use double pointers to maintain the address where the voice receiving audio data is stored and the address where the voice playing thread obtains the voice data.

[0027] In some embodiments, the method further comprises:

[0028] The PTT voice initiator initiates PTT voice, first initiates voice preemption information, and the information end sends the preemption voice signaling to the local self-organizing network module. After the preemption voice signaling is successfully sent, the voice maintenance signaling begins to be sent. If the information end does not receive the voice maintenance signaling response within the first preset time period, it is considered that the self-organizing network module has been disconnected and the voice ends;

[0029] If the self-organizing network module does not receive a voice maintenance signaling within a second preset time period after receiving the preemptive voice signaling, it will be automatically released.

[0030] In some embodiments, the method further comprises:

[0031] While sending the voice maintenance signaling, the information end sends the voice initiation signaling to the local self-organizing network module. The local self-organizing network module transmits the voice initiation signaling to the destination self-organizing network module according to the destination address in the voice initiation signaling. After the local end receives the destination end's response to the voice initiation signaling, it means that the voice initiation is successful and the voice data is sent.

[0032] The adaptive voice anti-jitter method based on asynchronous buffering provided in the embodiments of the present disclosure can achieve the following technical effects:

[0033] The adaptive adjustment technology disclosed in the present invention is based on asynchronous caching. It can make a weighted judgment based on the signal strength of the self-organizing network in the current environment and the difference in voice reception and playback played in history, that is, the size of the data retained in the buffer, and dynamically adjust the setting of the voice buffer data volume, so as to shorten the playback delay while ensuring smooth voice playback, thereby improving the audio quality of voice playback.

[0034] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0036] Figure 1 It is a flowchart of an adaptive voice anti-jitter method based on asynchronous buffering provided by an embodiment of the present disclosure;

[0037] Figure 2 It is a flow chart of a voice receiving terminal provided by an embodiment of the present disclosure;

[0038] Figure 3 is a schematic diagram of an adaptive dynamic adjustment provided by an embodiment of the present disclosure;

[0039] Figure 4 It is a structural diagram of an adaptive voice anti-jitter system based on asynchronous buffering provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0041] The terms "first", "second", etc. in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0042] Unless otherwise stated, the term "plurality" means two or more.

[0043] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0044] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0045] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.

[0046] The following describes an adaptive voice anti-jitter method based on asynchronous buffering provided by an embodiment of the present disclosure in conjunction with the accompanying drawings.

[0047] Figure 1 It is a flowchart of an adaptive voice anti-jitter method based on asynchronous cache provided in an embodiment of the present disclosure.

[0048] like Figure 1 As shown, the adaptive voice anti-jitter method based on asynchronous buffering may include:

[0049] S01, applying for a memory range of a preset size as a ring buffer;

[0050] S02, creating a voice data receiving thread for receiving the voice data sent by the sender and saving the voice data to a ring buffer;

[0051] S03, creating a voice playing thread, the voice playing thread reads the voice data in the ring buffer and sends it to the voice playing interface while the voice data receiving thread receives the voice data;

[0052] S04, the receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the ring buffer;

[0053] S05, parse the voice data stored in the ring buffer, perform the current voice playback, and after the current voice communication is completed, determine the source of the voice data, and make a weighted adjustment to the preset data volume based on the self-organizing network signal strength in the current environment and the difference in voice reception and playback of historical playback.

[0054] The adaptive adjustment technology disclosed in the present invention is based on asynchronous caching. It can make a weighted judgment based on the signal strength of the self-organizing network in the current environment and the difference in voice reception and playback played in history, that is, the size of the data retained in the buffer, and dynamically adjust the setting of the voice buffer data volume, so as to shorten the playback delay while ensuring smooth voice playback, thereby improving the audio quality of voice playback.

[0055] In some embodiments, the receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the ring buffer, including:

[0056] Wait for the command to obtain the voice information distributed by the module, configure the system voice interface and parse the source address in the voice data packet;

[0057] Determine whether it is the first reception within the effective time. If it is the first reception, set the number of initial voice playback start packets according to the local and source signal strengths, and wait for voice data;

[0058] If it is not the first reception, wait for voice data;

[0059] When the amount of data in the ring buffer reaches the set start playback value, the voice message is sent through the system voice interface.

[0060] In some embodiments, Figure 1 The method may also include:

[0061] Determine whether there is next frame data;

[0062] If there is another frame of data, wait for a preset time to continue receiving the voice information sent by the system voice interface;

[0063] If there is no next frame of data, the single voice playback ends and the system voice interface is closed, and the number of initial voice playback start packets is revised according to the actual playback performance.

[0064] In some embodiments, the above-mentioned weighted adjustment of the preset data volume according to the signal strength of the ad hoc network in the current environment and the difference in voice reception and playback of historical playback includes:

[0065] Get the current signal strength, record the historical voice status, and calculate the correlation and weighting coefficient;

[0066] The preset data volume is revised based on the correlation degree and the weighting coefficient, wherein the preset data volume is a data volume threshold of a starting playback buffer zone.

[0067] In some embodiments, the data encoding format corresponding to the voice data sent by the above-mentioned sending end includes command type, command length and command content, wherein the command content includes the destination IP address, source IP address, voice length and voice data volume.

[0068] In some embodiments, the receiving and playing of voice information uses multithreading;

[0069] Use double pointers to maintain the address where the voice receiving audio data is stored and the address where the voice playing thread obtains the voice data.

[0070] In some embodiments, Figure 1 The methods also include:

[0071] The PTT voice initiator initiates PTT voice, first initiates voice preemption information, and the information end sends the preemption voice signaling to the local self-organizing network module. After the preemption voice signaling is successfully sent, the voice maintenance signaling begins to be sent. If the information end does not receive the voice maintenance signaling response within the first preset time period, it is considered that the self-organizing network module has been disconnected and the voice ends;

[0072] If the self-organizing network module does not receive a voice maintenance signaling within a second preset time period after receiving the preemptive voice signaling, it will be automatically released.

[0073] In some embodiments, Figure 1 The methods also include:

[0074] While sending the voice maintenance signaling, the information end sends the voice initiation signaling to the local self-organizing network module. The local self-organizing network module transmits the voice initiation signaling to the destination self-organizing network module according to the destination address in the voice initiation signaling. After the local end receives the destination end's response to the voice initiation signaling, it means that the voice initiation is successful and the voice data is sent.

[0075] In some embodiments, Figure 1 The asynchronous cache design corresponding to the method can be understood as: applying for a certain size of memory interval as a circular buffer, using multiple threads for voice information reception and playback, the voice receiving thread receives voice data and puts the data into the buffer, and the playback thread reads the voice data in the buffer and sends it to the voice playback interface. Double pointers are used to maintain the address where the voice receiving audio data is stored and the address where the voice playback thread obtains voice data. In order to prevent sudden network delays from causing buffer data to be cleared, causing the voice playback thread to interrupt the data obtained and cause the sound playback to jitter, a semaphore is added to enable the voice playback thread to read and play after a certain amount of voice data is stored in the buffer.

[0076] Adaptive dynamic adjustment can be understood as: because of a sufficient amount of buffer starting cache data (the threshold data size from the time the voice receiving thread starts writing data to the buffer to the time the signal is sent to notify the voice playback thread to start), sound jitter can be avoided. The longer the network burst delay, the more data needs to be cached, but setting an excessively large amount of starting buffer data will cause a delay in voice playback. To avoid this contradiction, adaptive adjustment technology is used. According to the signal strength of the self-organizing network in the current environment and the difference in voice reception and playback of historical playback, that is, the size of the data retained in the buffer, a weighted judgment is made to dynamically adjust the setting of the voice buffer data size to shorten the playback delay while ensuring smooth voice playback.

[0077] Source identification and differentiation can be understood as follows: in a complex environment, voice communication terminals are distributed in various places as handheld devices, and the network status of each terminal is different. In addition, according to the characteristics of the ad hoc network, the communication between two terminals may span multiple nodes, so the probability and length of burst delays generated by communication between different nodes are different. We will use different buffer data volume settings in the local device according to the source of the voice data, and adaptively adjust the results according to each data source, and maintain them separately to achieve the optimal voice communication quality of different node terminals.

[0078] Figure 2 is a flow chart of a voice receiving terminal provided by an embodiment of the present disclosure, Figure 3 It is a schematic diagram of an adaptive dynamic adjustment provided by an embodiment of the present disclosure.

[0079] Combination Figure 2 and Figure 3 ,right Figure 1The method is further described in .

[0080] In a specific example, the basic design of the PTT voice sending end is first completed: the PTT voice initiator must first initiate a voice preemption message to initiate a PTT voice. The information end sends the voice preemption message to the local self-organizing network module. After successfully sending the preemption voice signaling, it starts to send a voice maintenance signaling, for example, once every 1s. If the information end does not receive a voice maintenance signaling response within 3s, it is considered that the self-organizing network module has been disconnected and the voice ends. If the self-organizing network module does not receive a voice maintenance signaling within 5s after receiving the preemption voice signaling, it will automatically release. While sending the voice maintenance signaling, the information end sends a voice initiation signaling to the local self-organizing network module. The local self-organizing network module transmits the voice initiation signaling to the destination self-organizing network module according to the destination address in the voice initiation signaling. After the local end receives the destination end's response to the voice initiation signaling, it means that the voice initiation is successful and the voice data can be sent. A single voice data packet can contain 320 bytes of voice information, and its encoding format is 128kbit / s, one packet every 20ms, and the protocol is shown in Table 1. After the voice initiation is completed, the information end sends a voice release signaling. After receiving the voice release signaling, the local self-organizing network module responds to the voice release signaling of the information end and sends a voice release signaling to the other self-organizing network module at the same time. At this point, a PTT voice communication ends.

[0081] Table 1 Voice data encoding format

[0082]

[0083] The following steps may include:

[0084] 1. Apply for a memory range of a certain size as a ring buffer.

[0085] 2. Create a voice data receiving thread on the receiving end to receive the voice data sent by the sending end in the format of Table 1. Save the voice data to the buffer

[0086] 3. Create a voice playback thread. When the receiving thread receives the voice, the playback thread reads the voice data in the buffer and sends it to the voice playback interface. At the same time, add a semaphore design. The receiving thread sends a start semaphore after receiving a certain amount of data (amount of data a), so that the voice playback thread can read and play after storing a certain amount of voice data in the buffer. Figure 2 shown.

[0087] 4. Analyze the voice data packet and play the voice. After the voice communication is completed, determine the source of the voice data. According to the current environment, the strength of the self-organizing network signal is combined with the difference in the reception and playback of the voice played by the source in history, that is, the size of the buffer data, and adjust the data volume a by weight. Dynamically adjust the voice buffer data volume setting as follows: Figure 3 shown.

[0088] 5. Wait for the next voice data.

[0089] It can be seen that the adaptive adjustment technology based on asynchronous caching disclosed in the present invention can make a weighted judgment based on the signal strength of the self-organizing network in the current environment and the difference in voice reception and playback of historical playback, that is, the size of the data retained in the buffer, and dynamically adjust the setting of the voice buffer data volume, so as to shorten the playback delay while ensuring smooth voice playback, thereby improving the audio quality of voice playback.

[0090] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0091] Combination Figure 4 As shown, the embodiment of the present disclosure provides an adaptive voice anti-shake system 400 based on asynchronous cache, including a processor 404 and a memory 401. Optionally, the system may also include a communication interface 402 and a bus 403. Among them, the processor 404, the communication interface 402, and the memory 401 can communicate with each other through the bus 403. The communication interface 402 can be used for information transmission. The processor 404 can call the logic instructions in the memory 401 to execute the adaptive voice anti-shake method based on asynchronous cache in the above embodiment.

[0092] In addition, the logic instructions in the memory 401 described above may be implemented in the form of software functional units and when sold or used as independent products, may be stored in a computer-readable storage medium.

[0093] The memory 401 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 404 executes the function application and data processing by running the program instructions / modules stored in the memory 401, that is, the adaptive voice anti-jitter method based on asynchronous caching in the above embodiment is implemented.

[0094] The memory 401 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 401 may include a high-speed random access memory and may also include a non-volatile memory.

[0095] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute an adaptive voice anti-jitter method based on asynchronous buffering.

[0096] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0097] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0098] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. As used in the description of the embodiments, unless the context clearly indicates otherwise, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0099] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0100] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0101] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. An adaptive voice anti-shake method based on asynchronous buffering, characterized in that: The method comprises: Apply for a memory range of preset size as a ring buffer; Creating a voice data receiving thread for receiving voice data sent by a sending end and saving the voice data to the ring buffer; Create a voice playing thread, the voice playing thread reads the voice data in the ring buffer and sends it to the voice playing interface while the voice data receiving thread receives the voice data; The receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the circular buffer; Parse the voice data stored in the circular buffer and play the voice. After the voice communication is completed, determine the source of the voice data and make weighted adjustments to the preset data volume based on the strength of the self-organizing network signal in the current environment and the difference in voice reception and playback during historical playback.

2. The method according to claim 1, characterized in that The receiving thread sends a start signal after receiving a preset amount of data, so that the voice playing thread reads and plays the voice data after storing it in the ring buffer, including: Wait for the command to obtain the voice information distributed by the module, configure the system voice interface and parse the source address in the voice data packet; Determine whether it is the first reception within the effective time. If it is the first reception, set the number of initial voice playback start packets according to the local and source signal strengths, and wait for voice data; If it is not the first reception, wait for voice data; When the amount of data in the ring buffer reaches the set start playback value, the voice message is sent through the system voice interface.

3. The method according to claim 2, characterized in that The method further comprises: Determine whether there is next frame data; If there is another frame of data, wait for a preset time to continue receiving the voice information sent by the system voice interface; If there is no next frame of data, the single voice playback ends and the system voice interface is closed, and the number of initial voice playback start packets is revised according to the actual playback performance.

4. The method according to claim 1, characterized in that: The weighted adjustment of the preset data volume according to the signal strength of the ad hoc network in the current environment and the difference in voice reception and playback played in history includes: Get the current signal strength, record the historical voice status, and calculate the correlation and weighting coefficient; The preset data volume is revised based on the correlation degree and the weighting coefficient, wherein the preset data volume is a data volume threshold of a starting playback buffer zone.

5. The method according to claim 1, characterized in that The data encoding format corresponding to the voice data sent by the sending end includes command type, command length and command content, wherein the command content includes the destination IP address, source IP address, voice length and voice data volume.

6. The method according to claim 1, characterized in that The reception and playback of voice messages use multithreading; Use double pointers to maintain the address where the voice receiving audio data is stored and the address where the voice playing thread obtains the voice data.

7. The method according to claim 1, characterized in that The method further comprises: The PTT voice initiator initiates PTT voice, first initiates voice preemption information, and the information end sends the preemption voice signaling to the local self-organizing network module. After the preemption voice signaling is successfully sent, the voice maintenance signaling begins to be sent. If the information end does not receive the voice maintenance signaling response within the first preset time period, it is considered that the self-organizing network module has been disconnected and the voice ends; If the self-organizing network module does not receive a voice maintenance signaling within a second preset time period after receiving the preemptive voice signaling, it will be automatically released.

8. The method according to claim 7, characterized in that The method further comprises: While sending the voice maintenance signaling, the information end sends the voice initiation signaling to the local self-organizing network module. The local self-organizing network module transmits the voice initiation signaling to the destination self-organizing network module according to the destination address in the voice initiation signaling. After the local end receives the destination end's response to the voice initiation signaling, it means that the voice initiation is successful and the voice data is sent.