Summary of the invention
One of them object of the present invention is above-mentioned defect in order to improve prior art and provides a kind of method utilizing wireless communication module to carry out remote speech broadcasting.
The method utilizing wireless communication module to carry out remote speech broadcasting provided by the invention, comprising: steps A: wireless communication module and remote equipment are set up to converse and be connected; Step B: described wireless communication module receives word content to be played by serial ports, and convert described word content to be played to voice flow; Step C: described wireless communication module converts described voice flow to speech data signal, and copy described speech data signal to transmitter buffer space; Step D: described wireless communication module starts voice wake events, and utilize described call connection that the speech data signal in described transmitter buffer space is sent to described remote equipment.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described wireless communication module is pre-defined a transmitter buffer space, described transmitter buffer space is used for storing described speech data signal specially, and it is to there being a fixing memory address.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, the size in described transmitter buffer space is 320 bytes.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described communication module also definition simultaneously has a pointer, the memory address of speech data signal described in described pointed.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, also comprise: step e: judge that whether in addition current speech data signal needs are sent out, if had, repeated execution of steps C and step D, until all speech data signals are all sent to described remote equipment.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described wireless communication module produces the first interrupt event when reading the centre position in described transmitter buffer space, and the second interrupt event can be produced when reading the interruption position in described transmitter buffer space, wherein, described step e performs between described first interrupt event and described second break period.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described speech data signal is pulse code modulation data signal.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, also comprise: step F: described remote equipment receives described speech data signal, and remotely play and described speech data signal word content accordingly.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described steps A comprises: described wireless communication module is after the start that powers on, dial long-range number by ATD order, and the remote equipment corresponding with described long-range number is set up to converse and is connected.
Carry out in a kind of preferred embodiment of the method for remote speech broadcasting at the wireless communication module that utilizes provided by the invention, described wireless communication module receives word content to be played by serial ports and comprises: after described wireless communication module and described remote equipment establish a communications link, by AT order, described word content to be played is issued the serial ports of described wireless communication module, wherein, the AT order sent to the serial ports of described wireless communication module is: AT+GTTS=1, " word content to be played ".
Compared to prior art, remote speech broadcasting method provided by the invention utilizes wireless communication module convert word content to be played to voice flow and convert speech data signal to further, and to be connected with the call of setting up between remote equipment by described wireless communication module described speech data signal is sent to described remote equipment, thus realize remotely carrying out speech play, thus make remote monitoring personnel can obtain failure detection result in real time by voice mode, the phonetic function of spread radio communication module effectively, it is made to meet real life or the broadcasting of the remote speech in producing demand.
Embodiment
Be clearly and completely described to the technical scheme in the embodiment of the present invention below, obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
The method utilizing wireless communication module to carry out remote speech broadcasting provided by the invention mainly plays two technology basis in the voice call of wireless communication module and TTS realizes one section of statement to play to long-range listening to.Refer to Fig. 1, it is the schematic flow sheet of a kind of embodiment of the method utilizing wireless communication module to carry out remote speech broadcasting provided by the invention.Described method can comprise the following steps:
Step S1, wireless communication module and remote equipment are set up to converse and are connected;
Particularly, described wireless communication module, after the start that powers on, can dial long-range number by ATD order, and the remote equipment corresponding with described long-range number is set up to converse and connected.Described remote equipment is the equipment be about to for listening to speech play content.
Step S2, described wireless communication module receives word content to be played by serial ports;
After described wireless communication module and described remote equipment establish a communications link, word content to be played can be issued the serial ports of described wireless communication module by local device by AT order, described wireless communication module can receive described word content to be played by serial ports.In a particular embodiment, it is AT+GTTS=1 that the AT order to serial ports transmission can be specially, " word content to be played ".
Step S3, converts described word content to be played to voice flow;
After receiving described word content to be played, described wireless communication module can utilize the TTS sound bank of its inside to convert the word content that described band is play to natural-sounding stream, thus realizes the real-time conversion from word to voice.
Step S4, converts described voice flow to speech data signal;
Described voice flow is simulating signal, therefore, described voice flow can be converted to voice digital signal, such as PCM (Pulse Code Modulation, pulse code modulation (PCM)) data-signal further by analog to digital (A/D) conversion by described wireless communication module.
Step S5, copies described speech data signal to transmitter buffer space;
Specifically, described wireless communication module can pre-define a transmitter buffer space, and described transmitter buffer space is used for storing described speech data signal specially, and it is to there being a fixing memory address.In the present embodiment, the size in described transmitter buffer space can be the two-dimensional array of 320 bytes.In addition, described communication module also defines simultaneously has a pointer, the memory address of speech data signal described in described pointed.
Described wireless communication module is after converting described voice flow to speech data signal, can in units of the size in described transmitter buffer space, copy described speech data signal to described transmitter buffer space, namely copy the speech data of 320 bytes to described transmitter buffer space at every turn.
Step S6, starts voice wake events and the speech data signal in described transmitter buffer space is sent to remote equipment.
After copying described speech data signal to described transmitter buffer space, described wireless communication module can start a voice wake events, marks currently can carry out data transmission; Further, the speech data signal of described transmitter buffer interior volume can read out by described wireless communication module further, and utilizes the call of setting up between its with described remote equipment to be connected, and described speech data signal is sent to described remote equipment.
Step S7, judge that whether in addition current speech data signal needs to be sent out, if had, repeated execution of steps S4 ~ step S6, until all speech data signals are all sent to described remote equipment;
In a particular embodiment, described wireless communication module can produce an interrupt event when reading the centre position in described transmitter buffer space, and another interrupt event can be produced when reading the interruption position in described transmitter buffer space, between above-mentioned two interrupt events, described wireless communication module can judge that whether in addition current speech data signal needs to be sent out, if had, then described wireless communication module can repeated execution of steps S4 ~ step S6, repeatedly copy described speech data content and start voice wake events and carry out data transmission, until all speech data signals are all sent to described remote equipment.
Step S8, described remote equipment remotely receives described speech data signal by described call connection, and is described word content to be played by described speech data content recovery, and by playing word content described in uppick.
Compared to prior art, remote speech broadcasting method provided by the invention utilizes wireless communication module convert word content to be played to voice flow and convert speech data signal to further, and to be connected with the call of setting up between remote equipment by described wireless communication module described speech data signal is sent to described remote equipment, thus realize remotely carrying out speech play, thus make remote monitoring personnel can obtain failure detection result in real time by voice mode, the phonetic function of spread radio communication module effectively, it is made to meet real life or the broadcasting of the remote speech in producing demand.
The foregoing is only embodiments of the invention; not thereby the scope of the claims of the present invention is limited; every utilize description of the present invention to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical field, be all in like manner included within scope of patent protection of the present invention.