[go: up one dir, main page]

CN104143333B - A kind of audio frequency transmission method, client and terminal unit - Google Patents

A kind of audio frequency transmission method, client and terminal unit Download PDF

Info

Publication number
CN104143333B
CN104143333B CN201310172926.4A CN201310172926A CN104143333B CN 104143333 B CN104143333 B CN 104143333B CN 201310172926 A CN201310172926 A CN 201310172926A CN 104143333 B CN104143333 B CN 104143333B
Authority
CN
China
Prior art keywords
audio
frame number
client
audio frame
coding
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
CN201310172926.4A
Other languages
Chinese (zh)
Other versions
CN104143333A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310172926.4A priority Critical patent/CN104143333B/en
Priority to PCT/CN2013/085913 priority patent/WO2014180100A1/en
Priority to US14/108,230 priority patent/US9437205B2/en
Priority to ARP140101887A priority patent/AR096240A1/en
Publication of CN104143333A publication Critical patent/CN104143333A/en
Application granted granted Critical
Publication of CN104143333B publication Critical patent/CN104143333B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention provides a kind of audio frequency transmission method, client and terminal unit, and method therein comprises the steps that client detects when audio transmission is asked, and the recording application calling described client place terminal unit carries out the recording operation of audio file;Described client gathers the audio frame number evidence of the current described audio file recorded from the recording application of described terminal unit;The audio frame number evidence of the described audio file of described current recording is encoded by described client, and by the audio frame number after described coding according to transmitting to server.The present invention can promote audio transmission efficiency effectively, meets user's actual demand to audio transmission time delay.

Description

A kind of audio frequency transmission method, client and terminal unit
Technical field
The present invention relates to a kind of Internet technical field, be specifically related to Audiotechnica field, particularly relate to one Audio frequency transmission method, client and terminal unit.
Background technology
At present, applications client (such as: IM(Instant Messenger, instant messaging) client, SNS (Social Networking Services, social network services) client) recording technology is widely used, As the basis of audio transmission, provide the user the service of exchange and conmmunication more easily.Traditional audio frequency passes Defeated scheme is substantially: client provides " recording " button in voice-enabled chat interface, and user presses this and presses Sending audio transmission request during key, the recorded program of client call client place terminal unit starts recording, The speech data of admission user's input;The End of Tape when user unclamps this button, the recording journey of terminal unit The complete speech data of acquisition is carried out recording process and forms audio file by sequence, and audio file is sent to client End carries out audio coding and audio transmission.In such scheme, owing to audio transmission process needs to wait recording knot Shu Hou, just carries out the recording of audio frequency, encodes and transmit, and this makes the time delay of audio transmission bigger, it is impossible to suitable For some, propagation delay time is required higher scene, it is impossible to meet user's reality to audio transmission time delay Demand.
Summary of the invention
The embodiment of the present invention provides a kind of audio frequency transmission method, client and terminal unit, can effectively promote Audio transmission efficiency, meets user's actual demand to audio transmission time delay.
First aspect present invention provides a kind of audio frequency transmission method, it may include:
Client detects when audio transmission is asked, and calls the recording application of described client place terminal unit Carry out the recording operation of audio file;
Described client gathers the current described audio file recorded from the recording application of described terminal unit Audio frame number evidence;
The audio frame number evidence of the described audio file of described current recording is encoded by described client, and will Audio frame number after described coding is according to transmitting to server.
Second aspect present invention provides a kind of client, it may include:
Calling module, for when detecting that audio transmission is asked, calls described client place terminal unit Recording application carry out the recording operation of audio file;
Acquisition module, for gathering the current described audio frequency recorded literary composition from the recording application of described terminal unit The audio frame number evidence of part;
Coding module, for encoding the audio frame number of the described audio file of described current recording evidence;
Transport module, is used for the audio frame number after described coding according to transmitting to server.
Third aspect present invention provides a kind of terminal unit, it may include: the client that above-mentioned second aspect provides.
Implement the embodiment of the present invention, have the advantages that
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to enforcement In example or description of the prior art, the required accompanying drawing used is briefly described, it should be apparent that, describe below In accompanying drawing be only some embodiments of the present invention, for those of ordinary skill in the art, do not paying On the premise of going out creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The flow chart of a kind of audio frequency transmission method that Fig. 1 provides for the embodiment of the present invention;
The flow chart of the another kind of audio frequency transmission method that Fig. 2 provides for the embodiment of the present invention;
The flow chart of another audio frequency transmission method that Fig. 3 provides for the embodiment of the present invention;
The flow chart of another audio frequency transmission method that Fig. 4 provides for the embodiment of the present invention;
The structural representation of a kind of client that Fig. 5 provides for the embodiment of the present invention;
The structural representation of the another kind of client that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the embodiment of the coding module that Fig. 7 provides for the embodiment of the present invention;
Fig. 8 determines the structural representation of the embodiment of unit for the mode that the embodiment of the present invention provides;
The structural representation of one embodiment of the detection trigger module that Fig. 9 provides for the embodiment of the present invention;
The structural representation of another embodiment of the detection trigger module that Figure 10 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly Chu, be fully described by, it is clear that described embodiment be only a part of embodiment of the present invention rather than Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creation The every other embodiment obtained under property work premise, broadly falls into the scope of protection of the invention.
In the embodiment of the present invention, terminal unit can include but not limited to: PC(Personal Computer, individual People's computer), panel computer, mobile phone, smart mobile phone, the equipment such as notebook computer.Client can include But it is not limited to: IM client, SNS client side etc..Wherein, client is installed in terminal unit, visitor Family end belongs to the client modules in terminal unit, and terminal unit belongs to client place terminal unit.
Below in conjunction with accompanying drawing 1-accompanying drawing 4, the audio frequency transmission method providing the embodiment of the present invention is situated between in detail Continue.
Refer to Fig. 1, for the flow chart of a kind of audio frequency transmission method that the embodiment of the present invention provides;The method can Comprise the following steps S101-step S104.
S101, client detects when audio transmission is asked, and calls the record of described client place terminal unit Sound application carries out the recording operation of audio file.
Wherein, the recording application of described client place terminal unit, can be the operation of described terminal unit The recording application of system, such as: with Android(Android, a kind of mobile phone operating system) it is operating system Terminal unit, its recording application can be the recording application of android system.In the embodiment of the present invention, client End can provide one for initiate audio transmission request button, when this button is in pressed state, then can send out Play audio transmission request, such as: client can provide " pin and a speak " function button, and user pins This function button, client then can detect that audio transmission is asked, and now user can input voice to client Data.In this step, client detects when audio transmission is asked, can be by calling described client place The API(Application Programming Interface of the recording application of terminal unit, application programming Interface) interface, with call described terminal unit recording application to user input speech data record, And the recording operation of audio file is carried out according to the speech data of user's input.
In actual application, the recording operation process that the recording application of described terminal unit carries out audio file is permissible The speech data of simulation user inputted including the recording application of: described terminal unit carry out analog digital conversion, Sampling, quantization etc. process, and form at least one frame audio frame number evidence, and this at least one frame audio frame number is according to forming PCM(Pulse-code modulation, pulse code modulation) audio file of form.
S102, described client gathers the current described audio frequency recorded from the recording application of described terminal unit The audio frame number evidence of file.
As described in front step S101, the recording application of described terminal unit carries out the recording operation mistake of audio file Cheng Zhong, can form audio frame number evidence one by one;In this step, described client is from described terminal unit Recording application in gather the audio frame number evidence of the current described audio file recorded, particularly as follows: whenever described Forming a frame audio frame number evidence in the recording application of terminal unit, described client is then from described terminal unit In recording application by this frame audio frame data acquisition out.
S103, the audio frame number evidence of the described audio file of described current recording is encoded by described client.
Wherein, coded system can be AMR(Adaptive Multi-Rate, a kind of audio format) coded system, Including fixed point coded system and floating-point code mode.In this step, described client preferably employs AMR coding Mode, encodes the audio frame number evidence of the described audio file of described current recording;The most described client Often collect a frame audio frame number evidence, then use AMR coded system to this frame audio frame number according to encoding.
S104, described client by the audio frame number after described coding according to transmission to server.
In this step, by the audio frame number after described coding according to transmission to server, then achieve audio frequency literary composition Part carries out the process that recording limit, limit sends.A kind of feasible embodiment of this step is: can preset every time The amount threshold of audio frame number evidence after the described coding of transmission, after coding described in described client-cache extremely A few frame audio frame number evidence, when the data volume of the audio frame number evidence after the described coding of caching arrives predetermined number During threshold value, by the audio frame number after the described coding of the predetermined number threshold value of this caching according to transmission to server. The embodiment that the another kind of this step is feasible is: can preset the audio frame after the described coding of transmission every time The duration of data, at least one frame audio frame number evidence after coding described in described client-cache, when the institute of caching When stating total frame length arrival preset duration of each frame audio frame number evidence after coding, by the preset duration of this caching Audio frame number after described coding is according to transmitting to server.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Refer to Fig. 2, for the flow chart of the another kind of audio frequency transmission method that the embodiment of the present invention provides;The method S201-step S208 can be comprised the following steps.
S201, client detects when audio transmission is asked, and calls the record of described client place terminal unit Sound application carries out the recording operation of audio file.
S202, described client gathers the current described audio frequency recorded from the recording application of described terminal unit The audio frame number evidence of file.
Step S201-step S202 of the present embodiment can be found in the step S101-step of embodiment illustrated in fig. 1 S102, is not repeated herein.
S203, described client determines the coded system suitable with described terminal unit.
Wherein, coded system can be AMR coded system, including fixed point coded system and floating-point code mode. Fixed point coded system possess take CPU(Central Processing Unit, central processing unit) resource is few, meter Calculate simple, the feature that fidelity is relatively low;Floating-point code mode possesses that to take cpu resource many, calculates complexity, The feature that fidelity is higher.This step can determine and described terminal according to the cpu performance of described terminal unit The coded system that equipment is suitable, such as: if the cpu performance of described terminal unit is relatively low (such as: CPU provides Source is less and computing capability is relatively low), this step can determine that fixed point coded system is for suitable with described terminal unit Coded system;For another example: if the cpu performance of described terminal unit is higher (such as: resource is more and calculates energy Power is higher), this step can determine that floating-point code mode is the coded system suitable with described terminal unit.
S204, described client according to determined by coded system, to the described audio frequency of described current recording literary composition The audio frame number of part is according to encoding.
In this step, described client, according to the coded system suitable with described terminal unit, is worked as described The audio frame number of the described audio file of front recording, according to encoding, can promote code efficiency effectively, it is ensured that Coded reliability.
Step S203-step S204 of the present embodiment can be the concrete of step S103 of embodiment illustrated in fig. 1 Refinement step.
S205, the audio frame number evidence after coding described in described client-cache.
S206, described client detects whether to there is transmission trigger event, if testing result is yes, proceeds to step Rapid S207;Otherwise, step S206 is continued.
Wherein, transmission trigger event includes: the data volume of the audio frame number evidence after the described coding cached reaches To predetermined number threshold value;Or, when the frame length of the audio frame number evidence after the described coding cached reaches to preset Long.
S207, described client extracts the audio frame number evidence after the described coding cached.
S208, the audio frame number after the described coding that described client will be extracted is according to transmitting to server.
In this step, by the audio frame number after described coding according to transmission to server, then achieve audio frequency literary composition Part carries out the process that recording limit, limit sends.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Refer to Fig. 3, for the flow chart of another audio frequency transmission method that the embodiment of the present invention provides;The method S301-step S310 can be comprised the following steps.
S301, client detects when audio transmission is asked, and calls the record of described client place terminal unit Sound application carries out the recording operation of audio file.
S302, described client gathers the current described audio frequency recorded from the recording application of described terminal unit The audio frame number evidence of file.
Step S301-step S302 of the present embodiment can be found in the step S101-step of embodiment illustrated in fig. 1 S102, is not repeated herein.
S303, described client judges when averagely the encoding of audio frame number evidence of the described audio file recorded Between whether more than preset time threshold;If the determination result is YES, step S304 is proceeded to;Otherwise, step is proceeded to S305。
In the embodiment of the present invention, apply due to the recording of described terminal unit and often record formation one frame audio frame number According to, described client then gathers this frame audio frame number evidence, and to this frame audio frame number according to encoding;When needing Before encoding the current audio frame number recorded evidence, in this step, described client judges to record The average coding time of audio frame number evidence of described audio file whether more than preset time threshold, i.e. described Client judges whether the average coding time of encoded audio frame number evidence is more than preset time threshold, and this is pre- If time threshold can be set according to practical situation, such as: may be set to 1s, 2s etc..If sentenced Disconnected result is yes, shows to encode the consuming time longer, further demonstrates that the cpu performance of described terminal unit relatively Difference, then can proceed to step S304.If it is judged that be no, show to encode the consuming time shorter, further Show that the cpu performance of described terminal unit is higher, step S305 can be proceeded to.
S304, fixed point coded system is defined as the coding staff suitable with described terminal unit by described client Formula;Proceed to step S306 afterwards.
S305, floating-point code mode is defined as the coding staff suitable with described terminal unit by described client Formula.
S306, described client according to determined by coded system, to the described audio frequency of described current recording literary composition The audio frame number of part is according to encoding.
In this step, described client, according to the coded system suitable with described terminal unit, is worked as described The audio frame number of the described audio file of front recording, according to encoding, can promote code efficiency effectively, it is ensured that Coded reliability.
S307, the audio frame number evidence after coding described in described client-cache.
S308, whether the data volume of the audio frame number evidence after the described coding that the detection of described client has cached reaches To predetermined number threshold value, if testing result is yes, proceed to step S309;Otherwise, step S308 is continued.
Wherein, predetermined number threshold value can be set according to practical situation, such as: can set according to the network bandwidth Putting predetermined number threshold value is 2K, 3K etc..In the embodiment of the present invention, due to the recording of described terminal unit Application is often recorded and is formed a frame audio frame number evidence, and described client then gathers this frame audio frame number evidence, to this frame Audio frame number is according to encoding, and the audio frame number evidence described in caching;It is described that this step then judges to have cached Whether the data volume of the audio frame number evidence after coding reaches predetermined number threshold value, such as: after assuming a frame coding The data volume of audio frame number evidence be 1K, predetermined number threshold value is 2K, then when described client-cache two frame Audio frame number after coding according to time, this step can detect that the audio frame number evidence after the described coding cached Data volume reaches predetermined number threshold value.
S309, described client extracts the audio frame number evidence after the described coding cached.
Illustrating according to the example in step S308, this step extracts the audio frequency after the two frame codings cached Frame data, i.e. extract the audio frame number evidence after the described coding that this data volume cached is 2K.Need explanation , while the audio frame number evidence after extracting the described coding cached of the client described in this step, Audio frame number after the described coding being extracted from the spatial cache of described client is according to deleting.
S310, the audio frame number after the described coding that described client will be extracted is according to transmitting to server.
Step S310 of the present embodiment can be found in step S208 of embodiment illustrated in fig. 2, is not repeated herein.
The idiographic flow of the audio frequency transmission method of the present embodiment will be described with an instantiation below.
Assuming that terminal unit is mobile phone, client is the IM client in mobile phone.IM client provides and is used for Initiate " pin and speak " function button of audio transmission request.Simultaneously, it is assumed that the number of a frame audio frame number evidence Being 1K according to amount, predetermined number threshold value is 2K, and preset time threshold is 1s.
When user pins " pin and speak " function button that IM client provides, IM client detects sound Keeping pouring in defeated request, user can input speech data to IM client.The recording of IM client call mobile phone should Record with the speech data that user is inputted, and formed at least according to the language data process of user's input One frame audio frame number evidence, this at least one frame audio frame number is according to forming audio file.
Assuming that audio file comprises 10 frame audio frame number evidences altogether, formation the 1st has been recorded in the recording application of mobile phone Frame is to the 3rd frame audio frame number evidence, and gathered by IM client, coded treatment is, and IM client slow Deposit and space cached the 3rd frame audio frame number evidence, it is assumed that the scramble time of the 1st frame audio frame number evidence is 0.2s, The scramble time of the 2nd frame audio frame number evidence is 0.8s, and the scramble time of the 3rd frame audio frame number evidence is 0.2s.Hands The current recording of recording application of machine forms the 4th frame audio frame number evidence, and the recording of mobile phone is applied the 4th frame sound Frequently frame data are sent to IM client, and IM client gathers this frame audio frame number evidence.IM client has calculated The average coding time of the 1st frame to the 3rd frame audio frame number evidence recorded is (0.2+0.8+0.2)/3=0.4s, little Determine that floating-point code mode is the coded system suitable with mobile phone in preset time threshold 1s, IM client.
IM client uses floating-point code mode to current the 4th frame audio frame number recorded according to encoding, IM The 4th frame audio frame number evidence after client-cache coding, comprises coding altogether in the spatial cache of IM client After the 3rd frame audio frame number evidence and the 4th frame audio frame number evidence, IM client judges these two frame sounds cached Frequently the data volume size of frame data is 2K, has reached predetermined number threshold value 2K, and IM client is then extracted the most slow This 2K audio frame number deposited is according to transmitting to server.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Refer to Fig. 4, for the flow chart of another audio frequency transmission method that the embodiment of the present invention provides;The method S401-step S410 can be comprised the following steps.
S401, client detects when audio transmission is asked, and calls the record of described client place terminal unit Sound application carries out the recording operation of audio file.
S402, described client gathers the current described audio frequency recorded from the recording application of described terminal unit The audio frame number evidence of file.
S403, described client judges when averagely the encoding of audio frame number evidence of the described audio file recorded Between whether more than preset time threshold;If the determination result is YES, step S404 is proceeded to;Otherwise, step is proceeded to S405。
S404, fixed point coded system is defined as the coding staff suitable with described terminal unit by described client Formula;Proceed to step S406 afterwards.
S405, floating-point code mode is defined as the coding staff suitable with described terminal unit by described client Formula.
S406, described client according to determined by coded system, to the described audio frequency of described current recording literary composition The audio frame number of part is according to encoding.
S407, the audio frame number evidence after coding described in described client-cache.
Step S401-step S407 of the present embodiment can be found in the step S301-step of embodiment illustrated in fig. 3 S306, is not repeated herein.
S408, whether the frame length of the audio frame number evidence after the described coding that the detection of described client has cached reaches Preset duration, if testing result is yes, proceeds to step S409;Otherwise, step S408 is continued.
Wherein, preset duration can be set according to practical situation, such as: can arrange preset duration be 2s, 3s etc..In the embodiment of the present invention, apply due to the recording of described terminal unit and often record formation one frame audio frequency Frame data, described client then gathers this frame audio frame number evidence, to this frame audio frame number according to encoding, and Audio frame number evidence described in caching;This step then judges the frame of the audio frame number evidence after the described coding cached Long whether reach preset duration, such as: the frame length assuming the audio frame number evidence after a frame coding is 1s, presets Amount threshold is 2s, then when described client-cache two frame encode after audio frame number according to time, this step can be examined The frame length measuring the audio frame number evidence after the described coding cached reaches preset duration.
S409, described client extracts the audio frame number evidence after the described coding cached.
Illustrating according to the example in step S408, this step extracts the audio frequency after the two frame codings cached Frame data, i.e. extract the audio frame number evidence after the described coding that the total frame length cached is 2s.Need explanation It is, while the audio frame number evidence after extracting the described coding cached of the client described in this step, from Audio frame number after the described coding being extracted in the spatial cache of described client is according to deleting.
S410, the audio frame number after the described coding that described client will be extracted is according to transmitting to server.
Step S410 of the present embodiment can be found in step S208 of embodiment illustrated in fig. 2, is not repeated herein.
The idiographic flow of the audio frequency transmission method of the present embodiment will be described with an instantiation below.
Assuming that terminal unit is mobile phone, client is the IM client in mobile phone.IM client provides and is used for Initiate " pin and speak " function button of audio transmission request.Simultaneously, it is assumed that the frame of a frame audio frame number evidence A length of 1s, preset duration is 2s, and preset time threshold is 1s.
When user pins " pin and speak " function button that IM client provides, IM client detects sound Keeping pouring in defeated request, user can input speech data to IM client.The recording of IM client call mobile phone should Record with the speech data that user is inputted, and formed at least according to the language data process of user's input One frame audio frame number evidence, this at least one frame audio frame number is according to forming audio file.
Assuming that audio file comprises 10 frame audio frame number evidences altogether, formation the 1st has been recorded in the recording application of mobile phone Frame is to the 3rd frame audio frame number evidence, and gathered by IM client, coded treatment is, and IM client slow Deposit and space cached the 3rd frame audio frame number evidence, it is assumed that the scramble time of the 1st frame audio frame number evidence is 0.2s, The scramble time of the 2nd frame audio frame number evidence is 0.8s, and the scramble time of the 3rd frame audio frame number evidence is 0.2s.Hands The current recording of recording application of machine forms the 4th frame audio frame number evidence, and the recording of mobile phone is applied the 4th frame sound Frequently frame data are sent to IM client, and IM client gathers this frame audio frame number evidence.IM client has calculated The average coding time of the 1st frame to the 3rd frame audio frame number evidence recorded is (0.2+0.8+0.2)/3=0.4s, little Determine that floating-point code mode is the coded system suitable with mobile phone in preset time threshold 1s, IM client.
IM client uses floating-point code mode to current the 4th frame audio frame number recorded according to encoding, IM The 4th frame audio frame number evidence after client-cache coding, comprises coding altogether in the spatial cache of IM client After the 3rd frame audio frame number evidence and the 4th frame audio frame number evidence, IM client judges these two frame sounds cached Frequently total frame length of frame data is 2s, has reached preset duration 2s, and IM client then extracts this total frame cached The audio frame number of long 2s is according to transmitting to server.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Below in conjunction with accompanying drawing 5-accompanying drawing 10, the structure of the client that the embodiment of the present invention provides is carried out in detail Introduce.It should be noted that the client shown in accompanying drawing 5-accompanying drawing 10, it is used for performing Fig. 1-Fig. 4 of the present invention The method of illustrated embodiment, for convenience of description, illustrate only the part relevant to the embodiment of the present invention, tool Body technique details does not discloses, and refer to the embodiment shown in Fig. 1-Fig. 4 of the present invention.
Refer to Fig. 5, for the structural representation of a kind of client that the embodiment of the present invention provides;This client can Including: calling module 101, acquisition module 102, coding module 103 and transport module 104.
Calling module 101, for when detecting that audio transmission is asked, calls described client place terminal and sets Standby recording application carries out the recording operation of audio file.
Wherein, the recording application of described client place terminal unit, can be the operation of described terminal unit The recording application of system, such as: the terminal unit with Android as operating system, its recording application can be The recording application of android system.In the embodiment of the present invention, client can provide one to pass for initiating audio frequency The button of defeated request, when this button is in pressed state, then can initiate audio transmission request, such as: client End can provide " pin and a speak " function button, and user pins this function button, and client then can detect Asking to audio transmission, now user can input speech data to client.When detecting that audio transmission is asked Time, described calling module 101 can be by calling the API of the recording application of described client place terminal unit Interface, the speech data inputted user to call the recording application of described terminal unit is recorded, and root The recording operation of audio file is carried out according to the speech data of user's input.
In actual application, the recording operation process that the recording application of described terminal unit carries out audio file is permissible The speech data of simulation user inputted including the recording application of: described terminal unit carry out analog digital conversion, Sampling, quantization etc. process, and form at least one frame audio frame number evidence, and this at least one frame audio frame number is according to forming The audio file of PCM format.
Acquisition module 102, for gathering the current described audio frequency recorded from the recording application of described terminal unit The audio frame number evidence of file.
During carrying out the recording operation of audio file due to the recording application of described terminal unit, one can be formed The audio frame number evidence of frame one frame, described acquisition module 102 gathers from the recording of described terminal unit is applied works as The audio frame number evidence of the described audio file of front recording, particularly as follows: whenever the recording of described terminal unit is applied Middle formation one frame audio frame number evidence, described acquisition module 102 then will from the recording of described terminal unit is applied This frame audio frame data acquisition is out.
Coding module 103, for encoding the audio frame number of the described audio file of described current recording evidence.
Wherein, coded system can be AMR coded system, including fixed point coded system and floating-point code mode. Described coding module 103 preferably employs AMR coded system, to the described audio file of described current recording Audio frame number is according to encoding;The most described coding module 103 often collects a frame audio frame number evidence, then use This frame audio frame number evidence is encoded by AMR coded system.
Transport module 104, is used for the audio frame number after described coding according to transmitting to server.
Described transport module 104 is by the audio frame number after described coding according to transmitting to server, then it is right to achieve Audio file carries out the process that recording limit, limit sends.The one of the transmitting procedure of described transport module 104 is feasible Embodiment be: the amount threshold of the audio frame number evidence after the described coding of every time transmission, institute can be preset Stating transport module 104 can be at least one frame audio frame number evidence after coding described in described client-cache, when slow When the data volume of the audio frame number evidence after the described coding deposited arrives predetermined number threshold value, described transport module 104 By the audio frame number after the described coding of the predetermined number threshold value of this caching according to transmission to server.Described transmission The embodiment that the another kind of the transmitting procedure of module 104 is feasible is: can preset the described volume of transmission every time The duration of the audio frame number evidence after Ma, described transport module 104 can be after coding described in described client-cache At least one frame audio frame number evidence, when caching described coding after each frame audio frame number evidence total frame length arrive During preset duration, described transport module 104 is by the audio frame number after the described coding of the preset duration of this caching According to transmission to server.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Refer to Fig. 6, for the structural representation of the another kind of client that the embodiment of the present invention provides;Calling module 101, acquisition module 102, coding module 103, transport module 104, cache module 105, detection trigger mould Block 106 and data extraction module 107.
Cache module 105, the audio frame number evidence after caching described coding.
, for detecting whether there is transmission trigger event in detection trigger module 106.
Wherein, transmission trigger event includes: the data volume of the audio frame number evidence after the described coding cached reaches To predetermined number threshold value;Or, when the frame length of the audio frame number evidence after the described coding cached reaches to preset Long.
, if for there is transmission trigger event, then after extracting the described coding cached in data extraction module 107 Audio frame number evidence, and notify described transport module will extract described coding after audio frame number according to transmission extremely Server.
Wherein, the described data extraction module 107 audio frame number evidence after extracting the described coding that cached Meanwhile, the audio frame number after the described coding being extracted from the spatial cache of described client is according to carrying out Delete.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
Below in conjunction with accompanying drawing 7-accompanying drawing 10, each module in above-mentioned client is described in detail.
Refer to Fig. 7, for the structural representation of embodiment of the coding module that the embodiment of the present invention provides;This volume Code module 103 comprises the steps that mode determines unit 1301 and coding unit 1302.
Mode determines unit 1301, for determining the coded system suitable with described terminal unit.
Wherein, coded system can be AMR coded system, including fixed point coded system and floating-point code mode. Fixed point coded system possesses that to take cpu resource few, calculates simple, the feature that fidelity is relatively low;Floating-point code Mode possesses that to take cpu resource many, calculates complexity, the feature that fidelity is higher.Described mode determines unit 1301 can determine the coded system suitable with described terminal unit according to the cpu performance of described terminal unit, Such as: if the cpu performance of described terminal unit relatively low (such as: cpu resource is less and computing capability is relatively low), Described mode determines that unit 1301 can determine that fixed point coded system is the coding staff suitable with described terminal unit Formula;For another example: if the cpu performance of described terminal unit higher (such as: resource is more and computing capability is higher), Described mode determines that unit 1301 can determine that floating-point code mode is the coding staff suitable with described terminal unit Formula.
Coding unit 1302, for according to determined by coded system, the described audio frequency to described current recording The audio frame number of file is according to encoding.
Described coding unit 1302 is according to the coded system suitable with described terminal unit, to described current record The audio frame number of the described audio file of system, according to encoding, can promote code efficiency effectively, it is ensured that coding Reliability.
Referring to Fig. 8, the mode provided for the embodiment of the present invention determines the structural representation of embodiment of unit; Which determines that unit 1301 comprises the steps that judgment sub-unit 1311 and determines subelement 1312.
Judgment sub-unit 1311, for judging that the average of the audio frame number evidence of the described audio file recorded is compiled Whether the code time is more than preset time threshold.
Applying often to record due to the recording of described terminal unit and form a frame audio frame number evidence, described client is then Gather this frame audio frame number evidence, and to this frame audio frame number according to encoding;When needing the current sound recorded Frequently, before frame data encode, described judgment sub-unit 1311 judges the sound of the described audio file recorded Frequently whether the average coding time of frame data is more than preset time threshold, and the most described judgment sub-unit 1311 judges Whether the average coding time of encoded audio frame number evidence is more than preset time threshold, this preset time threshold Can be set according to practical situation, such as: may be set to 1s, 2s etc..If it is judged that be yes, Show to encode the consuming time longer, further demonstrate that the cpu performance of described terminal unit is poor.If it is determined that Result is no, shows to encode the consuming time shorter, further demonstrates that the cpu performance of described terminal unit is higher.
Determining subelement 1312, the average of audio frame number evidence of the described audio file for ought record encodes When time is more than preset time threshold, fixed point coded system is defined as the volume suitable with described terminal unit Code mode;Or, little for the average coding time of the audio frame number evidence of the described audio file that ought have recorded In or equal to preset time threshold time, floating-point code mode is defined as the volume suitable with described terminal unit Code mode.
Refer to Fig. 9, for the structural representation of an embodiment of the detection trigger module that the embodiment of the present invention provides Figure;This detection trigger module 106 comprises the steps that data amount detection unit 1601 and first determines unit 1602.
Data amount detection unit 1601, the data of the audio frame number evidence after the described coding that detection has cached Whether amount reaches predetermined number threshold value.
Wherein, predetermined number threshold value can be set according to practical situation, such as: can set according to the network bandwidth Putting predetermined number threshold value is 2K, 3K etc..In the embodiment of the present invention, due to the recording of described terminal unit Application is often recorded and is formed a frame audio frame number evidence, and described client then gathers this frame audio frame number evidence, to this frame Audio frame number is according to encoding, and the audio frame number evidence described in caching;Described data amount detection unit 1601 is examined Whether the data volume surveying the audio frame number evidence after the described coding cached reaches predetermined number threshold value, such as: Assuming that the data volume of audio frame number evidence after a frame coding is 1K, predetermined number threshold value is 2K, then when described Client-cache two frame coding after audio frame number according to time, described data amount detection unit 1601 can detect that The data volume of the audio frame number evidence after the described coding of caching reaches predetermined number threshold value.
First determines unit 1602, for the data of the audio frame number evidence after the described described coding cached When amount reaches predetermined number threshold value, determine existence transmission trigger event, and notify that described transport module is by described Audio frame number after coding is according to transmitting to server.
Refer to Figure 10, for the structure of another embodiment of the detection trigger module that the embodiment of the present invention provides Schematic diagram;This detection trigger module 106 comprises the steps that frame length detector unit 1611 and second determines unit 1612.
Frame length detector unit 1611, the frame length of the audio frame number evidence after the described coding that detection has cached is No reach preset duration.
Wherein, preset duration can be set according to practical situation, such as: can arrange preset duration be 2s, 3s etc..In the embodiment of the present invention, apply due to the recording of described terminal unit and often record formation one frame audio frequency Frame data, described client then gathers this frame audio frame number evidence, to this frame audio frame number according to encoding, and Audio frame number evidence described in caching;After described frame length detector unit 1611 then detects the described coding cached Whether the frame length of audio frame number evidence reaches preset duration, such as: assume the audio frame number evidence after a frame coding Frame length is 1s, and predetermined number threshold value is 2s, then the audio frame number evidence after described client-cache two frame encodes Time, described frame length detector unit 1611 can detect that the frame length of the audio frame number evidence after the described coding cached Reach preset duration.
Second determines unit 1612, for the frame length of the audio frame number evidence after the described described coding cached When reaching preset duration, determine existence transmission trigger event, and notify that described transport module is by after described coding Audio frame number according to transmission to server.
In the embodiment of the present invention, client can call client place when detecting that audio transmission is asked The recording application of terminal unit carries out the recording of audio file, and the audio file gathering current recording is compiled Code transmission process, it is achieved thereby that audio file carries out the process that recording limit, limit sends, preferably reduces Audio transmission time delay, improves audio transmission efficiency effectively, meets user's reality to audio transmission time delay Demand.
The embodiment of the invention also discloses a kind of terminal unit, this terminal unit comprises client, this client The 26S Proteasome Structure and Function of end can be found in the associated description of Fig. 5-embodiment illustrated in fig. 10, is not repeated herein.Need Bright, the terminal unit of the present embodiment can apply in the method shown in Fig. 1-Fig. 4.
By the description of above-described embodiment, in the embodiment of the present invention, client can detect audio transmission During request, the recording application calling client place terminal unit carries out the recording of audio file, and collection is worked as The audio file of front recording carries out coding transmission process, sends out it is achieved thereby that audio file carries out recording limit, limit The process sent, preferably reduces audio transmission time delay, effectively improves audio transmission efficiency, meets and uses The family actual demand to audio transmission time delay.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, Can be by computer program and complete to instruct relevant hardware, described program can be stored in a calculating In machine read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method. Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, Or random store-memory body (Random Access Memory, RAM) etc. ROM).
Above disclosed be only present pre-ferred embodiments, certainly can not with this limit the present invention it Interest field, the equivalent variations therefore made according to the claims in the present invention, still belong to the scope that the present invention is contained.

Claims (15)

1. an audio frequency transmission method, it is characterised in that including:
Client detects when audio transmission is asked, and calls the recording application of described client place terminal unit Carrying out the recording operation of audio file, described recording operation includes: the recording application of described terminal unit will be used The speech data of the simulation of family input carries out analog digital conversion and sampling quantification treatment, forms at least one frame audio frame Data, described at least one frame audio frame number is according to the audio file of composition PCM format;
Described client gathers the current described audio file recorded from the recording application of described terminal unit Audio frame number evidence, particularly as follows: form a frame audio frame number evidence in the recording of described terminal unit is applied, Described client then from the recording of described terminal unit is applied by this frame audio frame data acquisition out;
The audio frame number evidence of the described audio file of described current recording is encoded, specifically by described client Including: described client uses the AMR coded system suitable with described terminal unit to described audio frame number According to encoding, described AMR coded system includes pinpointing coded system or floating-point code mode;
By the audio frame number after described coding according to transmission to server.
2. the method for claim 1, it is characterised in that described client is to described current recording After the audio frame number of described audio file is according to encoding, by the audio frame number after described coding according to transmission extremely Before server, also include:
Audio frame number evidence after coding described in described client-cache.
3. method as claimed in claim 2, it is characterised in that after coding described in described client-cache Audio frame number, according to afterwards, also includes:
Described client detects whether to there is transmission trigger event,
If there is transmission trigger event, described client extracts the audio frame number evidence after the described coding cached, And perform the audio frame number after the described coding that will extract according to transmission to the step of server.
4. method as claimed in claim 3, it is characterised in that described client detects whether to there is transmission Trigger event, including:
Whether the data volume of the audio frame number evidence after the described coding that the detection of described client has cached reaches default Amount threshold;
If the data volume of the audio frame number evidence after the described described coding cached reaches predetermined number threshold value, institute State client and determine existence transmission trigger event.
5. method as claimed in claim 3, it is characterised in that described client detects whether to there is transmission Trigger event, including:
When whether the frame length of the audio frame number evidence after the described coding that the detection of described client has cached reaches to preset Long;
If the frame length of the audio frame number evidence after the described described coding cached reaches preset duration, described client End determines existence transmission trigger event.
6. the method as described in any one of claim 1-5, it is characterised in that described client is worked as described The audio frame number evidence of the described audio file of front recording encodes, including:
Described client determines the coded system suitable with described terminal unit;
Described client according to determined by coded system, the sound to the described audio file of described current recording Frequently frame data encode.
7. method as claimed in claim 6, it is characterised in that described client determines and sets with described terminal Standby suitable coded system, including:
Whether the average coding time of the audio frame number evidence of the described audio file that the judgement of described client has been recorded More than preset time threshold;
If the average coding time of the audio frame number evidence of the described audio file recorded is more than preset time threshold, Fixed point coded system is defined as the coded system suitable with described terminal unit by described client;
If the average coding time of the audio frame number evidence of the described audio file recorded is less than or equal to when presetting Between threshold value, floating-point code mode is defined as the coded system suitable with described terminal unit by described client.
8. a client, it is characterised in that including:
Calling module, for when detecting that audio transmission is asked, calls described client place terminal unit Recording application carry out the recording operation of audio file, described recording operation includes: the record of described terminal unit The speech data of the simulation that user is inputted by sound application carries out analog digital conversion and sampling quantification treatment, is formed at least One frame audio frame number evidence, described at least one frame audio frame number is according to the audio file of composition PCM format;
Acquisition module, for gathering the current described audio frequency recorded literary composition from the recording application of described terminal unit The audio frame number evidence of part, particularly as follows: form a frame audio frame number in the recording of described terminal unit is applied According to, described client then from the recording of described terminal unit is applied by this frame audio frame data acquisition out;
Coding module, for the audio frame number of the described audio file of described current recording evidence is encoded, Specifically include: described client uses the AMR coded system suitable with described terminal unit to described audio frequency Frame data encode, and described AMR coded system includes pinpointing coded system or floating-point code mode;
Transport module, is used for the audio frame number after described coding according to transmitting to server.
9. client as claimed in claim 8, it is characterised in that also include:
Cache module, the audio frame number evidence after caching described coding.
10. client as claimed in claim 9, it is characterised in that also include:
, for detecting whether there is transmission trigger event in detection trigger module;
, if for there is transmission trigger event, then after extracting the described coding cached in data extraction module Audio frame number evidence, and notify that the audio frame number after the described coding that described transport module will extract is according to transmission extremely clothes Business device.
11. clients as claimed in claim 10, it is characterised in that described detection trigger module includes:
Data amount detection unit, the data volume of the audio frame number evidence after the described coding that detection has cached is No reach predetermined number threshold value;
First determines unit, and the data volume for the audio frame number evidence after the described described coding cached reaches During to predetermined number threshold value, determine existence transmission trigger event, and notify that described transport module is by described coding After audio frame number according to transmission to server.
12. clients as claimed in claim 10, it is characterised in that described detection trigger module includes:
Frame length detector unit, whether the frame length of the audio frame number evidence after the described coding that detection has cached reaches To preset duration;
Second determines unit, and the frame length for the audio frame number evidence after the described described coding cached reaches During preset duration, determine existence transmission trigger event, and notify that described transport module is by the sound after described coding Frequently frame data transmit to server.
13. clients as described in any one of claim 8-12, it is characterised in that described coding module bag Include:
Mode determines unit, for determining the coded system suitable with described terminal unit;
Coding unit, for according to determined by coded system, the described audio file to described current recording Audio frame number according to encoding.
14. clients as claimed in claim 13, it is characterised in that described mode determines unit, including:
Judgment sub-unit, for judging when averagely the encoding of audio frame number evidence of the described audio file recorded Between whether more than preset time threshold;
Determine subelement, be used for the average coding time of the audio frame number evidence of the described audio file that ought have recorded During more than preset time threshold, fixed point coded system is defined as the coding staff suitable with described terminal unit Formula;Or, for the average coding time of the audio frame number evidence of described audio file that ought record less than or During equal to preset time threshold, floating-point code mode is defined as the coding staff suitable with described terminal unit Formula.
15. 1 kinds of terminal units, it is characterised in that including: the visitor as described in any one of claim 8-14 Family end.
CN201310172926.4A 2013-05-10 2013-05-10 A kind of audio frequency transmission method, client and terminal unit Active CN104143333B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201310172926.4A CN104143333B (en) 2013-05-10 A kind of audio frequency transmission method, client and terminal unit
PCT/CN2013/085913 WO2014180100A1 (en) 2013-05-10 2013-10-24 Method, application, and device for audio signal transmission
US14/108,230 US9437205B2 (en) 2013-05-10 2013-12-16 Method, application, and device for audio signal transmission
ARP140101887A AR096240A1 (en) 2013-05-10 2014-05-09 METHOD, APPLICATION AND DEVICE FOR THE TRANSMISSION OF AUDIO SIGNAL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310172926.4A CN104143333B (en) 2013-05-10 A kind of audio frequency transmission method, client and terminal unit

Publications (2)

Publication Number Publication Date
CN104143333A CN104143333A (en) 2014-11-12
CN104143333B true CN104143333B (en) 2016-11-30

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411256A (en) * 2001-09-28 2003-04-16 诺基亚有限公司 Telecommunication conference arrangement
EP2043336A2 (en) * 2007-09-29 2009-04-01 Lenovo (Beijing) Limited Apparatus having mobile terminal as input/output device of computer and related system and method
CN102624874A (en) * 2012-02-21 2012-08-01 腾讯科技(深圳)有限公司 Method and system for transmitting voice messages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1411256A (en) * 2001-09-28 2003-04-16 诺基亚有限公司 Telecommunication conference arrangement
EP2043336A2 (en) * 2007-09-29 2009-04-01 Lenovo (Beijing) Limited Apparatus having mobile terminal as input/output device of computer and related system and method
CN102624874A (en) * 2012-02-21 2012-08-01 腾讯科技(深圳)有限公司 Method and system for transmitting voice messages

Similar Documents

Publication Publication Date Title
AU2016260156B2 (en) Method and device for improving audio processing performance
CN107395352B (en) Personal identification method and device based on vocal print
CN108197572B (en) Lip language identification method and mobile terminal
CN103190139B (en) For providing the system and method for conferencing information
CN107276777B (en) Audio processing method and device of conference system
CN103457910B (en) A kind of method and terminal of upper transmitting file
CN103886860B (en) Information processing method and electronic device
CN104766608A (en) Voice control method and voice control device
CN107580155B (en) Network telephone quality determination method, network telephone quality determination device, computer equipment and storage medium
CN104144108A (en) Information response method, device and system
CN104410973A (en) Recognition method and system for tape played phone fraud
CN109151148B (en) Method, device, terminal and computer-readable storage medium for recording call content
Peng et al. Security of streaming media communications with logistic map and self-adaptive detection-based steganography
CN109286554B (en) Social function unlocking method and device in social application
US9437205B2 (en) Method, application, and device for audio signal transmission
CN104143333B (en) A kind of audio frequency transmission method, client and terminal unit
CN113890822A (en) Log processing method, log processing device, storage medium and electronic device
CN102322928B (en) Electronic scale, mobile equipment, body weight measuring system and wireless transmission method
CN109150400B (en) Data transmission method, apparatus, electronic device and computer readable medium
CN105551504A (en) Method and device for triggering function application of intelligent mobile terminal based on crying sound
CN115623126A (en) Voice call method, system, device, computer equipment and storage medium
CN112767953B (en) Speech coding method, device, computer equipment and storage medium
CN103929524A (en) Method for recording information in communication process and mobile terminal with method applied
CN104143333A (en) Audio transmission method, client and terminal device
CN102970663A (en) Short message processing method and device

Legal Events

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

Effective date of registration: 20200820

Address after: 518057 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518057 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.