CN111341344B - Method and system for realizing microphone sharing - Google Patents

Method and system for realizing microphone sharing Download PDF

Info

Publication number
CN111341344B
CN111341344B CN202010117010.9A CN202010117010A CN111341344B CN 111341344 B CN111341344 B CN 111341344B CN 202010117010 A CN202010117010 A CN 202010117010A CN 111341344 B CN111341344 B CN 111341344B
Authority
CN
China
Prior art keywords
voice
pipeline
voice data
microphone
data
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
CN202010117010.9A
Other languages
Chinese (zh)
Other versions
CN111341344A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies 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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202010117010.9A priority Critical patent/CN111341344B/en
Publication of CN111341344A publication Critical patent/CN111341344A/en
Application granted granted Critical
Publication of CN111341344B publication Critical patent/CN111341344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/04Time compression or expansion
    • G10L21/043Time compression or expansion by changing speed

Abstract

The invention discloses a method and a system for realizing microphone sharing, and relates to the technical field of voice in communication technology. The method comprises the following steps: after the microphone acquires voice data through sampling, the voice data of the microphone is continuously acquired and is subjected to corresponding optimization processing, and a data block containing a fixed number of sampling points is continuously generated after the processing; after receiving a voice data acquisition request of a voice user end, creating a pipeline for storing voice data, and continuously storing the data blocks into the pipeline; simultaneously informing the address of the pipeline to a voice user end through a response message; and the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data. The invention can effectively solve the problem of microphone conflict, realize microphone sharing without damaging the performance of the microphone, not only save hardware cost, but also be compatible with various scenes, and meet the actual application demands.

Description

Method and system for realizing microphone sharing
Technical Field
The invention relates to the technical field of voice in communication technology, in particular to a method and a system for realizing microphone sharing.
Background
The voice input is used as one of input modes which can improve the user experience most in the intelligent sound box and the intelligent household appliance at present and is used by various applications in a dispute mode. However, since the application of voice recognition always occupies the microphone for responding to the voice command of the user at any time, other applications cannot acquire the voice data sampled by the microphone, so that a single-pass problem (such as a voice call, that is, the voice data of the user cannot be acquired due to the fact that the microphone cannot be used, and no voice data of the calling party is in a message sent to the called party) occurs.
At present, there are two main schemes for solving the problem of microphone collision in intelligent sound boxes and intelligent household appliances: the first scheme is that a microphone is made to create a plurality of buffer areas, and the same voice data is copied into the plurality of buffer areas so as to be used for obtaining by other applications needing to use the microphone sample data; and secondly, arranging the priority of each application needing to use the microphone sample data, enabling the application with the highest priority to occupy the microphone first, enabling the application with the highest priority to occupy the microphone after the application is used, and the like.
For one aspect, it is advantageous to have each application that needs to use a microphone acquire microphone's raw data. However, the disadvantages are also apparent, and the implementation of the scheme is complex, and the load of the microphone is greatly increased, and the voice data optimization effect brought by the corresponding acoustic algorithm is reduced. This solution requires a stronger hardware support, increasing the cost of the product, because the microphone needs to open up new buffers and reclaim the used buffers according to real-time commands, and these complicated operations introduce noise and time delays.
For the second scheme, the implementation is easy, but the defect is more obvious, the mode can lose effect when the priority is not high or low, for example, when the voice call application occupies the microphone, the voice recognition function cannot be used at the moment, for example, when the voice recognition application occupies the microphone, the voice call function is abnormal at the moment, and therefore, the scheme has the hard defect of scene compatibility.
Disclosure of Invention
The invention aims to overcome the defects of the background technology, and provides a method and a system for realizing microphone sharing, which can effectively solve the problem of microphone collision, realize microphone sharing without damaging the performance of the microphone, save hardware cost, and can be compatible with various scenes to meet the actual application requirements.
In order to achieve the above object, the present invention provides a method for implementing microphone sharing, including the following steps:
the microphone acquires voice data through sampling; continuously acquiring voice data of a microphone and performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing; after receiving a voice data acquisition request of a voice user end, creating a pipeline for storing voice data, and continuously storing the data blocks into the pipeline; simultaneously informing the address of the pipeline to a voice user end through a response message; and the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data.
On the basis of the technical scheme, the data block containing the fixed number of sampling points is continuously generated after the processing, and the method specifically comprises the following steps:
generating data blocks with fixed sizes at time intervals of every T+DeltaT after optimization processing; wherein T is a packing period, and DeltaT is time delay generated when voice data is optimally processed; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
On the basis of the technical scheme, the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data, and specifically comprises the following steps:
the voice user end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time; and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline.
On the basis of the technical scheme, the voice using end comprises a VOIP module and other applications needing to acquire microphone voice data; when the voice using end is a VOIP module, the appointed time of the active delay is 100ms; when the voice using end is other application, the appointed time of the active delay is determined according to the maximum delay time which can be tolerated by each application in the interval time period.
On the basis of the technical scheme, the method further comprises the following steps: after the voice using end no longer needs to acquire the voice data of the microphone, initiating a voice data acquisition suspension request and waiting for response; and immediately recovering and releasing the pipeline corresponding to the voice using end after receiving the voice data acquisition suspension request initiated by the voice using end, and responding to the voice using end after the recovery and release are finished.
The invention also provides a system for realizing microphone sharing, which comprises a microphone, a front-end acoustic processing module, a voice data sharing service module and a plurality of voice use ends;
the microphone is used for: obtaining voice data through sampling;
the front-end acoustic processing module is used for: continuously acquiring voice data of a microphone and performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing;
the voice data sharing service module is used for: creating a data communication connection with the front-end acoustic processing module to receive the processed data block; after receiving a voice data acquisition request of a voice using end, creating a pipeline for storing voice data, continuously storing a data block into the pipeline, and informing the address of the pipeline to the voice using end through a response message;
the voice using end is used for: when the voice data of the microphone is required to be acquired, a voice data acquisition request is initiated to a voice data sharing service module so as to acquire a corresponding pipeline address; and after knowing the pipe address, the voice data is fetched from the corresponding pipe and used.
On the basis of the technical scheme, the front-end acoustic processing module generates a data block containing a fixed number of sampling points, and specifically comprises the following operations:
the front-end acoustic processing module generates a data block with a fixed size at time intervals of every T+DeltaT; wherein T is a packing period, and DeltaT is time delay generated when voice data is optimally processed; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
On the basis of the technical scheme, the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data, and specifically comprises the following operations:
the voice using end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time; and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline.
On the basis of the technical scheme, the voice using end comprises a VOIP module and other applications needing to acquire microphone voice data; when the voice using end is a VOIP module, the appointed time of the active delay is 100ms; when the voice using end is other application, the appointed time of the active delay is determined according to the maximum delay time which can be tolerated by each application in the interval time period.
On the basis of the above technical solution, the voice user terminal is further configured to: after the voice data of the microphone is not required to be acquired, initiating a voice data acquisition suspension request to the voice data sharing service module, and waiting for response;
the voice data sharing service module is further configured to: and immediately recovering and releasing the pipeline corresponding to the voice using end after receiving the voice data acquisition suspension request initiated by the voice using end, and responding to the voice using end after the recovery and release are finished.
The invention has the beneficial effects that:
(1) Compared with the prior art, the method and the device for solving the microphone conflict by increasing the number of the microphone buffer areas have the advantages that the microphone is not affected in any extra way, hardware is not required to be modified, and therefore stronger performance requirements on hardware such as the microphone are not met, and therefore the cost of the hardware is reduced. In addition, the invention can perform corresponding optimization processing on the acquired microphone voice data, and can avoid the problem of reducing the voice data optimization effect caused by the corresponding acoustic algorithm due to the adoption of the scheme for increasing the number of the microphone buffer areas in the prior art.
Compared with the prior art, the scheme of arranging the priority and queuing in sequence to use the microphone is adopted, the technical scheme does not need priority arrangement, the operation is simpler, the situation of losing function can not occur because the priority is not divided into high and low, the compatible scenes are wider, and the failure can not occur because of certain special scenes.
(2) In the invention, when the voice data is taken out from the corresponding pipeline, the voice using end ensures that the taken out voice data is continuous through intermittent active delay, thereby effectively solving the problem of discontinuous voice data caused by that the storage speed is lower than the taking-out speed.
(3) In the invention, when the voice using end does not need to acquire the voice data of the microphone, the corresponding pipeline is immediately recovered and released, and the effective utilization rate of pipeline resources is effectively improved.
Drawings
Fig. 1 is a flowchart of a method for implementing microphone sharing in an embodiment of the present invention;
fig. 2 is a schematic illustration of resolving discontinuous speech data in a VOIP module example;
FIG. 3 is a block diagram of a system for implementing microphone sharing in an embodiment of the invention;
fig. 4 is a flow chart of a method of implementing microphone sharing in one example.
Detailed Description
Aiming at the prior art, the number of the buffer areas of the microphone is increased to solve microphone conflict, so that the load of the microphone is increased, the voice data optimization effect brought by a corresponding acoustic algorithm is reduced, a hardware support with stronger performance is needed, and the hardware cost is increased; the scheme of arranging priority levels to sequentially queue the microphones is adopted, so that the microphones can be disabled in some special scenes, the compatibility is poor, and the problems of hard defects and the like exist. The invention aims to provide a method and a system for realizing microphone sharing, which can effectively solve the problem that other applications can not acquire the voice data sampled by a microphone after the voice recognition application always occupies the microphone, realize a microphone sharing scheme without damaging the self performance of the microphone, and compared with the two prior art, the method and the system do not need stronger hardware support, save hardware cost, can be compatible with various scenes, have no hard defect and meet the actual application requirement.
The main design thought is as follows: the system can continuously acquire the voice data of the microphone and perform corresponding optimization processing, and continuously generate a data block containing a fixed number of sampling points after the processing. Once a voice data acquisition request of a voice user end is received, a pipeline for storing voice data is created, and data blocks are continuously stored in the pipeline; and simultaneously, the address of the pipeline is informed to the voice user terminal through a response message. And the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data.
Because in this scheme, a corresponding pipeline for storing voice data is created for each voice user terminal that needs to acquire and use microphone voice data. Each voice using end can acquire voice data through a corresponding pipeline, so that the problem that other applications can not acquire the voice data sampled by the microphone after the voice recognition application always occupies the microphone is solved. Compared with the scheme of solving microphone conflict by increasing the number of microphone buffer areas in the prior art, the technical scheme does not need to add the buffer areas to the microphones, but realizes the creation of a pipeline for storing voice data by using a pure software layer outside the microphones, does not have any extra influence on the microphones and does not need any modification of hardware, so that the method does not have stronger performance requirements on the hardware such as the microphones, and the cost of the hardware is reduced; in addition, the method and the device can perform corresponding optimization processing on the acquired microphone voice data, and can avoid the problem that the voice data optimization effect caused by a corresponding acoustic algorithm is reduced due to the fact that the number of the microphone buffer areas is increased in the prior art. Compared with the prior art, the scheme of arranging the priority and queuing in sequence to use the microphone is adopted, the technical scheme does not need priority arrangement, the operation is simpler, the situation of losing function can not occur because the priority is not divided into high and low, the compatible scenes are wider, and the failure can not occur because of certain special scenes.
In order to make the technical problems, technical solutions and advantages to be solved more apparent, the technical solutions of the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
However, it should be noted that: the examples to be presented below are only a few specific examples and are not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequences, etc. Those skilled in the art can, upon reading the present specification, make and use the concepts of the invention to construct further embodiments not mentioned in the specification.
Example 1
Referring to fig. 1, the present embodiment provides a method for implementing microphone sharing, which includes the following steps:
A. the microphone acquires voice data by sampling. Specifically, the microphone samples the user's voice input and places the sampled voice data in the microphone's buffer.
B. And continuously acquiring voice data of the microphone, performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing. It will be appreciated that the voice data is continuously acquired from the buffer of the microphone while the voice data is continuously acquired from the microphone. In addition, the corresponding optimization processing is mainly processing for optimizing the voice data through an algorithm, and the processing comprises noise reduction, delay removal and the like.
C. After receiving a voice data acquisition request of a voice user end, creating a pipeline for storing voice data, and continuously storing the data blocks into the pipeline; and simultaneously, the address of the pipeline is informed to the voice user terminal through a response message. It will be appreciated that the pipes created are accessed according to a first-in first-out mechanism and that the number of data blocks stored in the current pipe can be monitored in real time. In this embodiment, the voice user terminal includes a VOIP (Voice over Internet Protocol, voice over IP) module and other applications that need to acquire microphone voice data.
D. And the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data.
Further, as an optional implementation manner, in step B, the processing is performed to continuously generate a data block containing a fixed number of sampling points, which specifically includes the following operations: generating data blocks with fixed sizes at time intervals of every T+DeltaT after processing; wherein T is a packing period, which is a fixed value (different coding modes in a voice collecting chip of a microphone generally have a fixed packing period, for example, the packing period T corresponding to coding modes such as G711A/G711U/G722/G729 is 20ms, the smaller the packing period time is, the better the voice effect is, but the larger the requirement and load on hardware are, the larger the packing period time is, the worse the voice effect is, but the corresponding loose requirement and load on hardware are also, in addition, the size range of the packing period which can be set by people is generally between 20ms and 100 ms), deltaT is the time delay generated when voice data are optimally processed, and DeltaT is a variable and generally varies in the range of 0ms to 25 ms; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
Furthermore, in the practical application, in the step C, if voice data acquisition requests of a plurality of voice user terminals are received at the same time, creating a number of pipelines corresponding to the number of requests, and continuously storing the data blocks into each pipeline; and simultaneously, the address of each pipeline is informed to the corresponding voice user terminal through the response message. Thus, the method can meet the use requirement that a plurality of voice use terminals acquire voice data at the same time; but also can prevent the mutual interference between a plurality of voice using ends, thereby improving the reliability.
Example two
In practical application, because time delay is generated when the voice data is correspondingly optimized, the time interval for generating the data blocks is T+DeltaT, and therefore, the speed of storing the data blocks into the pipeline is also corresponding to T+DeltaT. However, due to the existence of Δt, when the voice user terminal takes out voice data from the corresponding pipe, the storage speed (t+Δt) is lower than the take-out speed (T), and thus the problem of discontinuous voice data in which part of the message is blank packets may occur.
In this regard, the present embodiment provides a method for implementing microphone sharing, which has the same basic steps as those of the first embodiment, and is different in that, as a preferred embodiment, in order to solve the problem of discontinuous voice data caused by that the storage speed is lower than the extraction speed, the embodiment requires that when the voice using end extracts the voice data from the corresponding pipeline, the extracted voice data is ensured to be continuous through intermittent active delay, and the delay time varies according to different voice using ends. Specifically, step D of the method comprises the following operations:
the voice user end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time (during the delay, a certain number of data blocks are stored in the pipeline); and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline. The specific time of the delay is different from one voice user to another, and specifically, is determined according to the maximum delay time that each voice user can tolerate in the interval time.
In this embodiment, when the voice user terminal is a VOIP module, the specified active delay time is 100ms, and the maximum voice delay that cannot be perceived by the human ear is 100ms, so that the voice call quality is not affected, the extracted voice data is continuous, and the problem of discontinuous voice data in which part of the messages are empty packets is avoided; when the voice user end is used for other applications, since the sensitivity of the continuity of the voice data is not as high as that of the VOIP module, the appointed time of the active delay can still be determined by the maximum delay time which can be tolerated in the interval time period.
In order to more clearly understand how the present embodiment solves the problem of discontinuous voice data, a VOIP module is taken as an example, and the principle of solving discontinuous voice data will be described in detail with reference to the accompanying drawings.
Referring to fig. 2, when the VOIP module starts to fetch a block, since the VOIP module fetches one block at the speed of each packing period T and the block is stored in one block at the speed of t+Δt, the speed of storing the block is lower than the speed of fetching the block. If no other operations are performed, when the number of the data blocks in the pipeline is 0, the VOIP module takes out null data, packages the null data into messages and sends out the messages, so that a large number of null voice data messages exist in the messages sent out by the VOIP module, and the messages are discontinuous sounds after being restored into sounds, thereby seriously affecting the call quality.
In view of the above problems, referring to fig. 2, in this embodiment, when the number of data blocks in the current pipeline is 0, the VOIP module immediately actively delays 100ms, and the 100ms is the maximum speech delay that cannot be perceived by human ears, becauseThe delayed 100ms will not affect the call quality, and during the delay period, a certain number of data blocks will be stored into the pipeline; when the number of the data blocks read in the current buffer area by the VOIP module is not 0, the VOIP module immediately starts to recover the data blocks taken out of the pipeline, thereby ensuring that the data blocks are taken out of the pipelineThe data blocks can be continuously fetched in time, and null data can not be fetched, so that the normal voice call quality is ensured. Wherein (1)>
In addition, it will be appreciated that the above description of the principles is given by taking a VOIP module as an example, because the VOIP module is much more sensitive to the continuity of voice data than other applications, and the quality of voice call is seriously affected by the discontinuity of voice data. For other applications, the specified time of the active delay may still be determined by the maximum delay time that can be tolerated in the interval period, since the voice data continuity is less sensitive than the VOIP module. And if the longer the maximum delay time which can be tolerated in the interval time period is, the longer the time for continuously taking the data block is, and the fewer the number of times of active delay is needed.
Example III
The basic steps of the method for implementing microphone sharing provided in this embodiment are the same as those of the first embodiment, except that, as an optional implementation manner, the method further includes the following steps:
after the voice using end no longer needs to acquire the voice data of the microphone, initiating a voice data acquisition suspension request and waiting for response; and after receiving a voice data acquisition suspension request initiated by the voice using end, the system immediately recovers and releases the pipeline corresponding to the voice using end, and responds to the voice using end after the recovery and release are finished.
Further, in practical application, if the voice user end does not receive the response within the designated time, the voice data acquisition and suspension request is retransmitted, so that the system can receive the request message and recover and release the pipeline resources. In addition, the priority of the voice data acquisition request is far higher than that of the voice data acquisition suspension request, and when the system receives the two requests simultaneously, the voice data acquisition request is preferentially processed to create a corresponding pipeline.
Example IV
Referring to fig. 3, based on the same inventive concept, the embodiment of the invention further provides a system for realizing microphone sharing, which includes a microphone, a front-end acoustic processing module, a voice data sharing service module and a plurality of voice user terminals.
Wherein, the microphone is used for: voice data is acquired by sampling. Specifically, the microphone samples the user's voice input and places the sampled voice data in the microphone's buffer.
Front-end acoustic processing module for: and continuously acquiring voice data of the microphone, performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing. It will be appreciated that the front-end acoustic processing module continues to acquire voice data from the microphone in the buffer. In addition, the corresponding optimization processing performed by the front-end acoustic processing module is mainly processing for optimizing the voice data through an algorithm, and the optimization processing comprises noise reduction, delay removal and the like.
A voice data sharing service module for: creating a data communication connection with the front-end acoustic processing module for receiving the data block processed by the front-end acoustic processing module; after receiving a voice data acquisition request of a voice user end, creating a pipeline for storing voice data, and continuously storing the data blocks into the pipeline; and simultaneously, the address of the pipeline is informed to the voice user terminal through a response message. It can be understood that the pipes created by the voice data sharing service module are accessed according to a first-in first-out mechanism, and the number of the stored data blocks in the current pipe can be monitored in real time.
The voice using end is used for: when the voice data of the microphone is required to be acquired, a voice data acquisition request is initiated to a voice data sharing service module so as to acquire a corresponding pipeline address; and after knowing the pipe address, the voice data is fetched from the corresponding pipe and used. In this embodiment, the voice user terminal includes a VOIP module and other applications that need to acquire microphone voice data.
Further, as an optional implementation manner, the front-end acoustic processing module generates a data block containing a fixed number of sampling points, and specifically includes the following operations: the front-end acoustic processing module generates a data block with a fixed size at time intervals of every T+DeltaT; wherein T is a packing period and is a fixed value, deltaT is time delay generated when voice data is optimally processed, and the time delay DeltaT generally changes in a fluctuation range of 0ms-25 ms; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
Furthermore, in practical application, if the voice data sharing service module receives voice data acquisition requests of a plurality of voice user terminals at the same time, then creating a number of pipelines corresponding to the number of requests, and continuously storing the data blocks into each pipeline; and simultaneously, the address of each pipeline is informed to the corresponding voice user terminal through the response message. Thus, the method can meet the use requirement that a plurality of voice use terminals acquire voice data at the same time; but also can prevent the mutual interference between a plurality of voice using ends, thereby improving the reliability.
Example five
The basic structure of the system for realizing microphone sharing provided in this embodiment is the same as that of the fourth embodiment, and is different in that, as a preferred implementation manner, in order to solve the problem of discontinuous voice data caused by that the storage speed is lower than the extraction speed, in this embodiment, when the voice using end extracts voice data from a corresponding pipeline, the extracted voice data is ensured to be continuous through intermittent active delay, and the delay time is different for different voice using ends. Specifically, the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data, and the voice using end comprises the following operations:
the voice user end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time (during the delay, a certain number of data blocks are stored in the pipeline); and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline. The specific time of the delay is different from one voice user to another, and specifically, is determined according to the maximum delay time that each voice user can tolerate in the interval time.
In this embodiment, when the voice user terminal is a VOIP module, the specified active delay time is 100ms, and the maximum voice delay that cannot be perceived by the human ear is 100ms, so that the voice call quality is not affected, the extracted voice data is continuous, and the problem of discontinuous voice data in which part of the messages are empty packets is avoided; when the voice user end is used for other applications, since the sensitivity of the continuity of the voice data is not as high as that of the VOIP module, the appointed time of the active delay can still be determined by the maximum delay time which can be tolerated in the interval time period.
Example six
The basic structure of the system for realizing microphone sharing provided in this embodiment is the same as that of the fourth embodiment, and the difference is that, as an optional implementation manner, the voice using end is further configured to: after the voice data of the microphone is not required to be acquired, a voice data acquisition suspension request is initiated to the voice data sharing service module, and the response is waited for. On the basis, the voice data sharing service module is further used for: and immediately recovering and releasing the pipeline corresponding to the voice using end after receiving the voice data acquisition suspension request initiated by the voice using end, and responding to the voice using end after the recovery and release are finished.
Further, in practical application, if the voice user end does not receive the response within the designated time, the voice data acquisition suspension request is retransmitted, so that the voice data sharing service module can receive the request message and recover and release the pipeline resources. In addition, the priority of the voice data acquisition request is far higher than that of the voice data acquisition suspension request, and when the voice data sharing service module receives the two requests simultaneously, the voice data acquisition request is processed preferentially to create a corresponding pipeline.
For a clearer understanding of the present invention, the implementation method of the present invention is exemplified below in conjunction with a system for implementing microphone sharing. Referring to fig. 4, a method for implementing microphone sharing includes the following steps:
s1, the microphone samples voice input of a user, and the sampled voice data are placed in a buffer area of the microphone.
S2, the front-end acoustic processing module continuously acquires voice data from a buffer area of the microphone, performs optimization processing such as noise reduction and delay removal on the acquired voice data through an algorithm of the front-end acoustic processing module, and generates data blocks with fixed sizes at time intervals of every T+DeltaT.
And S3, the voice data sharing service module and the front-end acoustic processing module are connected in a data communication mode, namely the voice data sharing service module can acquire the generated voice data block from the front-end acoustic processing module.
S4, when the voice user terminal wants to acquire the voice data of the microphone, sending a voice data acquisition request to the voice data sharing service module and waiting for response; after receiving the voice data obtaining request, the voice data sharing service module immediately establishes a corresponding request number of pipes (buffer area in first-out mode) for storing voice data, continuously stores the data blocks into the pipes (if M pipes are established, copies the data blocks into M pipes, and places the data blocks into the M pipes respectively), and informs the corresponding voice user end of the addresses of the pipes through response messages.
S5, each voice user terminal searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time; and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline.
When the voice using end is a VOIP module, the appointed time of the active delay is 100ms; when the voice using end is used for other applications, the appointed time of the active delay is determined by the maximum delay time which can be tolerated in the interval time period.
S6, after the voice using end no longer needs to acquire the voice data of the microphone, initiating a voice data acquisition suspension request to the voice data sharing service module, and waiting for response; and after receiving a voice data acquisition suspension request initiated by the voice using end, the voice data sharing service module immediately recovers and releases the pipeline corresponding to the voice using end, and responds to the voice using end after the recovery and release are finished.
Note that: the particular embodiments described above are illustrative only and not restrictive, and those skilled in the art may combine and combine steps and means from the various embodiments described above separately to achieve the benefits of the present invention in accordance with the concepts of the present invention, such combined and combined embodiments also being encompassed by the present invention, such combination and combination not being described in detail herein.
The advantages, effects, etc. mentioned in the embodiments of the present invention are merely examples, and are not to be construed as necessarily limiting the various embodiments of the present invention. In addition, the foregoing specific details of the embodiments of the invention have been disclosed for purposes of illustration and understanding only, and are not intended to be limiting, since the embodiments of the invention must not be practiced with the specific details.
The block diagrams of the devices, apparatuses, devices, systems according to the embodiments of the present invention are merely illustrative examples, and are not intended to require or imply that connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used in embodiments of the present invention refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used in embodiments of the present invention refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The step flow diagrams in the embodiments of the invention and the method descriptions above are merely illustrative examples and are not intended to require or imply that the steps of the various embodiments must be performed in the order presented. The order of steps in the above embodiments may be performed in any order, as will be appreciated by those skilled in the art. Words such as "thereafter," "then," "next," and the like are not intended to limit the order of the steps; these words are simply used to guide the reader through the description of these methods. Furthermore, any reference to an element in the singular, for example, using the articles "a," "an," or "the," is not to be construed as limiting the element to the singular.
In addition, the steps and means in the various embodiments of the present invention are not limited to practice in a certain embodiment, and indeed, the relevant partial steps and partial means in the various embodiments herein may be combined according to the concept of the present invention to contemplate new embodiments, which are also included in the scope of the present invention.
The operations of embodiments of the present invention may be performed by any suitable means capable of performing the corresponding functions. The means may include various hardware and/or software components and/or modules including, but not limited to, circuitry or a processor of the hardware.
The method of an embodiment of the invention includes one or more acts for implementing the method described above. The methods and/or acts may be interchanged with one another without departing from the scope of the claims. In other words, unless a specific order of acts is specified, the order and/or use of specific acts may be modified without departing from the scope of the claims.
The functions of the embodiments of the present invention may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions on a tangible computer-readable medium. A storage media may be any available tangible media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. As used herein, discs (disks) and disks include Compact Disks (CDs), laser disks, optical disks, DVDs (Digital Versatile Disc, digital versatile disks), floppy disks, and blu-ray disks where disks reproduce data magnetically, while disks reproduce data optically with lasers.
Thus, the computer program product may perform the operations presented herein. For example, such a computer program product may be a computer-readable tangible medium having instructions tangibly stored (and/or encoded) thereon, the instructions being executable by one or more processors to perform the operations described herein. The computer program product may comprise packaged material.
Other examples and implementations are within the scope and spirit of embodiments of the invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwired or any combination of these. Features that implement the functions may also be physically located at various locations including being distributed such that portions of the functions are implemented at different physical locations.
Various changes, substitutions, and alterations to the techniques described herein may be made by those skilled in the art without departing from the teachings as defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. The processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the invention to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof. And what is not described in detail in this specification is prior art known to those skilled in the art.

Claims (8)

1. A method for implementing microphone sharing, the method comprising the steps of:
the microphone acquires voice data through sampling;
continuously acquiring voice data of a microphone and performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing;
after receiving a voice data acquisition request of a voice user end, creating a pipeline for storing voice data, and continuously storing the data blocks into the pipeline; simultaneously informing the address of the pipeline to a voice user end through a response message;
the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data; the method specifically comprises the following steps: the voice user end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time;
when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time; and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline.
2. The method for implementing microphone sharing according to claim 1, wherein the processing is followed by generating a data block containing a fixed number of sampling points, and specifically comprising the steps of:
generating data blocks with fixed sizes at time intervals of every T+DeltaT after optimization processing; wherein T is a packing period, and DeltaT is time delay generated when voice data is optimally processed; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
3. The method for implementing microphone sharing according to claim 1, wherein: the voice using end comprises a VOIP module and other applications needing to acquire microphone voice data;
when the voice using end is a VOIP module, the appointed time of the active delay is 100ms;
when the voice using end is other application, the appointed time of the active delay is determined according to the maximum delay time which can be tolerated by each application in the interval time period.
4. A method of achieving microphone sharing according to any of claims 1 to 3, characterized in that the method further comprises the steps of:
after the voice using end no longer needs to acquire the voice data of the microphone, initiating a voice data acquisition suspension request and waiting for response;
and immediately recovering and releasing the pipeline corresponding to the voice using end after receiving the voice data acquisition suspension request initiated by the voice using end, and responding to the voice using end after the recovery and release are finished.
5. A system for implementing microphone sharing, characterized by: the system comprises a microphone, a front-end acoustic processing module, a voice data sharing service module and a plurality of voice use ends;
the microphone is used for: obtaining voice data through sampling;
the front-end acoustic processing module is used for: continuously acquiring voice data of a microphone and performing corresponding optimization processing, and continuously generating a data block containing a fixed number of sampling points after the processing;
the voice data sharing service module is used for: creating a data communication connection with the front-end acoustic processing module to receive the processed data block; after receiving a voice data acquisition request of a voice using end, creating a pipeline for storing voice data, continuously storing a data block into the pipeline, and informing the address of the pipeline to the voice using end through a response message;
the voice using end is used for: when the voice data of the microphone is required to be acquired, a voice data acquisition request is initiated to a voice data sharing service module so as to acquire a corresponding pipeline address; after knowing the pipeline address, voice data is taken out from the corresponding pipeline and used;
the voice using end takes out voice data from the corresponding pipeline according to the acquired pipeline address and uses the voice data, and the voice using end specifically comprises the following operations:
the voice using end searches a corresponding pipeline according to the acquired pipeline address, and acquires the number of stored data blocks in the current pipeline in real time; when the number of the data blocks in the current pipeline is read to be 0, actively delaying for a specified time; and when the number of the data blocks in the current pipeline is read to be not 0, continuously taking out the data blocks from the pipeline.
6. The system for implementing microphone sharing of claim 5, wherein the front-end acoustic processing module generates a data block containing a fixed number of sampling points, specifically comprising:
the front-end acoustic processing module generates a data block with a fixed size at time intervals of every T+DeltaT; wherein T is a packing period, and DeltaT is time delay generated when voice data is optimally processed; the data block size is the number of sampling points available through the current sampling frequency in one packing period.
7. The system for implementing microphone sharing of claim 5, wherein: the voice using end comprises a VOIP module and other applications needing to acquire microphone voice data;
when the voice using end is a VOIP module, the appointed time of the active delay is 100ms;
when the voice using end is other application, the appointed time of the active delay is determined according to the maximum delay time which can be tolerated by each application in the interval time period.
8. The system for implementing microphone sharing according to any one of claims 5 to 7,
the voice using end is further configured to: after the voice data of the microphone is not required to be acquired, initiating a voice data acquisition suspension request to the voice data sharing service module, and waiting for response;
the voice data sharing service module is further configured to: and immediately recovering and releasing the pipeline corresponding to the voice using end after receiving the voice data acquisition suspension request initiated by the voice using end, and responding to the voice using end after the recovery and release are finished.
CN202010117010.9A 2020-02-25 2020-02-25 Method and system for realizing microphone sharing Active CN111341344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010117010.9A CN111341344B (en) 2020-02-25 2020-02-25 Method and system for realizing microphone sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117010.9A CN111341344B (en) 2020-02-25 2020-02-25 Method and system for realizing microphone sharing

Publications (2)

Publication Number Publication Date
CN111341344A CN111341344A (en) 2020-06-26
CN111341344B true CN111341344B (en) 2024-02-13

Family

ID=71187890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117010.9A Active CN111341344B (en) 2020-02-25 2020-02-25 Method and system for realizing microphone sharing

Country Status (1)

Country Link
CN (1) CN111341344B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1199872A2 (en) * 2000-10-17 2002-04-24 Hewlett-Packard Company, A Delaware Corporation Establishing network communication between parties in telephone contact
CN107005554A (en) * 2015-03-04 2017-08-01 华为技术有限公司 Speech business sharing method, equipment and system
CN107957908A (en) * 2017-11-20 2018-04-24 深圳创维数字技术有限公司 A kind of microphone sharing method, device, computer equipment and storage medium
WO2020013666A1 (en) * 2018-07-13 2020-01-16 삼성전자 주식회사 Method for user voice input processing and electronic device supporting same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102351366B1 (en) * 2015-01-26 2022-01-14 삼성전자주식회사 Method and apparatus for voice recognitiionand electronic device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1199872A2 (en) * 2000-10-17 2002-04-24 Hewlett-Packard Company, A Delaware Corporation Establishing network communication between parties in telephone contact
CN107005554A (en) * 2015-03-04 2017-08-01 华为技术有限公司 Speech business sharing method, equipment and system
CN107957908A (en) * 2017-11-20 2018-04-24 深圳创维数字技术有限公司 A kind of microphone sharing method, device, computer equipment and storage medium
WO2020013666A1 (en) * 2018-07-13 2020-01-16 삼성전자 주식회사 Method for user voice input processing and electronic device supporting same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
W.J.古拉尔斯基等.IP电话原理技术应用.人民邮电出版社,2005,第176-177页. *

Also Published As

Publication number Publication date
CN111341344A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
US10013995B1 (en) Combined reference signal for acoustic echo cancellation
US20170318161A1 (en) Echo cancellation data synchronization control method, terminal, and storage medium
JP4403429B2 (en) Signal processing apparatus, signal processing method, and program
CN109285554B (en) Echo cancellation method, server, terminal and system
US9997167B2 (en) Jitter buffer control, audio decoder, method and computer program
US20130304243A1 (en) Method for synchronizing disparate content files
EP1404076A2 (en) External jitter buffer in a packet voice system
WO2009039783A1 (en) A processing method and device for network time delay character
US10546581B1 (en) Synchronization of inbound and outbound audio in a heterogeneous echo cancellation system
JP2019204074A (en) Speech dialogue method, apparatus and system
CN101266554A (en) Embedded terminal multimedia application processing method and embedded terminal
CN108076239B (en) Method for improving IP telephone echo
CN111341344B (en) Method and system for realizing microphone sharing
JP6038635B2 (en) Signal processing apparatus and signal processing method
WO2017000772A1 (en) Front-end audio processing system
CN111540365B (en) Voice signal determination method, device, server and storage medium
JP5970125B2 (en) Control device, control method and program
JP2007202157A (en) Sampling rate conversion
JPWO2006013660A1 (en) Playback signal processing device
CN104780258A (en) Noise removing method based on acceleration sensor, host processor and dispatching terminal
CN114760283A (en) Playing parameter configuration method and device
CN114242067A (en) Speech recognition method, apparatus, device and storage medium
US9137051B2 (en) Method and apparatus for reducing rendering latency for audio streaming applications using internet protocol communications networks
TWI761018B (en) Voice capturing method and voice capturing system
US10796709B1 (en) Acoustic echo cancellation bypass

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