Summary of the invention
A kind of method that the present invention proposes bluetooth transmitted in both directions voice data, the data of difference transmission that can be fairly simple
Or the data received.
The technical scheme of the present invention is realized as follows:
A kind of method of bluetooth transmitted in both directions voice data, specifically includes the following steps:
(1) transmitting terminal bluetooth equipment acquires voice signal, and the voice signal is carried out A/D conversion, by analog voice signal
Be converted to audio digital signals;
(2) address code of receiving end bluetooth equipment is located to the front end of audio digital signals, by the address of transmitting terminal bluetooth equipment
Code is located at the end of audio digital signals;
(3) transmitting terminal bluetooth equipment is sent with the voice signal postponed;
(4) receiving end bluetooth equipment receives and screens voice signal.
Preferably, in step (3), transmitting terminal bluetooth equipment will send data buffer zone progress with the voice signal postponed
After buffering, issue with the voice signal postponed.
Preferably, in step (4), receiving end bluetooth equipment carries out the voice signal received in reception data buffer
After buffering, whether the address code for parsing the front end of voice signal is identical as the address code of this equipment, if so, voice signal is turned
It changes analog signal into and plays.
Preferably, further comprising the steps of:
(5) receiving end bluetooth equipment extracts the address code of voice signal end, and the voice that the address code of extraction is located at return is believed
Number front end.
Preferably, step (1) and (2) specifically include the following contents:
(1) transmitting terminal bluetooth equipment acquires multiple groups voice signal, and carries out A/D conversion to all voice signals, will simulate language
Sound signal is converted to audio digital signals, and multiple groups voice signal corresponds to multiple receiving end bluetooth equipments;
(2) address code of corresponding receiving end bluetooth equipment is located to the front end of each group of audio digital signals, by transmitting terminal indigo plant
The address code of tooth equipment is located at the end of audio digital signals.
Preferably, step (1), (2) and (3) specifically includes the following contents:
(1) transmitting terminal bluetooth equipment acquires multiple groups voice signal, and carries out A/D conversion to all voice signals, will simulate language
Sound signal is converted to audio digital signals, and multiple groups voice signal corresponds to the same receiving end bluetooth equipment;
(2) timestamp of each group of voice signal of the address code of corresponding receiving end bluetooth equipment and acquisition is located at each group
The address code of transmitting terminal bluetooth equipment is located at the end of audio digital signals by the front end of audio digital signals;
(3) transmitting terminal bluetooth equipment is using timestamp as the priority level for judging that each group of voice signal is sent, according to priority
It Fa Song not be with the voice signal postponed.
Preferably, further comprising the steps of before step (3):
Transmitting terminal bluetooth equipment by the address code of the address code of receiving end bluetooth equipment and transmitting terminal bluetooth equipment transmit to
Receiving end bluetooth equipment, the receiving end bluetooth equipment is by the ground of the address code of transmitting terminal bluetooth equipment and receiving end bluetooth equipment
Location code packing hollow-square should be to transmitting terminal bluetooth equipment.
Preferably, further comprising the steps of before step (2):
The address code of transmitting terminal bluetooth equipment acquisition receiving end bluetooth equipment.
The beneficial effects of the present invention are: the data of difference transmission that can be fairly simple or the data of receiving.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, specifically including following step the invention proposes a kind of method of bluetooth transmitted in both directions voice data
It is rapid:
(1) transmitting terminal bluetooth equipment acquires voice signal, and the voice signal is carried out A/D conversion, by analog voice signal
Be converted to audio digital signals;
(2) address code of receiving end bluetooth equipment is located to the front end of audio digital signals, by the address of transmitting terminal bluetooth equipment
Code is located at the end of audio digital signals;
(3) transmitting terminal bluetooth equipment is sent with the voice signal postponed;
(4) receiving end bluetooth equipment receives and screens voice signal.
Preferably, in step (3), transmitting terminal bluetooth equipment will send data buffer zone progress with the voice signal postponed
After buffering, issue with the voice signal postponed.
Preferably, in step (4), receiving end bluetooth equipment carries out the voice signal received in reception data buffer
After buffering, whether the address code for parsing the front end of voice signal is identical as the address code of this equipment, if so, voice signal is turned
It changes analog signal into and plays.
Preferably, further comprising the steps of:
(5) receiving end bluetooth equipment extracts the address code of voice signal end, and the voice that the address code of extraction is located at return is believed
Number front end.
Preferably, step (1) and (2) specifically include the following contents:
(1) transmitting terminal bluetooth equipment acquires multiple groups voice signal, and carries out A/D conversion to all voice signals, will simulate language
Sound signal is converted to audio digital signals, and multiple groups voice signal corresponds to multiple receiving end bluetooth equipments;
(2) address code of corresponding receiving end bluetooth equipment is located to the front end of each group of audio digital signals, by transmitting terminal indigo plant
The address code of tooth equipment is located at the end of audio digital signals.
Preferably, step (1), (2) and (3) specifically includes the following contents:
(1) transmitting terminal bluetooth equipment acquires multiple groups voice signal, and carries out A/D conversion to all voice signals, will simulate language
Sound signal is converted to audio digital signals, and multiple groups voice signal corresponds to the same receiving end bluetooth equipment;
(2) timestamp of each group of voice signal of the address code of corresponding receiving end bluetooth equipment and acquisition is located at each group
The address code of transmitting terminal bluetooth equipment is located at the end of audio digital signals by the front end of audio digital signals;
(3) transmitting terminal bluetooth equipment is using timestamp as the priority level for judging that each group of voice signal is sent, according to priority
It Fa Song not be with the voice signal postponed.
Preferably, further comprising the steps of before step (3):
Transmitting terminal bluetooth equipment by the address code of the address code of receiving end bluetooth equipment and transmitting terminal bluetooth equipment transmit to
Receiving end bluetooth equipment, the receiving end bluetooth equipment is by the ground of the address code of transmitting terminal bluetooth equipment and receiving end bluetooth equipment
Location code packing hollow-square should be to transmitting terminal bluetooth equipment.
Preferably, further comprising the steps of before step (2):
The address code of transmitting terminal bluetooth equipment acquisition receiving end bluetooth equipment.
In other embodiments, transmitting terminal bluetooth equipment judges whether to need data subpackage after step (1), if so,
It carries out in next step;Audio digital signals are divided into several VoPs, set gradually reception in the starting point of VoP
Hold address code, packet number code and the timestamp of bluetooth equipment;In the end of VoP, transmitting terminal bluetooth equipment is set
Address code;In step (3), Bluetooth transmission link is established, is successively sent according to packet number code or timestamp with the voice postponed
Data packet.Corresponding to this, receiving end bluetooth equipment receiving end bluetooth equipment receives VoP;Each group of VoP
It is made of the first address code information, timestamp, voice data and the second address code information;The is extracted from the front end of VoP
One-address code information is compared with the address code of this equipment, is judged whether unanimously, if so, entering in next step, otherwise abandoning should
VoP;Include from voice data front end extraction time stamp, using timestamp as handle priority level judgment criteria,
From the end of VoP extract the second address code information, according to the second address code information to the VoP received into
Row grouping;The VoP after grouping is recombinated according to timestamp, VoP is converted into analog voice signal,
Play the analog voice signal.VoP can be by the first address code information, timestamp, voice data, background noise data
It is constituted with the second address code information.For the setting of the first address code information, timestamp, background noise data and the second address code information
Fixed byte number after receiving end bluetooth equipment receives VoP, may be selected to abandon background noise data, also using back
Scape noise data optimizes processing to voice data.
The coding method of VoP the following steps are included:
Original audio is obtained, the non-speech data in original audio is rejected, obtains speech segments and background sound data, it is right respectively
Speech segments and background sound data are quantified, encoded and are transmitted;
Speech segments to input and background sound data carry out characteristic parameter extraction, the characteristic parameter of extraction include line spectrum pair,
Pitch period and gain mean value carry out parameter transformation to above-mentioned parameter, change into required format when parameter quantization;
Various speech parameters are quantified and encoded, according to the first address code information, timestamp, voice data, background noise
The format of data and the second address code information generates VoP.
The data of the data for distinguishing transmission or receiving that the present invention can be fairly simple, bluetooth equipment are also sent out with the forms of broadcasting
Data packet is sent, matches and interrupts to prevent bluetooth equipment, lead to data transmission fails, gives the experience of user poor problem.
Above-mentioned technical proposal discloses improvement of the invention, the technology contents not being disclosed in detail, can be by art technology
Personnel are achieved by the prior art.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.