Method for realizing monolingual input to multilingual voice playing
Through a method of monolingual input to multilingual voice playback, the existing strong sound warning device can only be used to single language warning and semantic inaccurate, and the accurate broadcast of multilingual warning statements is achieved, and the application scenarios are expanded. Reduced costs.
Patent Information
- Application Number
- CN202411561268.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing strong sound warning device can only be used in a single language, and its application is limited; law enforcement officers can directly broadcast it through the strong sound speaker, and broadcast whatever they shout, which is not a standard warning statement, and the semantics are inaccurate; some strong sounds are The warning device uses an automatic translation device, which has low accuracy and errors in translation. The semantics cannot be expressed correctly in foreign struggles, resulting in misunderstandings and even diplomatic accidents.
Using a method of monolingual input to multilingual voice playback, audio is collected through microphone, spectrum analysis and feature extraction is performed, voice recognition is sent to the voice processor, voice processor compares with keyword list, and voice recognition number is output to The MCU main control chip converts it to the broadcast language recognition number based on the output voice recognition number and the selected language, and compares it with the voice file library to extract the compressed voice file, decode the compressed voice file and play it through the sound and light alarm platform.
It realizes monolingual input to multilingual voice playback, ensures the semantic accuracy of warning statements, avoids translation errors and misunderstandings, expands application occasions, reduces costs, and improves flexibility.
Smart Images

Figure CN119418688A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of voice playing, and in particular relates to a method for realizing multi-language voice playing from single-language input. Background Art
[0002] In the process of governing sea areas or territories, there will be some objects that need to be warned. In the process of handling, we first communicate with the other party through strong voice, and even issue warnings. If the other party does not listen to the persuasion, we can use strong light and strong sound to disperse and attack them non-lethally.
[0003] The targets of dispersal and attack may come from different countries or different nationalities, and the languages they use include English, Japanese, Korean, Russian or other ethnic languages. However, it is impossible for our front-line maritime police and armed police soldiers to be proficient in multiple languages, and the warning sentences played have strict semantic and grammatical requirements. They cannot be interpreted orally at will, nor can they be automatically translated over the Internet. Therefore, the high-powered sound device required must be able to recognize the Chinese warning sentences issued by the soldiers, and according to the objects and scenarios being dealt with, call out the preset warning sentences in English, Japanese, Korean, Russian or other ethnic languages for high-pitched playback to warn and disperse illegal intruders.
[0004] Defects and shortcomings of existing strong sound warning devices:
[0005] Only single-language warnings are available, so the application scenarios are limited;
[0006] Law enforcement officers shouted through microphones, which were broadcast directly through loudspeakers. What they shouted was broadcast directly, which was not a standard warning sentence and had inaccurate semantics.
[0007] Some loud warning devices use automatic translation devices, which have low accuracy and are prone to translation errors. They cannot correctly express semantics in foreign struggles, causing misunderstandings and even diplomatic accidents. Summary of the invention
[0008] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0009] In view of the following technical problems in the prior art: the existing strong sound warning device can only warn in a single language, and its application occasions are limited;
[0010] Law enforcement officers shouted through microphones, which were broadcast directly through loudspeakers. What they shouted was broadcast directly, which was not a standard warning sentence and had inaccurate semantics.
[0011] Some loud warning devices use automatic translation devices, which have low accuracy and may lead to translation errors. They cannot correctly express semantics in foreign struggles, causing misunderstandings and even diplomatic accidents.
[0012] To solve the above technical problems, the present invention provides the following technical solutions: a method for implementing single language input to multilingual voice playback, comprising:
[0013] Microphone to collect audio;
[0014] The audio is sent to the speech processor after spectrum analysis and feature extraction, and speech recognition;
[0015] The voice processor compares the keyword list and outputs the voice recognition number to the MCU main control chip;
[0016] The MCU main control chip converts the output voice identification number and the selected language into the broadcast language identification number, and compares it with the voice file library to retrieve the compressed voice file;
[0017] Decode the compressed voice file and play it through the sound and light alarm platform.
[0018] As a preferred technical solution for implementing a method for converting a single language input into a multi-language voice playback, the comparison between the voice processor and the keyword list includes:
[0019] The computer writes the standard warning words that need to be recognized and the corresponding numbers into the voice module in advance to form a keyword list.
[0020] As a preferred technical solution for implementing a method for converting a single language input into a multilingual voice playback, the voice recognition includes:
[0021] Voice input, apply for a session, and ask if there are free resources. If not, wait for re-input;
[0022] If so, create recognition and call the specified vocabulary;
[0023] Activate the recognition engine and set parameters;
[0024] Load the grammar, recognize the voice data, and ask whether the audio has ended. If not, reload the grammar. If so, directly obtain the recognition result and output the voice recognition number.
[0025] As a preferred technical solution for implementing a method for converting a single language input into a multi-language voice playback, decoding a compressed voice file includes:
[0026] Open the corresponding voice file according to the voice recognition number, take out a frame of audio data, decode the audio data, send it to the sound and light alarm platform, and ask if it is the last frame. If not, move to the next needle mark position and continue to open the audio data frame by frame;
[0027] If so, open the entire audio file.
[0028] As a preferred technical solution for implementing a method for converting single-language input into multi-language voice playback, for the decoded audio data in each frame, it includes: taking the synchronization character and frame header information of each frame, obtaining corresponding parameters, and obtaining the actual audio data of one frame based on the analysis of the frame header information and then performing CRC error correction.
[0029] As a preferred technical solution for implementing a method for converting a single language input into a multi-language voice playback, an actual frame of audio data is read to obtain scaling factor data and Huffman codewords, followed by Huffman decoding;
[0030] Dequantization is performed, and stereo processing is performed on the dequantization result according to the stereo information of the frame header; finally, the digital audio signal is reconstructed through aliasing processing, IMDCT and synthesis filter.
[0031] As an optimal technical solution for implementing a method of converting single-language input into multi-language voice playback, the decoder of the sound and light alarm platform decodes the PCM code stream and outputs the audio signal to the signal conditioning board. The signal conditioning board conditions the analog audio signal, and after amplification by the power amplifier, it drives the speaker to make sound.
[0032] The beneficial effects of the present invention are as follows: the voice file of the present invention adopts software decoding, does not need a decoding chip, reduces the cost, and improves the flexibility; the keywords and multi-language voice files are configurable. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0034] Figure 1 It is a schematic diagram of the method principle of the present invention;
[0035] Figure 2 It is a schematic diagram of system connection of the present invention;
[0036] Figure 3 It is a schematic diagram of the speech recognition process in the present invention;
[0037] Figure 4 It is a schematic diagram of the voice file decoding process in the present invention;
[0038] Figure 5 It is a structural schematic diagram of the frame decoding process in the present invention;
[0039] Figure 6 It is a schematic diagram of the working principle of the strong sound device in the present invention. DETAILED DESCRIPTION
[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0042] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0043] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0044] Example 1
[0045] Reference Figure 1 to Figure 6 , this embodiment provides a method for implementing single language input to multi-language voice playback, including: collecting audio with a microphone;
[0046] The audio is sent to the speech processor after spectrum analysis and feature extraction, and speech recognition;
[0047] The voice processor compares the keyword list and outputs the voice recognition number to the MCU main control chip;
[0048] The MCU main control chip converts the output voice identification number and the selected language into the broadcast language identification number, and compares it with the voice file library to retrieve the compressed voice file;
[0049] Decode the compressed voice file and play it through the sound and light alarm platform.
[0050] Specifically, this solution implements the following functions: It has the function of shouting with a microphone, first uses Chinese speech recognition, and searches for a specific language based on the speech recognition result and the currently set language, and supports multi-language broadcasting, such as English, Japanese, Korean, Russian, and designated ethnic languages. Standard warning words are pre-defined according to task requirements, such as the warning word example table in Table 1 below.
[0051] Table 1 Warning word examples
[0052] 1 The vehicles ahead are driving on the right, please pay attention to the convoy 2 Thank you for your cooperation with our work. You can leave now. Goodbye. 3 Please get off the car one by one. We need to check each one. 4 We are performing official duties. Please leave the scene immediately. 5 We are carrying out a security mission. Please stay outside the cordon if you are not necessary. 6 You are about to enter Chinese territory, please leave immediately 7 Routine inspection, please stay where you are and show your ID 8 Please do not crowd and pass in the designated direction
[0053] Each Chinese standard warning message is equipped with voice data files in corresponding languages such as English, Japanese, Korean, Russian, and designated ethnic languages. These voice files have undergone strict translation, compliance review, and professional dubbing recording to ensure the accuracy, naturalness, and fluency of the voice. At the same time, all voice data files use efficient compression algorithms to reduce file size and improve storage and transmission efficiency.
[0054] The hand microphone is connected to the speech recognition module, which performs speech sampling, spectrum analysis, and feature extraction, compares it with keywords, and outputs an identification number corresponding to the Chinese warning word.
[0055] General voice recognition chips recognize voices, search through keywords, and control the output pin action. However, the number of pins of voice recognition chips is limited, and the number of warning sentences that can be recognized and controlled is very small. This solution uses the serial port to communicate between the voice recognition chip and the MCU. The voice recognition chip outputs the identification number through the serial port. The number of warning sentences is not limited by the pins and can reach 1,000.
[0056] The implementation device is configured with a processor module, which extracts the voice file of the warning message in the corresponding language (such as a file in MP3 format) according to the identification number output by the voice recognition module and the set broadcast language, generates a PCM code stream after voice decoding, and sends it to the strong sound system. The strong sound system decodes it into an analog audio signal, which is then conditioned and amplified and sent to the strong sound speaker for broadcasting.
[0057] Speech decoding can be generally divided into 9 processes: bit stream decomposition, Huffman decoding, inverse quantization, stereo processing, spectrum rearrangement, anti-aliasing processing, IMDCT transform, sub-band synthesis, and PCM output.
[0058] The processing flow of the present invention is as follows: the speech recognition module performs speech recognition according to the Chinese speech transmitted from the hand microphone, compares it with the stored keywords, retrieves whether it is a correct sentence, and outputs the identification number from the serial port. The processor module calls out the MP3 format speech file of the corresponding language according to the identification number and the selected language, converts the MP3 file into a PCM code stream through data processing and decoding, and the PCM code stream is packaged into a data packet and transmitted to the sound and light alarm platform for decoding, conditioning, amplification, and broadcasting.
[0059] The specific implementation process is:
[0060] 1. Configure standard warning sentence keywords
[0061] Before using the voice recognition module, the standard warning words (text) to be recognized and their corresponding numbers are written into the voice module to form a keyword list.
[0062] 2. Voice Recognition
[0063] When the user inputs voice, the voice recognition module will perform spectrum analysis and feature extraction on the signal and perform corresponding recognition operations. Then the result will be matched with the custom entry in the keyword list. The one with the highest matching degree is the final recognition result, and the identification number of the recognized voice will be output to the MCU main control chip through the serial port for data processing.
[0064] 3. Extract the warning voice file in the corresponding language
[0065] The main control chip of the processor module takes out the warning voice file in the corresponding language according to the identification number output by the voice module and the language to be broadcast input by the control terminal.
[0066] Furthermore, speech recognition includes,
[0067] Voice input, apply for a session, and ask if there are free resources. If not, wait for re-input;
[0068] If so, create recognition and call the specified vocabulary;
[0069] Activate the recognition engine and set parameters;
[0070] Load the grammar, recognize the voice data, and ask whether the audio has ended. If not, reload the grammar. If so, directly obtain the recognition result and output the voice recognition number.
[0071] 4. Decode compressed voice files
[0072] Decode the voice file and output the PCM code stream to the strong sound system frame by frame until the decoding is completed.
[0073] The decoding of an MP3 file is essentially to decode each frame in a loop until all frames are decoded, or an error occurs and the decoding is terminated. Figure 3 shown.
[0074] Specifically, the corresponding voice file is opened according to the voice recognition number, a frame of audio data is taken out, the audio data is decoded, and sent to the sound and light alarm platform, and it is inquired whether it is the last frame. If not, it moves to the next needle mark position and continues to open the audio data frame by frame;
[0075] If so, open the entire audio file.
[0076] For decoding of each frame, the first step is to obtain the synchronization character and frame header information of each frame, so as to obtain the corresponding parameters, and then obtain the actual audio data of one frame based on the analysis of the frame header information; then read the main data and obtain the scaling factor data and Huffman codeword, and then perform Huffman decoding; secondly, perform inverse quantization, and perform stereo processing on the inverse quantization result according to the stereo information of the frame header; finally, reconstruct the digital audio signal through aliasing processing, IMDCT and synthesis filter. This process is like Figure 4 shown.
[0077] Specifically,
[0078] For the decoded audio data in each frame, it includes: taking the synchronization character and frame header information of each frame, obtaining corresponding parameters, and performing CRC error correction based on the analysis of the frame header information to obtain the actual audio data of one frame.
[0079] Read the actual audio data of one frame, obtain the scaling factor data and Huffman codeword, and then perform Huffman decoding;
[0080] Dequantization is performed, and stereo processing is performed on the dequantization result according to the stereo information of the frame header; finally, the digital audio signal is reconstructed through aliasing processing, IMDCT and synthesis filter.
[0081] 5. Broadcast
[0082] The decoder of the powerful sound device decodes the PCM code stream and outputs the audio signal to the signal conditioning board. The signal conditioning board conditions the analog audio signal, and after amplification by the power amplifier, it drives the speaker to make sound.
[0083] The present invention creatively adopts speech recognition technology to extract speech files in other languages that need to be broadcasted;
[0084] Adopting the latest speech recognition module and offline neural network calculation, speech recognition does not rely on the network;
[0085] The voice recognition module and the processor module communicate via the serial port to output the identification number. The number of warning sentences is not limited by the number of chip pins and can reach 1,000.
[0086] Voice files are decoded by software, without the need for decoding chips, which reduces costs and improves flexibility;
[0087] Keywords and multilingual voice files are configurable.
[0088] It will be appreciated that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but will be a routine task of design, fabrication, and production for those of ordinary skill having the benefit of this disclosure without undue experimentation.
[0089] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for implementing the conversion of single language input into multilingual voice playback, characterized in that: include, Microphone to collect audio; The audio is sent to the speech processor after spectrum analysis and feature extraction, and speech recognition; The voice processor compares the keyword list and outputs the voice recognition number to the MCU main control chip; The MCU main control chip converts the output voice identification number and the selected language into the broadcast language identification number, and compares it with the voice file library to retrieve the compressed voice file; Decode the compressed voice file and play it through the sound and light alarm platform.
2. The method for realizing the conversion of single language input into multilingual voice playback according to claim 1, characterized in that: Speech processor and keyword list comparisons include: The computer writes the standard warning words that need to be recognized and the corresponding numbers into the voice module in advance to form a keyword list.
3. The method for realizing the conversion of single language input into multilingual voice playback according to claim 2, characterized in that: The speech recognition includes: Voice input, apply for session, and determine whether there are idle resources. If not, wait for re-input; If so, create recognition and call the specified vocabulary; Activate the recognition engine and set parameters; Load the grammar, recognize the voice data, and ask whether the audio has ended. If not, reload the grammar. If so, directly obtain the recognition result and output the voice recognition number.
4. The method for realizing the conversion of single language input into multilingual voice playback according to claim 3, characterized in that: Decoding of compressed voice files includes: Open the corresponding voice file according to the voice recognition number, take out a frame of audio data, decode the audio data, send it to the sound and light alarm platform, and ask if it is the last frame. If not, move to the next needle mark position and continue to open the audio data frame by frame; If so, open the entire audio file.
5. The method for realizing the conversion of single language input into multilingual voice playback according to claim 4, characterized in that: For the decoded audio data in each frame, it includes: taking the synchronization character and frame header information of each frame, obtaining corresponding parameters, and performing CRC error correction based on the analysis of the frame header information to obtain the actual audio data of one frame.
6. The method for realizing the conversion of single language input into multilingual voice playback according to claim 5, characterized in that: Read the actual audio data of one frame, obtain the scaling factor data and Huffman codeword, and then perform Huffman decoding; Dequantization is performed, and stereo processing is performed on the dequantization result according to the stereo information of the frame header; finally, the digital audio signal is reconstructed through aliasing processing, IMDCT and synthesis filter.
7. The method for realizing the conversion of single language input into multilingual voice playback according to claim 6, characterized in that: The decoder of the sound and light alarm platform decodes the PCM code stream and outputs the audio signal to the signal conditioning board. The signal conditioning board conditions the analog audio signal, and after amplification by the power amplifier, it drives the speaker to make sound.
Citation Information
Patent Citations
Text-to-voice conversion method and device, chip circuit and medium
CN111667815A
Multi-language correspondent list style language database and synchronous computer inter-transtation and communication
CN1553381A
Exchanging method for different languages and its system
CN1560764A
Automatic translation processing method using audio frequency data comparison and automatic translating machine
CN1716241A
Strong sound equipment with high electro-acoustic conversion efficiency
CN217363261U