CN113496705B - Audio processing method and device, storage medium and electronic equipment - Google Patents

Audio processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113496705B
CN113496705B CN202110957155.4A CN202110957155A CN113496705B CN 113496705 B CN113496705 B CN 113496705B CN 202110957155 A CN202110957155 A CN 202110957155A CN 113496705 B CN113496705 B CN 113496705B
Authority
CN
China
Prior art keywords
audio
real
compression
time
mute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110957155.4A
Other languages
Chinese (zh)
Other versions
CN113496705A (en
Inventor
泮建光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202110957155.4A priority Critical patent/CN113496705B/en
Publication of CN113496705A publication Critical patent/CN113496705A/en
Application granted granted Critical
Publication of CN113496705B publication Critical patent/CN113496705B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The invention discloses an audio processing method and device, a storage medium and electronic equipment. Wherein the method comprises the following steps: under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio; under the condition that the data quantity of the real-time audio reaches a reference magnitude, counting the data quantity of the mute audio in the real-time audio of the reference magnitude, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold; determining an audio compression parameter corresponding to the data amount of the mute audio; and carrying out audio compression processing on the effective audio according to the audio compression parameters to obtain the playing audio. The invention solves the technical problem of poor user experience caused by incomplete audio data due to direct discarding of the audio data.

Description

Audio processing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of audio processing, and in particular, to an audio processing method and apparatus, a storage medium, and an electronic device.
Background
The digital voice intercom is to realize two-way voice conversation by transmitting voice data sampling code to a far end for playing after being digitized through a network. In data voice intercom, the speed of audio collection and audio playback is consistent in the case of a good network. However, when the network is unstable, since the network transmission speed is smaller than the audio collection speed, a play gap will appear at the audio playing end, and the balance between audio collection and audio playing is broken.
To restore the balance of audio acquisition and audio playback, the prior art typically uses audio packet dropping to restore the balance of audio acquisition and audio playback as soon as possible by buffering the dropped portion of the data. The audio discarding directly affects the integrity of the audio data, resulting in intermittent and incomplete audio playing, so that the user cannot receive the complete audio data, may miss the weight point information, and has poor user experience.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides an audio processing method and device, a storage medium and electronic equipment, which are used for at least solving the technical problem that the audio data is incomplete due to the fact that the audio data is directly discarded, so that the user experience is poor.
According to an aspect of an embodiment of the present invention, there is provided an audio processing method including: under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio; under the condition that the data quantity of the real-time audio reaches a reference magnitude, counting the data quantity of the mute audio in the real-time audio of the reference magnitude, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold; determining an audio compression parameter corresponding to the data amount of the mute audio; and carrying out audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio.
According to another aspect of the embodiment of the present invention, there is also provided an audio processing apparatus including: under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio; under the condition that the data quantity of the real-time audio reaches a reference magnitude, counting the data quantity of the mute audio in the real-time audio of the reference magnitude, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold; determining an audio compression parameter corresponding to the data amount of the mute audio; and carrying out audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio.
According to a further aspect of embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described audio processing method when run.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device including a memory in which a computer program is stored, and a processor configured to execute the above-described audio processing method by the computer program.
In the embodiment of the invention, under the condition that the interruption of playing real-time audio is detected, the real-time audio to be played is obtained, the data quantity of mute audio in real-time audio with reference value is counted, the audio compression parameters of effective audio are determined according to the data quantity of mute audio, the playing audio obtained after the effective audio is compressed according to the audio compression parameters is used for playing the real-time audio, the audio compression degree of the effective audio is determined according to the data quantity of mute audio, the purpose of judging the audio compression degree of the effective audio in real-time audio according to the data quantity of mute audio in real-time audio data is achieved, the purpose of avoiding effective audio loss caused by audio compression is achieved, the technical effect of audio compression of real-time audio data on the basis that data is not lost is achieved, and the technical problem that audio data is incomplete due to direct discarding of audio data, and user experience is poor is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic illustration of an application environment for an alternative audio processing method according to an embodiment of the invention;
FIG. 2 is a flow chart of an alternative audio processing method according to an embodiment of the invention;
FIG. 3 is a flow chart of an alternative audio processing method according to an embodiment of the invention;
FIG. 4 is a flow chart of an alternative audio processing method according to an embodiment of the invention;
FIG. 5 is a flow chart of an alternative audio processing method according to an embodiment of the invention;
FIG. 6 is a flow chart of an alternative audio processing method according to an embodiment of the invention;
fig. 7 is a schematic diagram of an alternative audio processing device according to an embodiment of the present invention;
fig. 8 is a schematic structural view of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present invention, there is provided an audio processing method, alternatively, the above-mentioned audio processing method may be applied, but not limited to, in the environment as shown in fig. 1. The processor 110 receives the real-time collected audio sent by the collection end 100, processes the real-time audio, and sends the processed playing audio to the playing end 120 to realize audio playing.
The processor 110 is not limited to the inclusion of the database 112 and the processing engine 114. Database 112 is used to receive and store real-time audio and play audio. The processing engine 114 is not limited to the playback audio obtained by sequentially performing S102 to S108 to realize processing of the real-time audio. And acquiring real-time audio to be played. Under the condition that the occurrence of playing interruption of the real-time audio playing is detected, the real-time audio to be played is obtained, wherein the real-time audio comprises mute audio and effective audio. And counting the data volume of the mute application. And under the condition that the data quantity of the real-time audio reaches the reference magnitude, counting the data quantity of the mute audio in the real-time audio of the reference magnitude, wherein the audio amplitude of the mute audio is smaller than the amplitude threshold. Audio compression parameters are determined. And determining an audio compression parameter corresponding to the data quantity of the mute audio. And compressing the audio to obtain the played audio. And carrying out audio compression processing on the effective audio according to the audio compression parameters to obtain the playing audio.
Optionally, in this embodiment, the capturing end 100 and the playing end 120 are not limited to be terminal devices with real-time capturing and playing of audio, and may include, but are not limited to, at least one of the following: cell phones (e.g., android cell phones, IOS cell phones, etc.), notebook computers, tablet computers, palm computers, MIDs (Mobile Internet Devices ), PAD, desktop computers, smart televisions, smart talkbacks, etc. The collection end and the play end and the processor are not limited to transmitting audio data through a network, which may include, but is not limited to: a wired network, a wireless network, wherein the wired network comprises: local area networks, metropolitan area networks, and wide area networks, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communications. The processor is not limited to a server, and may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and is not limited in any way in the present embodiment.
As an alternative embodiment, as shown in fig. 2, the above-mentioned audio processing method includes:
s202, under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio;
s204, under the condition that the data quantity of the real-time audio reaches the reference value, counting the data quantity of the mute audio in the real-time audio of the reference value, wherein the audio amplitude of the mute audio is smaller than the amplitude threshold;
s206, determining an audio compression parameter corresponding to the data volume of the mute audio;
s208, performing audio compression processing on the effective audio according to the audio compression parameters to obtain the playing audio.
Alternatively, the play break is not limited to the play buffer being empty, and there is no data to be played in the play buffer. In the real-time playing scene of the audio, the real-time audio data acquired by the acquisition end are transmitted to the playing end through a network. Under the ideal state of being not influenced by network transmission, the audio collection rate of the collection end and the audio playing rate of the playing end are kept consistent, so that real-time playing of the audio is realized. When the playing buffer zone of the playing end stores the data to be played, the real-time playing of the audio is in an equilibrium state, and when the playing buffer zone of the playing end does not have the data to be played, that is, the playing end does not have the audio data for playing currently, the playing interruption is determined.
Optionally, in order to restore the real-time synchronicity of the audio of the playing end and the collecting end to the equilibrium state, and ensure that the collecting end collects the audio in real time, the method is not limited to processing the collected real-time audio, so as to restore the real-time synchronicity of the playing end and the collecting end on the audio by compressing the audio playing of the playing end. And in a balance state that the acquisition end and the playing end process real-time playing, the playing end plays the real-time audio acquired by the acquisition end.
Optionally, under the condition that the play end is detected to generate play interruption, acquiring real-time audio acquired by the acquisition end after the play interruption and to be played. The real-time audio includes mute audio and effective audio. The mute audio is audio with the audio amplitude being smaller than the amplitude threshold, and the effective audio is audio with the audio amplitude being larger than or equal to the amplitude threshold. And dividing the real-time audio into mute audio and effective audio through a preset amplitude threshold value, and regarding the mute audio with the audio amplitude smaller than the amplitude threshold value as audio data without effective sound content.
Optionally, in a case where the data amount of the real-time audio reaches the reference value, the real-time audio is subjected to audio compression processing. The reference magnitude is an audio processing magnitude of the preset real-time audio, and is not limited to audio compression processing of the real-time audio of the reference magnitude at each time. And under the condition that the data quantity of the real-time audio is smaller than the reference quantity value, continuously accumulating the real-time audio until the data quantity of the real-time audio reaches the reference quantity value. The data amount of the real-time audio is not limited to the number of sampling points of the real-time audio.
Optionally, the audio compression processing is performed on the real-time audio with the reference value, which is not limited to determining the audio compression parameter of the effective audio according to the data amount of the mute audio in the real-time audio, so as to compress the effective audio, taking the compressed effective audio as the playing audio, discarding the mute audio in the real-time audio, and compressing the effective audio, so as to restore the audio real-time synchronicity of the acquisition end and the playing end.
In the embodiment of the application, under the condition that the interruption of real-time audio playing is detected, the real-time audio to be played is obtained, the data quantity of the mute audio in the real-time audio with the reference value is counted, the audio compression parameters of the effective audio are determined according to the data quantity of the mute audio, the audio to be played is obtained after the effective audio is compressed according to the audio compression parameters, the audio compression degree of the effective audio is determined according to the data quantity of the mute audio, the purpose of judging the audio compression degree of the effective audio in the real-time audio according to the data quantity of the mute audio in the real-time audio data is achieved, the purpose of preventing the effective audio from being lost due to audio compression is achieved, the technical effect of audio compression of the real-time audio data on the basis that the data is not lost is achieved, and the technical problem that the audio data is incomplete due to direct discarding of the audio data is solved, and the user experience is poor is solved.
As an alternative embodiment, as shown in fig. 3, the determining the audio compression parameter corresponding to the data amount of the mute audio includes:
s302, inquiring an audio compression grade corresponding to the data quantity of the mute audio;
s304, determining the audio compression parameters corresponding to the data quantity of the mute audio according to the audio compression grade.
Optionally, after counting the data amount of the mute audio in the real-time audio with the reference value, determining the audio compression parameter of the effective audio according to the audio compression grade corresponding to the data amount of the mute audio.
Optionally, before the real-time audio to be played is acquired, an association relationship between the data amount of the mute audio and the audio compression parameter is established, and is not limited to an audio compression association table. And recording the corresponding relation between the mute audio data quantity and the audio compression parameter in the real-time audio of the reference quantity value in the audio compression association table.
Alternatively, in the audio compression association table, the mute audio data amount level, the audio compression level, and the audio compression parameter are not limited to being recorded. The mute audio data amount level is used to represent the data amount level at which the mute audio data amount is located, and the audio compression level is used to represent the level of the audio compression level. For example, the data volume level of mute audio is high, and the corresponding audio compression level is high.
Alternatively, not limited to, the greater the amount of mute audio data, the lesser the degree of audio compression. In the real-time audio data of the reference magnitude, the larger the data volume of the mute audio is, the smaller the data volume of the remaining effective audio is, and the smaller the corresponding compression degree is in order to ensure the integrity of the compressed audio. In the real-time audio data of the reference magnitude, the smaller the data volume of the mute audio is, the larger the data volume of the remaining effective audio is, so that the effective audio can be compressed to a larger extent, the playing integrity of the compressed effective audio cannot be affected, and the larger the corresponding compression degree is.
As an optional implementation manner, the determining the audio compression parameter corresponding to the data amount of the mute audio includes: in the case where the audio compression parameter is used to indicate the degree of retention of the effective audio, the amount of data of the mute audio is positively correlated with the value of the audio compression parameter.
Alternatively, the retention degree of the effective audio is not limited to the ratio of the number of audio points of the playing audio obtained by compression to the number of audio points of the effective audio, and may be represented by a sampling rate. In the case where the audio compression parameters are represented by audio sampling rates, the amount of data of the mute audio is positively correlated with the value of the audio sampling rate, and in the real-time audio of the reference value, the greater the amount of data of the mute audio, the greater the value of the audio sampling rate, the lesser the degree of audio compression of the effective audio. In real-time audio of a reference magnitude, the smaller the data amount of mute audio, the smaller the value of the audio sampling rate, and the greater the degree of audio compression of effective audio.
In the embodiment of the application, the data volume of the mute audio in the real-time audio with the reference magnitude is determined, so that the data volume of the effective audio contained in the real-time audio is determined, the audio compression parameters for carrying out audio compression on the effective audio are determined, the audio compression of the effective audio without breaking the effective integrity of the voice frequency is ensured, and the audio compression is realized while the audio integrity is ensured.
As an alternative embodiment, as shown in fig. 4, before the capturing the real-time audio to be played, the method further includes:
s402, obtaining the interruption time length of the playing interruption;
s404, calculating a target data volume corresponding to the intermittent duration, wherein the target data volume is used for indicating the data compression volume to be subjected to audio compression processing.
Optionally, in the case that a play break is detected, a break duration of the play break is determined. The interruption time of the playing interruption is the time from the starting of the playing interruption to the starting of the real-time playing. Under the condition that the interruption time length is determined, calculating a target data volume corresponding to the interruption time length to obtain a data compression volume corresponding to audio compression processing, namely a compression volume required to perform audio compression on real-time audio.
Taking the target data amount as the audio sampling point number as an example, the calculation of the target data amount is not limited to that shown in the formula (1):
dn=t number of sampling points number of channels sampling frequency/8 (1)
Wherein DN represents a target data amount corresponding to T; t represents the duration of the break in seconds.
When the sampling point number is 16, the sampling frequency is 48000, and the channel number is 2, the calculation mode of the target data amount corresponding to the interruption duration T is not limited to:
DN=T*16*2*48000/8 (2)
in the embodiment of the application, the data compression amount required to be processed through audio compression is obtained by converting the interval duration into the target data amount, so that whether audio compression processing is performed on real-time audio or not is conveniently judged.
As an optional implementation manner, after obtaining the played audio, the method further includes:
s502, calculating a difference value between the reference magnitude and the data amount of the played audio to obtain a played compression amount;
s504, under the condition that the playing compression amount is smaller than the target data amount, acquiring current real-time audio;
s506, under the condition that the current real-time audio reaches the reference value, performing audio compression processing on the current effective audio in the current real-time audio according to the data quantity of the current mute audio in the current real-time audio.
Optionally, after determining the target data amount and obtaining the played audio, calculating a difference between the data amount of the played audio and the reference value, and determining the played compression amount. The play compression amount is used to represent the difference in data amount between the real-time audio of the reference magnitude and the play audio.
Optionally, under the condition that the playing compression amount is smaller than the target data amount, continuing to perform audio compression processing on the real-time audio to be played, and not being limited to determining the audio compression parameters of performing audio compression processing on the current effective audio in the current real-time audio according to the data amount of the current mute audio in the current real-time audio under the condition that the current real-time audio after the real-time audio reaches the reference value, thereby performing audio compression processing on the current effective audio. And calculating the play compression amount of the current play audio frequency obtained by compression and the reference value, and accumulating the play compression amount corresponding to the play audio frequency until the accumulated play compression amount is more than or equal to the target data amount.
As an optional implementation manner, after obtaining the play compression amount, the method further includes: and taking the current real-time audio as the current playing audio under the condition that the playing compression amount is equal to or larger than the target data amount.
Optionally, under the condition that the playing compression amount is greater than or equal to the target data amount, determining that the playing end and the collecting end reach a real-time synchronous balance state, stopping audio compression processing of the real-time audio, and taking the collected real-time audio as the playing audio of the playing end.
Alternatively, without being limited to taking the target data amount corresponding to the interruption time period as an initial value of the target data amount, in the case of obtaining the played audio, the target data amount is updated according to the played compression amount corresponding to the played audio until the value of the updated target data amount is equal to or smaller than zero, and the audio processing is determined to be ended.
The audio processing flow is not limited to that shown in fig. 6. In the case that the real-time audio playing interruption is detected, S602 is executed, and the interruption duration T is counted. In the case where the interruption period T is determined, S604 is performed to convert the interruption period T into the target data amount DN. And executing S606, determining a reference magnitude N of real-time audio processed each time, and establishing an association relation between mute audio data quantity and audio compression parameters.
S608 is performed to determine whether the current DN is greater than 0. If it is determined in S608 that the current DN is greater than 0, that is, the audio compression process is required, S610 is performed, and the data amount AN of the mute audio in N is counted. In the case of determining the mute audio data amount AN, S612 is performed to determine the audio compression parameter R corresponding to the mute audio data amount AN. Taking the audio compression parameter as an example of the resampling rate, in the case of determining the resampling rate R, S614 is executed to resample the effective audio according to the method, so as to obtain the play audio. In the case where the playback audio is obtained, S616 is performed, and the audio compression amount dn=n-R (N-AN) is calculated. And performs S618, updates DN: dn=dn-DN. After updating the DN, S608 is performed to determine whether the current DN is greater than 0. If the determination is no in S608, if the current DN is 0 or less, S620 is executed to use the real-time audio as the playback audio.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
According to another aspect of the embodiment of the present invention, there is also provided an audio processing apparatus for implementing the above-mentioned audio processing method. As shown in fig. 7, the apparatus includes:
an obtaining unit 702, configured to obtain real-time audio to be played when a play interruption of real-time audio playing is detected, where the real-time audio includes mute audio and effective audio;
a statistics unit 704, configured to, when the data amount of the real-time audio reaches the reference magnitude, count the data amount of the mute audio in the real-time audio of the reference magnitude, where the audio amplitude of the mute audio is smaller than the amplitude threshold;
a determining unit 706, configured to determine an audio compression parameter corresponding to a data amount of the mute audio;
the compression unit 708 is configured to perform audio compression processing on the effective audio according to the audio compression parameters, so as to obtain a playback audio.
Optionally, the determining unit 706 includes:
the inquiring module is used for inquiring the audio compression grade corresponding to the data quantity of the mute audio;
and the determining module is used for determining the audio compression parameters corresponding to the data quantity of the mute audio according to the audio compression grade.
Optionally, the determining unit 706 is further configured to, in a case where the audio compression parameter is used to indicate a retention degree of the valid audio, positively correlate the data amount of the mute audio with the value of the audio compression parameter.
Optionally, the audio processing device further includes a duration unit, configured to obtain a break duration of the playing break before obtaining the real-time audio to be played; and calculating a target data volume corresponding to the intermittent time length, wherein the target data volume is used for indicating the data compression volume to be subjected to audio compression processing.
Optionally, the above audio processing device further includes a calculating unit, configured to calculate, after obtaining the played audio, a difference between the reference value and a data amount of the played audio, to obtain a played compression amount; under the condition that the playing compression amount is smaller than the target data amount, acquiring current real-time audio; and under the condition that the current real-time audio reaches the reference value, carrying out audio compression processing on the current effective audio in the current real-time audio according to the data quantity of the current mute audio in the current real-time audio.
Optionally, the above audio processing apparatus further includes a playing unit configured to, after obtaining the playing compression amount, take the current real-time audio as the current playing audio in a case where the playing compression amount is equal to or greater than the target data amount.
In the embodiment of the application, under the condition that the interruption of real-time audio playing is detected, the real-time audio to be played is obtained, the data quantity of the mute audio in the real-time audio with the reference value is counted, the audio compression parameters of the effective audio are determined according to the data quantity of the mute audio, the audio to be played is obtained after the effective audio is compressed according to the audio compression parameters, the audio compression degree of the effective audio is determined according to the data quantity of the mute audio, the purpose of judging the audio compression degree of the effective audio in the real-time audio according to the data quantity of the mute audio in the real-time audio data is achieved, the purpose of preventing the effective audio from being lost due to audio compression is achieved, the technical effect of audio compression of the real-time audio data on the basis that the data is not lost is achieved, and the technical problem that the audio data is incomplete due to direct discarding of the audio data is solved, and the user experience is poor is solved.
According to still another aspect of the embodiments of the present invention, there is further provided an electronic device for implementing the above-mentioned audio processing method, where the electronic device may be a playing end or a processor as shown in fig. 1. The present embodiment is described taking the electronic device as an example of a processor. As shown in fig. 8, the electronic device comprises a memory 802 and a processor 804, the memory 802 having stored therein a computer program, the processor 804 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio;
s2, under the condition that the data quantity of the real-time audio reaches a reference value, counting the data quantity of the mute audio in the real-time audio of the reference value, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold;
s3, determining an audio compression parameter corresponding to the data quantity of the mute audio;
s4, performing audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 8 is only schematic, and the electronic device may also be a terminal device such as a smart phone (e.g. an Android phone, an IOS phone, etc.), a tablet computer, a palm computer, and a mobile internet device (Mobile Internet Devices, MID), a PAD, an intercom, etc. Fig. 8 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
The memory 802 may be used to store software programs and modules, such as program instructions/modules corresponding to the audio processing methods and apparatuses in the embodiments of the present invention, and the processor 804 executes the software programs and modules stored in the memory 802, thereby performing various functional applications and data processing, that is, implementing the audio processing methods described above. Memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 802 may further include memory remotely located relative to processor 804, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 802 may be used for storing real-time audio, audio compression parameters, playing audio, and the like. As an example, as shown in fig. 8, the memory 802 may include, but is not limited to, the acquisition unit 702, the statistics unit 704, the determination unit 706, and the compression unit 708 in the audio processing apparatus. In addition, other module units in the above-mentioned audio processing apparatus may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 806 is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission means 806 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 806 is a Radio Frequency (RF) module for communicating wirelessly with the internet.
In addition, the electronic device further includes: a display 808 for displaying the above-described play audio; and a connection bus 810 for connecting the respective module parts in the above-described electronic device.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read from a computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in various alternative implementations of the audio processing aspects described above. Wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio;
s2, under the condition that the data quantity of the real-time audio reaches a reference value, counting the data quantity of the mute audio in the real-time audio of the reference value, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold;
s3, determining an audio compression parameter corresponding to the data quantity of the mute audio;
s4, performing audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present invention.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (9)

1. An audio processing method, comprising:
under the condition that the occurrence of play interruption of real-time audio play is detected, acquiring real-time audio to be played, wherein the real-time audio comprises mute audio and effective audio;
under the condition that the data quantity of the real-time audio reaches a reference magnitude, counting the data quantity of the mute audio in the real-time audio of the reference magnitude, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold;
determining an audio compression parameter corresponding to the data amount of the mute audio;
performing audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio;
the audio compression parameter is used for indicating the retention degree of the effective audio, and the retention degree comprises the ratio of the audio points of the played audio obtained through compression to the audio points of the effective audio.
2. The method of claim 1, wherein the determining the audio compression parameter corresponding to the amount of data of the mute audio comprises:
inquiring an audio compression grade corresponding to the data quantity of the mute audio;
and determining the audio compression parameters corresponding to the data quantity of the mute audio according to the audio compression grade.
3. The method according to claim 1 or 2, wherein said determining an audio compression parameter corresponding to the amount of data of the mute audio comprises:
in the case where the audio compression parameter is used to indicate the degree of retention of the effective audio, the amount of data of the mute audio is positively correlated with the value of the audio compression parameter.
4. The method of claim 1, wherein prior to capturing real-time audio to be played, the method further comprises:
acquiring the interruption time length of the playing interruption;
and calculating a target data volume corresponding to the intermittent time length, wherein the target data volume is used for indicating the data compression volume to be subjected to audio compression processing.
5. The method of claim 4, wherein after obtaining the played audio, the method further comprises:
calculating the difference value between the reference value and the data volume of the played audio to obtain a played compression volume;
acquiring current real-time audio under the condition that the playing compression amount is smaller than the target data amount;
and under the condition that the current real-time audio reaches the reference value, carrying out audio compression processing on the current effective audio in the current real-time audio according to the data quantity of the current mute audio in the current real-time audio.
6. The method of claim 5, wherein after obtaining the play compression amount, the method further comprises:
and taking the current real-time audio as the current playing audio under the condition that the playing compression amount is equal to or larger than the target data amount.
7. An audio processing apparatus, comprising:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring real-time audio to be played under the condition that the play interruption of the real-time audio play is detected, and the real-time audio comprises mute audio and effective audio;
the statistics unit is used for counting the data amount of the mute audio in the real-time audio with the reference magnitude under the condition that the data amount of the real-time audio reaches the reference magnitude, wherein the audio amplitude of the mute audio is smaller than an amplitude threshold;
a determining unit, configured to determine an audio compression parameter corresponding to the data amount of the mute audio;
the compression unit is used for carrying out audio compression processing on the effective audio according to the audio compression parameters to obtain playing audio;
the audio compression parameter is used for indicating the retention degree of the effective audio, and the retention degree comprises the ratio of the audio points of the played audio obtained through compression to the audio points of the effective audio.
8. A computer readable storage medium comprising a stored program, wherein the program when run performs the method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 6 by means of the computer program.
CN202110957155.4A 2021-08-19 2021-08-19 Audio processing method and device, storage medium and electronic equipment Active CN113496705B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110957155.4A CN113496705B (en) 2021-08-19 2021-08-19 Audio processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110957155.4A CN113496705B (en) 2021-08-19 2021-08-19 Audio processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113496705A CN113496705A (en) 2021-10-12
CN113496705B true CN113496705B (en) 2024-03-08

Family

ID=77996912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110957155.4A Active CN113496705B (en) 2021-08-19 2021-08-19 Audio processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113496705B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573089A (en) * 1991-09-18 1993-03-26 Matsushita Electric Ind Co Ltd Speech reproducing method
JPH08211894A (en) * 1995-02-03 1996-08-20 Sanyo Electric Co Ltd Voice-grade communication equipment and voice-grade communication system
JPH0945001A (en) * 1995-08-02 1997-02-14 Matsushita Electric Ind Co Ltd Disk apparatus
US6282611B1 (en) * 1990-07-11 2001-08-28 Hitachi, Ltd. Digital information system, digital audio signal processor and signal converter
JP2008058956A (en) * 2006-07-31 2008-03-13 Matsushita Electric Ind Co Ltd Speech reproduction device
CN101771869A (en) * 2008-12-30 2010-07-07 深圳市万兴软件有限公司 AV (audio/video) encoding and decoding device and method
CN104123949A (en) * 2014-01-24 2014-10-29 腾讯科技(深圳)有限公司 Clamped frame detection method and device
JP2015122682A (en) * 2013-12-25 2015-07-02 ブラザー工業株式会社 Remote conference program, terminal device, and remote conference method
CN105847857A (en) * 2016-03-07 2016-08-10 乐视致新电子科技(天津)有限公司 Method and device for processing audios when video is played in double speed
CN108924665A (en) * 2018-05-30 2018-11-30 深圳市捷视飞通科技股份有限公司 Reduce method, apparatus, computer equipment and the storage medium of video playing delay
CN109427342A (en) * 2017-09-01 2019-03-05 三星Sds株式会社 For preventing the voice data processing apparatus and method of voice latency
CN111355996A (en) * 2018-12-20 2020-06-30 海信视像科技股份有限公司 Audio playing method and computing device
CN116259322A (en) * 2021-12-10 2023-06-13 腾讯科技(深圳)有限公司 Audio data compression method and related products

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6282611B1 (en) * 1990-07-11 2001-08-28 Hitachi, Ltd. Digital information system, digital audio signal processor and signal converter
JPH0573089A (en) * 1991-09-18 1993-03-26 Matsushita Electric Ind Co Ltd Speech reproducing method
JPH08211894A (en) * 1995-02-03 1996-08-20 Sanyo Electric Co Ltd Voice-grade communication equipment and voice-grade communication system
JPH0945001A (en) * 1995-08-02 1997-02-14 Matsushita Electric Ind Co Ltd Disk apparatus
JP2008058956A (en) * 2006-07-31 2008-03-13 Matsushita Electric Ind Co Ltd Speech reproduction device
CN101771869A (en) * 2008-12-30 2010-07-07 深圳市万兴软件有限公司 AV (audio/video) encoding and decoding device and method
JP2015122682A (en) * 2013-12-25 2015-07-02 ブラザー工業株式会社 Remote conference program, terminal device, and remote conference method
CN104123949A (en) * 2014-01-24 2014-10-29 腾讯科技(深圳)有限公司 Clamped frame detection method and device
CN105847857A (en) * 2016-03-07 2016-08-10 乐视致新电子科技(天津)有限公司 Method and device for processing audios when video is played in double speed
CN109427342A (en) * 2017-09-01 2019-03-05 三星Sds株式会社 For preventing the voice data processing apparatus and method of voice latency
CN108924665A (en) * 2018-05-30 2018-11-30 深圳市捷视飞通科技股份有限公司 Reduce method, apparatus, computer equipment and the storage medium of video playing delay
CN111355996A (en) * 2018-12-20 2020-06-30 海信视像科技股份有限公司 Audio playing method and computing device
CN116259322A (en) * 2021-12-10 2023-06-13 腾讯科技(深圳)有限公司 Audio data compression method and related products

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MP3数码音频播放机设计;王希公;《中国优秀硕士学位论文全文数据库(信息科技辑)》;20060715;全文 *

Also Published As

Publication number Publication date
CN113496705A (en) 2021-10-12

Similar Documents

Publication Publication Date Title
US20220394316A1 (en) Message sending method and device, readable medium and electronic device
EP3457704A1 (en) Quality of user experience testing for video transmissions
CN103457910B (en) A kind of method and terminal of upper transmitting file
CN104000562A (en) Health reminding system, health reminding method and health reminding device
CN109286813B (en) Video communication quality detection method and device
CN103731631B (en) The method, apparatus and system of a kind of transmitting video image
CN104811751A (en) Streaming media playing blockage pause recognition method and streaming media playing blockage pause recognition device
JP6574031B2 (en) Mobile video call quality measurement method and system
CN102136962B (en) Method, relative device and system for delimiting quality problems
CN109511011B (en) YouTube DASH encrypted video-oriented fingerprint database construction method
CN111294664A (en) Audio and video data transmission method, electronic equipment and storage medium
CN112738538B (en) Live broadcasting room on-hook behavior detection method and device, electronic equipment and computer readable storage medium
JP5938015B2 (en) Chunk download completion determination device, chunk download completion determination method, and program
CN106454553A (en) A precise time delay live video network transmission control method
CN113496705B (en) Audio processing method and device, storage medium and electronic equipment
CN112565016B (en) Positioning method, system and device for abnormal time delay, electronic equipment and storage medium
CN107786557B (en) Team game acceleration method and related product
CN110602515B (en) Data processing method based on block chain, server and storage medium
CN113364698A (en) Bandwidth estimation method, system, electronic device and storage medium
CN109584889B (en) Audio transmission method and device and storage medium
CN110213206B (en) Stream data processing method, server, and computer-readable storage medium
JP2015106768A (en) Program for communication device, communication device, and communication method
CN110365690A (en) Flow collection method, apparatus and storage medium
CN114866827A (en) Audio and video synchronization detection method and device, storage medium and electronic equipment
CN106470348B (en) Rating number statistical method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant