WO2018072327A1 - 防止语音命令误识别的方法和装置 - Google Patents
防止语音命令误识别的方法和装置 Download PDFInfo
- Publication number
- WO2018072327A1 WO2018072327A1 PCT/CN2016/113279 CN2016113279W WO2018072327A1 WO 2018072327 A1 WO2018072327 A1 WO 2018072327A1 CN 2016113279 W CN2016113279 W CN 2016113279W WO 2018072327 A1 WO2018072327 A1 WO 2018072327A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- phrase
- time
- error
- chinese
- lyric
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000001960 triggered effect Effects 0.000 claims description 62
- 238000004364 calculation method Methods 0.000 claims description 22
- 238000012790 confirmation Methods 0.000 claims description 9
- 238000012937 correction Methods 0.000 claims description 3
- 230000001939 inductive effect Effects 0.000 claims description 2
- 230000000977 initiatory effect Effects 0.000 claims 1
- 230000001965 increasing effect Effects 0.000 abstract description 22
- 230000007547 defect Effects 0.000 abstract description 4
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 238000002054 transplantation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/22—Procedures used during a speech recognition process, e.g. man-machine dialogue
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L15/00—Speech recognition
- G10L15/26—Speech to text systems
Definitions
- Embodiments of the present invention relate to data processing technologies, and in particular, to a method and apparatus for preventing false recognition of voice commands.
- the disadvantage of the prior art is that the computational burden of the CPU is increased, the power consumption of the device is increased, the speech recognition algorithm is difficult to transplant, and the possibility of false triggering cannot be fundamentally avoided.
- the embodiments of the present invention provide a method and apparatus for preventing misrecognition of a voice command, so as to optimize the existing technique for reducing the false trigger probability of the voice, and realize the complexity of the voice recognition algorithm without being improved. Reduce speech misrecognition due to song lyrics.
- an embodiment of the present invention provides a method for preventing misrecognition of a voice command, including:
- Playing the to-be-played song turning off the voice recognition module when the first start time is reached, and starting the voice recognition module when the first end time is reached.
- the playing the to-be-played song, closing the voice recognition module when the first start time is reached, and after starting the voice recognition module when the first end time is reached include:
- the calculating, before the first start time and the first end time of the erroneously triggered phrase play, according to the lyric file further includes:
- the method further includes:
- the first start time and the first end time corresponding to the error-probable phrase in the to-be-played song are read.
- the lyric file is a Chinese lyric file
- the preset voice control command is a Chinese voice control command
- the searching for the error-probable trigger phrase in the lyric file includes:
- the calculating, according to the lyric file, the first start time and the first end time of the erroneously triggered phrase play include:
- the lyrics statement includes the number of lyric units
- the error-probable trigger phrase includes the number of lyric units
- the error-probable trigger phrase is in the lyrics
- the calculating, according to the lyric file, the first start time and the first end time of the erroneously triggered phrase play include:
- the lyrics statement includes the number of lyric units
- the erroneous trigger phrase includes lyrics Calculating the first start time and the first end time of the error-probable phrase play by the number of units and the position of the error-probable phrase in the lyrics statement.
- the method further includes:
- an embodiment of the present invention provides an apparatus for preventing misrecognition of a voice command, including:
- a lyric file obtaining module configured to acquire a lyric file matching the song to be played
- the error-triggered phrase search module is configured to search for an error-probable trigger phrase in the lyric file, wherein the error-probable trigger phrase is the same as or similar to the language of the preset voice control command;
- a play time calculation module configured to calculate, according to the lyric file, a first start time and a first end time of the erroneously triggered phrase play;
- the voice recognition module control module is configured to play the song to be played, close the voice recognition module when the first start time is reached, and start the voice recognition module when the first end time is reached.
- the method further includes:
- a play time saving module configured to save the error-probable phrase and the corresponding first start time and the first end time
- the method further includes:
- a false triggering phrase confirmation module configured to confirm that the lyric file does not have the saved error triggering phrase
- the method further includes:
- a play time reading module configured to read the first start time and the first end time corresponding to the error-probable trigger phrase in the song to be played if there is the saved error-probable phrase.
- the lyric file is a Chinese lyric file
- the preset voice control command is a Chinese voice control command
- the error-prone trigger phrase search module includes:
- a lyric traversal unit configured to traverse a pronunciation attribute of all Chinese lyrics in the Chinese lyric file, wherein the pronunciation attribute includes at least a pitch, an initial, and a final;
- the same phrase confirmation unit configured to confirm the Chinese character or the Chinese character in the Chinese character or the Chinese character in the Chinese speech control command is the same as the pronunciation attribute of the Chinese character in the Chinese speech control command
- the Chinese word phrase is the same as the language of the Chinese voice control command
- a similar phrase confirmation unit configured to: if at least one of the Chinese characters in the Chinese character or a Chinese character phrase in the Chinese lyrics is at least one of the pronunciation attributes of the Chinese character corresponding to the position in the Chinese voice control command, and at least one If there are two kinds of the same, it is confirmed that the Chinese character or the Chinese character phrase is similar to the language of the Chinese voice control command;
- the error-triggered phrase tagging unit is configured to mark the one Chinese character or the one Chinese character phrase as a false triggering phrase.
- the playing time calculation module includes:
- a second playing time determining unit configured to acquire, according to the lyrics file, a second start time and a second end time of playing the lyrics statement to which the error-probable trigger phrase belongs;
- a first playing time calculating unit configured to include, according to the second starting time, the second ending time, the number of lyric units, the number of lyric units, and the number of lyric elements Describe the position of the erroneously triggered phrase in the lyrics statement, and calculate the first start time and the first end time of the erroneously triggered phrase play.
- the playing time calculation module includes:
- a second play time determining unit configured to acquire, according to the lyric file, the second start time and the second end time of playing the lyrics statement to which the error-probable trigger phrase belongs;
- a compensation time acquisition unit configured to acquire a first compensation time of the first start time and a second compensation time of the first end time
- the error-probable trigger phrase includes a number of lyric units and a position of the error-probable trigger phrase in the lyric sentence, and calculates the first start time and the first end time of the erroneously triggered phrase play .
- the method further includes:
- a mis-identification statistic module configured to: after the end of the playing of the to-be-played song, the error-inducing phrase that causes and does not cause the preset voice control command to be misidentified;
- a compensation time correction module configured to correct the first compensation time and the second compensation time corresponding to the error-probable trigger phrase, and recalculate the first start time and the first An end time.
- the method and device for preventing misrecognition of a voice command provided by the embodiment of the present invention, by first acquiring a lyric file matching the song to be played, and then searching for a erroneous trigger phrase in the lyric file, and calculating a first start time of the erroneously triggered phrase play And the first end time, finally playing the song to be played, closing the voice recognition module when the first start time is reached, and starting the voice recognition module when the first end time is reached, overcoming the probability of reducing the false alarm of the voice in the prior art.
- the complexity of the speech recognition algorithm is increased, resulting in an increase in the computational load of the processor, an increase in the power consumption of the device, and a technical defect in the difficulty of transplanting the speech recognition algorithm, thereby realizing the need to improve the complexity of the speech recognition algorithm, and also reliably reducing the play due to the song.
- the resulting speech is misidentified.
- FIG. 1 is a flowchart of a method for preventing voice misrecognition according to Embodiment 1 of the present invention
- FIG. 2 is a flowchart of a method for preventing voice misidentification according to Embodiment 2 of the present invention
- FIG. 3 is a flowchart of a method for preventing voice misidentification according to Embodiment 3 of the present invention.
- FIG. 4 is a structural diagram of an apparatus for preventing voice misidentification according to Embodiment 4 of the present invention.
- FIG. 1 is a flowchart of a method for preventing misrecognition of a voice command according to Embodiment 1 of the present invention.
- the method of this embodiment may be implemented by a voice error prevention device, which may be implemented by hardware and/or software. And can be integrated into a voice command control function and can play audio files.
- a voice error prevention device which may be implemented by hardware and/or software. And can be integrated into a voice command control function and can play audio files.
- the method of this embodiment specifically includes:
- Step 110 Acquire a lyric file matching the song to be played.
- a device having both a voice command control function and an audio file play function directly plays when a command to play an audio file is acquired, and is not reduced before being played.
- the operation of misrecognizing a voice command due to playing a song is not reduced.
- the lyric file matching the song to be played is acquired first.
- the method for obtaining the lyrics file may be obtained from the locally stored lyrics file, or may be obtained from the server that stores the lyrics file, and is not limited in this embodiment.
- the lyric file specifically refers to a file containing information such as all lyrics of the song to be played and the start time of each lyric. Typical examples are: files with the suffixes .LRC, .SNC, and .KRC.
- the lyrics mentioned in this scheme are not limited to the lyrics of the songs sung by the singer, but also include content that may cause misrecognition in other audio files, such as reading, speaking, etc., using sound playback as a display mode, and reciting a manuscript or speech.
- the manuscript can be embodied in the form of a lyric file.
- Step 120 Find an error-probable phrase in the lyric file, where the error-probable trigger phrase is the same as or similar to the language of the preset voice control command.
- the error-probable phrase specifically refers to a phrase that may cause a false trigger of a preset voice control command, that is, a phrase whose pronunciation is the same as or similar to the pronunciation of the language of the preset voice control command.
- the preset voice control command specifically refers to a language that is pre-stored and can be used to implement voice control.
- the song may be misidentified and the wrong operation may be performed during the playing process. Therefore, in this embodiment, after acquiring the lyric file of the song to be played, first Will find out if the lyrics in the lyrics file contain erroneous trigger phrases.
- the specific way of finding the error-probable phrase may be to traverse all the lyrics in the lyric file to find the same phrase and initials of each Chinese character in the preset voice control command. It is easy to falsely trigger the phrase, or it can traverse all the lyrics in the lyrics file to find the same phrase as the phonetic symbol of each English word in the preset voice control command as a false trigger phrase.
- the manner of traversing all the lyrics in the lyric file to find the erroneously triggered phrase may be to search for all the lyrics once, and only find a corresponding error-triggered phrase for a preset voice control command, that is, how many The preset voice control command will traverse all the lyrics as many times as possible, or it may only traverse all the lyrics once, and compare with all the preset voice control commands to find the error-probable phrase when traversing, that is, each traversal Any word or word in the lyrics is compared to all preset voice control commands.
- the lyrics are Chinese and English
- the method of the embodiment is also applicable, because no matter which language, Corresponding to the phoneme set unique to the language, all the single words or single words of the language are composed of one or more phonemes unique to the language. When searching for a false trigger phrase, the phoneme unique to the language can be used. As a basis for comparison, when a word or a phrase is identical or similar to the phoneme of each word or each word in the preset voice control command, it is determined that the word or the phrase is a false trigger phrase.
- Step 130 Calculate, according to the lyrics file, a first start time and a first end time of the erroneously triggered phrase play.
- the first start time specifically refers to a time when the phrase is easily triggered to start playing
- the first end time specifically refers to a time when the phrase is easily triggered to be triggered, wherein the first start time and the first end time are both It is a specific time calculated relative to the initial playing time of the song to be played.
- the starting playing time of the song to be played can be recorded as a time format such as 0 minutes 0 seconds 0 milliseconds or 0 minutes 0 seconds.
- the searchable error-triggered phrase can be used to simultaneously know the specific location of the erroneously triggered phrase in the lyrics (for example, the third to sixth words in the fifth sentence lyrics), and according to the song
- the word file can know the time information such as the start time of each lyrics. Therefore, it is easier to calculate the error-prone trigger according to the specific position of the erroneous trigger phrase in the lyrics and the start time of each lyric.
- the first start time and first end time of the phrase play.
- the lyric file since it is not guaranteed that each lyrics is played at a constant speed, and the lyric file generally does not record the initial playing time of each word or word in detail, generally only the initial playing time of each lyric is recorded, so When calculating the first start time and the first end time, if all the words or words in the lyrics are played at a constant speed by default, the calculation result may be related to the actual start time and end play time of the error-probable phrase. The error, therefore, can be slightly adjusted for the calculated first start time and first end time, so that they are closer to the actual start and end play time of the phrase that is easy to falsely trigger the phrase.
- the adjustment may be performed by setting a compensation time, subtracting the calculated first start time from the compensation time, and adding the compensation time to the first end time, and the compensation time of the first start time and the first end time may be the same. It may also be different, and this embodiment does not limit this.
- Step 140 Play the song to be played, close the voice recognition module when the first start time is reached, and start the voice recognition module when the first end time is reached.
- the to-be-played song is started to be played, and when the song is played, when the first start time is reached, the voice is turned off.
- the recognition module prevents the false triggering of the phrase from causing the voice to be misidentified, resulting in an erroneous operation.
- the voice recognition module is turned on to identify the voice control command in real time.
- the method for preventing misrecognition of a voice command provided by the embodiment of the present invention firstly obtains a lyric file that matches a song to be played, and then searches for a erroneous trigger phrase in the lyric file, and calculates a first start time and a At the end time, the song to be played is played last, the voice recognition module is turned off when the first start time is reached, and the voice recognition module is activated when the first end time is reached, overcoming the In the prior art, in order to reduce the probability of voice false triggering, thereby increasing the complexity of the speech recognition algorithm, resulting in a technical burden of increasing the computational load of the processor, increasing the power consumption of the device, and difficulty in transplanting the speech recognition algorithm, the speech recognition algorithm is not required to be improved. The complexity can also reliably reduce the misidentification of speech caused by playing songs.
- FIG. 2 is a flowchart of a method for preventing misrecognition of a voice command according to Embodiment 2 of the present invention.
- This embodiment is optimized based on the foregoing embodiment.
- the lyrics file is optimized into a Chinese lyric file;
- the easy-to-false trigger phrase in the search lyric file is optimized to: traverse the pronunciation attribute of all Chinese lyrics in the Chinese lyric file, wherein the pronunciation attribute includes at least a pitch, an initial and a final; if one Chinese character or one of all Chinese lyrics Each Chinese character in the Chinese character phrase is the same as the pronunciation attribute of the Chinese character corresponding to the position in the Chinese speech control command, and it is confirmed that the Chinese character or the Chinese character phrase is the same as the Chinese speech control command; if one Chinese character or one Chinese character phrase in all Chinese lyrics Each Chinese character in the Chinese character is at least one of the same as the pronunciation attribute of the Chinese character corresponding to the position in the Chinese speech control command, and at least two of them are identical, and it is confirmed that the Chinese character or the Chinese character phrase is similar to the language of the Chinese voice control command; A Chinese phrase is marked as a false trigger phrase.
- the first start time and the first end time of calculating the erroneously triggered phrase play according to the lyric file are optimized as follows: according to the lyric file, obtaining the second start time and the second play of the lyrics statement to which the error-probable trigger phrase belongs End time; according to the second start time, the second end time, the lyrics statement includes the number of lyric units, the error-probable trigger phrase includes the number of lyric units, and the position of the erroneously-triggered phrase in the lyrics statement, and the calculation is easy to trigger The first start time and first end time of the phrase play.
- the method may further include: saving the error-probable phrase and the corresponding first start time And the first end time.
- the method further includes: confirming that the lyric file does not have the saved error-probable phrase.
- the method may further include: if there is a saved error-probable phrase, read The first start time and the first end time corresponding to the phrase in the song to be played are erroneously triggered.
- the method in this embodiment specifically includes:
- Step 201 Obtain a Chinese lyric file matching the song to be played.
- the lyrics of the song to be played are Chinese
- the matched lyrics file is a Chinese lyric file.
- Step 202 Determine whether there is a saved error-probable phrase in the Chinese lyrics file. If not, execute step 203. If yes, execute step 209.
- the song to be played is played before, there will be a saved error-probable phrase and the corresponding first start time and first end time. At this time, there is no need to search for the Chinese lyrics.
- the first start time and the first end time of the false triggering of the phrase and the calculation of the error-probable phrase play can directly call the previously saved related content.
- Step 203 Traversing the pronunciation attribute of all Chinese lyrics in the Chinese lyric file, wherein the pronunciation attribute includes at least a pitch, an initial, and a final.
- the Chinese lyrics file does not have a saved error-probable phrase, it is necessary to search for the error-probable phrase from the Chinese lyrics, and the specific way to find the error-probable phrase is to traverse the Chinese lyrics.
- the pronunciation attribute of each Chinese character is determined according to the degree of matching between the Chinese character and the pronunciation attribute of the language of the Chinese speech control command, and whether the Chinese character is or is a false trigger phrase.
- the pronunciation attribute specifically refers to a set of attributes consisting of sound-related attributes such as pitch, initial, and final.
- the pronunciation attribute of the Chinese character in the Chinese lyrics can be obtained from the Chinese lyrics file, and can also be downloaded from the server through the Internet. This embodiment does not limit this.
- Step 204 Confirm a Chinese character or a Chinese character phrase that is the same as a Chinese speech control command. Specifically, if all Chinese characters in a Chinese lyric or a Chinese character in a Chinese character phrase are associated with a Chinese character corresponding to a position in a Chinese voice control command If the attributes are the same, it is confirmed that the Chinese character or Chinese phrase is the same as the Chinese speech control command.
- the Chinese speech control command for comparison is “increase volume”
- the phrase composed of the Chinese characters A, B and C is not the error corresponding to the "increased volume". Trigger the phrase; if they are the same, continue to determine whether the pronunciation attribute of the Chinese character D after the Chinese character C is the same as the pronunciation attribute of the "quantity" word. If not, the phrase composed of the Chinese characters A, B, C, and D is not corresponding.
- the phrase that increases the volume is easy to trigger the phrase; if it is the same, the phrase composed of the Chinese characters A, B, C, and D is considered to be a false trigger phrase corresponding to the "increase volume".
- Step 205 Confirm a Chinese character or a Chinese character phrase that is similar to the language of the Chinese voice control command. Specifically, if one Chinese character in a Chinese lyric or a Chinese character in a Chinese character phrase is associated with a Chinese character corresponding to a position in a Chinese voice control command If at least one of the attributes is different and at least two are the same, it is confirmed that the Chinese character or Chinese phrase is similar to the language of the Chinese voice control command.
- the Chinese character or Chinese character phrase when searching for a Chinese character or a Chinese character phrase that is similar to the language of the Chinese speech control command, as long as the pronunciation attribute of the Chinese character or the Chinese character phrase is at least one different from the pronunciation attribute of the Chinese character corresponding to the position in the Chinese speech control command. And at least two of the same, it is considered that the Chinese character or Chinese phrase is a false trigger phrase.
- the Chinese voice control command is “turn off the light”.
- the pitch and initials of the Chinese character A are the same as the tones and initials of the “off” word and the finals of the Chinese character A and “ The vowels of the word "off” are different.
- the initials and finals of the Chinese character B are the same as the initials and finals of the "light” word, and the pitch of the Chinese character B is different from the pitch of the "light” word, and the phrase composed of the Chinese characters A and B is considered to correspond.
- the error-triggered phrase of turning off the light is the same as the tones and initials of the “off” word and the finals of the Chinese character A and “ The vowels of the word "off” are different.
- the initials and finals of the Chinese character B are the same as the initials and finals of the "light” word, and the pitch of the Chinese character B is different from the pitch of the "light” word, and the phrase composed of the Chinese characters A and
- the specific method for judging whether a Chinese character or a Chinese character phrase in the Chinese lyrics is a erroneously-triggered phrase is the same as the two examples mentioned in the step 204, and is not detailed here, but the Chinese character or the Chinese character in this step.
- At least one of the pronunciation attributes of the phrase should be different from the corresponding Chinese character in the corresponding Chinese speech control command, and at least two of them should be identical to the corresponding Chinese characters in the corresponding Chinese speech control command to satisfy the judgment of the error-probable trigger phrase. condition.
- Step 206 Mark a Chinese character or a Chinese character phrase as a false trigger phrase.
- the erroneous triggering phrases need to be marked.
- the marking method may be directly marked in the Chinese lyrics file, or may be error-prone.
- the related information of the triggering phrase is stored in another identifiable file, which is not limited in this embodiment.
- Step 207 Acquire, according to the lyrics file, a second start time and a second end time of playing the lyrics statement to which the error-probable trigger phrase belongs.
- the second start time and the second end time of the lyrics statement play specifically refer to the start time and the end time of the lyrics statement playing, wherein the second start time and the second end time are relative The specific time calculated for the initial playback time of the song to be played.
- the lyrics statement to which the error-probable phrase belongs is recorded, and its position in the lyric sentence.
- the mark is easy to trigger the phrase directly, it is directly marked in the Chinese lyrics file, then it is easy to know the lyrics statement that the error-prone trigger phrase belongs to and the position in the lyric sentence; if the mark is easy to trigger the phrase incorrectly
- the related information of the error-probable trigger phrase is stored in another identifiable file, and then the lyrics sentence to which the error-probable phrase is belonged and the position in the lyric sentence are simultaneously recorded in the file.
- the lyric file generally records the start time of each lyrics playing, and also records the length of time each lyrics is played or the end time of each lyrics playing. Therefore, when it is easy to trigger When the lyrics statement to which the phrase belongs has been determined, the second start time and the second end time of the lyrics statement playback to which the erroneous trigger phrase belongs may be relatively easily obtained or calculated according to the lyric file.
- the LRC lyrics file only records the playback start time of each lyrics without recording the end time of each lyric or the length of time of playback. Therefore, when the type of the lyric file matching the song to be played is an LRC file, the default is The start time of a lyric is the end time of the last lyric.
- Step 208 Calculate a first start time and a first end time of the erroneously triggered phrase play.
- the lyrics statement includes the number of lyric units
- the error-probable trigger phrase includes lyrics The number of cells and the position of the erroneously triggered phrase in the lyrics statement, and the first start time and the first end time of the error-probably triggered phrase play are calculated.
- the lyric unit specifically refers to a basic unit constituting the lyrics, for example, the lyrics unit of the Chinese lyrics file is a Chinese character, and the lyric unit of the English lyrics file is an English word.
- the initial playing time of the lyrics sentence that is easy to trigger the phrase is t1
- the ending playing time is t2.
- the lyrics statement has 10 Chinese characters, and the erroneous trigger is triggered.
- the phrase is located in the third, fourth, and fifth words of the lyrics statement. Then, the calculation formulas of the first start time T1 and the first end time T2 of the error-probable trigger phrase are:
- T1 t1+2[(t2-t1)/10]
- T2 t1+5[(t2-t1)/10].
- Step 209 Read a first start time and a first end time corresponding to the error-probable trigger phrase in the song to be played.
- the Chinese lyrics file has a saved error-probable phrase, it is not necessary to re-find the error-probable phrase, and the saved error-probable phrase is directly called.
- Step 210 Play the song to be played, close the voice recognition module when the first start time is reached, and start the voice recognition module when the first end time is reached.
- Step 211 Save the error-probable phrase and the corresponding first start time and first end time.
- the method for preventing misrecognition of a voice command provided by the embodiment of the present invention, by first acquiring a lyric file matching the song to be played, according to whether the lyric file has a saved error-probable trigger phrase, respectively, directly reading the error-probable trigger phrase And corresponding operations of the first start time and the first end time, and determining a erroneously triggered phrase by traversing the pronunciation attribute of all Chinese characters in the lyrics, obtaining a second start time of playing the lyrics statement to which the error-probable phrase belongs, and Second end time, and calculate the operation of the first start time and the first end time of the error-probably triggered phrase play, then play the song to be played and close and open the voice recognition module in time, and finally save the error-probable trigger phrase and the corresponding first start Time and first end time,
- FIG. 3 is a flowchart of a method for preventing misrecognition of a voice command according to Embodiment 3 of the present invention.
- the embodiment is optimized based on the foregoing embodiment.
- the first start time and the first end time of calculating the error-probable phrase play according to the lyric file are optimized as follows: a second start time and a second end time of playing the lyrics statement to which the phrase belongs; acquiring a first compensation time of the first start time and a second compensation time of the first end time; according to the second start time and the second end time
- the first compensation time, the second compensation time, the lyrics statement includes the number of lyric units, the number of erroneous trigger phrases including the number of lyric elements, and the position of the erroneously triggered phrase in the lyrics sentence, and the calculation of the error-probable phrase playback A start time and a first end time.
- the method further includes: after the end of the playing of the to-be-played song, counting the erroneous triggering phrase that causes and does not cause the false recognition of the preset voice control command; correcting the first compensation time and the second compensation time corresponding to the error-probable triggering phrase, Calculate the first start time and the first end time of the phrase triggering the error.
- the method in this embodiment specifically includes:
- Step 301 Acquire a lyric file that matches a song to be played.
- Step 302 Determine whether there is a saved error-probable phrase in the Chinese lyrics file. If not, execute step 303. If yes, execute step 307.
- Step 303 Find an error-probable phrase in the lyric file, where the error-probable trigger phrase is the same as or similar to the language of the preset voice control command.
- Step 304 Acquire, according to the lyric file, a second start time and a second end time for playing the lyrics statement to which the error-probable trigger phrase belongs.
- Step 305 Acquire a first compensation time of the first start time and a second compensation time of the first end time.
- the first compensation time and the second compensation time are added in this embodiment, so as to trigger the first start time of the phrase to be erroneously triggered. Corrected with the first end time.
- the first compensation time is specifically used to adjust the first start time
- the second compensation time is specifically used to adjust the first end time.
- the first compensation time and the second compensation time may be the same or different, and this embodiment does not Make restrictions.
- the specific values of the first compensation time and the second compensation time may be empirical values (for example, 1 second, etc.), and may be arbitrarily set within a reasonable range.
- the LRC lyrics file since the LRC lyrics file only records the playback start time of each lyrics without recording the end time of each lyric or the length of time of playing, therefore, when the type of the lyric file matching the song to be played is an LRC file, and when When there is music accompaniment between the lyrics sentence and the next lyric sentence in which the error-probable phrase is located, if the playback start time of the next lyrics is the end time of the lyrics of the previous sentence, then the default playback end time of the previous sentence is The actual playback end time is different. Therefore, according to the default start time of the next lyrics, the required time point calculated by the playback end time of the previous lyric is different from the actual time point, and the introduction of the compensation time can be reduced. Small even eliminates this error.
- Step 306 Calculate a first start time and a first end time of the erroneously triggered phrase play, specifically, according to the second start time, the second end time, the first compensation time, the second compensation time, and the lyrics statement
- the number of lyric units included, the error-prone trigger phrase includes the number of lyric elements and the position of the erroneously-triggered phrase in the lyrics statement, and the first start time and the first end time of the erroneously triggered phrase play are calculated.
- the method for calculating the first start time T1 ′ and the first end time T2 ′ of the erroneously triggered phrase play is: first calculating the first start time T1 of the play when the error-prone trigger phrase does not consider the compensation time. And the first end time T2, the specific steps can refer to the specific description in step 208, and then calculate T1' and T2' according to the first compensation time T' and the second compensation time T", the formula is:
- T1' T1 - T'
- T2' T2 + T"
- T' and T" are both positive numbers.
- Step 307 Read a first start time and a first end time corresponding to the error-probable phrase in the song to be played.
- Step 308 Play the song to be played, close the voice recognition module when the first start time is reached, and start the voice recognition module when the first end time is reached.
- Step 309 After the playing of the to-be-played song ends, the erroneous triggering phrase that causes and does not cause the false recognition of the preset voice control command is counted.
- the erroneously triggered phrase that causes and does not cause the false recognition of the preset voice control command is counted.
- Step 310 Correct the first compensation time and the second compensation time corresponding to the error-probable trigger phrase, and recalculate the first start time and the first end time of the error-probable trigger phrase play.
- the first start time and the first end time corresponding to the erroneous triggering phrase are considered to be inaccurate. Need to adjust.
- the adjustment method may specifically be that the first compensation time and the second compensation time are correspondingly increased, and the amount of time for increasing the two may be the same or different, for example, the first compensation time and the second compensation time may be simultaneously increased by 10%. And then recalculating the first start time and the first end time of the error-probable phrase play using the increased first compensation time and the second compensation time.
- the values of the first compensation time and the second compensation time may be reduced correspondingly,
- the reduced amount of time may be the same or different, for example, the first compensation time and the second compensation time may be simultaneously reduced by 5%, and then the error is recalculated using the reduced first compensation time and the second compensation time. Trigger the first start time and first end time of the phrase play.
- Step 311 Save the error-probable phrase and the corresponding first start time and first end time.
- the method for preventing misrecognition of a voice command provided by the embodiment of the present invention, by first acquiring a lyric file matching the song to be played, according to whether the lyric file has a saved error-probable trigger phrase, respectively, directly reading the error-probable trigger phrase Corresponding operation of the first start time and the first end time, and determining the error-probable phrase by traversing the pronunciation attribute of all the Chinese characters in the lyrics, and acquiring the second start time and the second end of the lyrics statement to which the error-probable phrase belongs The time and the first compensation time and the second compensation are performed, and the operation of the first start time and the first end time of the phrase triggering the phrase play is calculated, and then the song to be played is played and the voice recognition module is turned off and on, and the statistics are played after the end of the play.
- the complexity of speech recognition algorithm is increased.
- the technical defects that lead to increased computational load on the processor, increased power consumption of the device, and difficulty in porting the speech recognition algorithm enable the complexity of the speech recognition algorithm to be reduced, and the speech misrecognition caused by playing the song can be reliably reduced, and the song is played. At the same time, the speech recognition module is maximized.
- FIG. 4 is a structural diagram of an apparatus for preventing misrecognition of a voice command according to Embodiment 4 of the present invention.
- the device includes: a lyric file obtaining module 101, an error-prone trigger phrase search module 102, a play time calculation module 103, and a voice recognition module control module 104. among them:
- the lyric file obtaining module 101 is configured to acquire a lyric file matching the song to be played;
- the error-triggered phrase search module 102 is configured to search for an error-probable trigger phrase in the lyric file, wherein the error-probable trigger phrase is the same as or similar to the language of the preset voice control command;
- the play time calculation module 103 is configured to calculate, according to the lyrics file, a first start time and a first end time of the erroneously triggered phrase play;
- the voice recognition module control module 104 is configured to play the song to be played, close the voice recognition module when the first start time is reached, and start the voice recognition module when the first end time is reached.
- the apparatus for preventing misrecognition of a voice command calculates a first start time and a first error of triggering a phrase play by first acquiring a lyric file matching the song to be played, and then searching for a erroneous trigger phrase in the lyric file. At the end time, the song to be played is played last, and the voice recognition module is turned off when the first start time is reached, and the voice recognition module is activated when the first end time is reached, which overcomes the probability of reducing the false alarm of the voice in the prior art.
- the method may further include:
- a play time saving module configured to save the error-probable phrase and the corresponding first start time and first end time
- the time calculation module Before playing the time calculation module, it can also include:
- the error-probable phrase confirmation module is configured to confirm that the lyric file does not have a saved error-probable phrase
- the voice recognition module controls the module, it may also include:
- the playing time reading module is configured to read the first start time and the first end time corresponding to the error-probable trigger phrase in the song to be played if there is a saved error-probable phrase.
- the lyric file may be a Chinese lyric file
- the preset voice control command can be a Chinese voice control command
- the error-probable phrase lookup module can include:
- a lyric traversal unit for traversing the pronunciation attribute of all Chinese lyrics in the Chinese lyric file, wherein the pronunciation attribute includes at least a pitch, an initial, and a final;
- the same phrase confirmation unit is used to confirm that the Chinese character or the Chinese character control and the Chinese speech control are confirmed if one of the Chinese characters or one of the Chinese characters in the Chinese character is the same as the Chinese character of the corresponding position in the Chinese speech control command.
- the language of the command is the same;
- a similar phrase confirmation unit configured to: if at least one of the Chinese characters of one of the Chinese lyrics or one of the Chinese character phrases is different from the pronunciation attribute of the Chinese character corresponding to the position in the Chinese voice control command, and at least two of the same Confirm that the Chinese character or Chinese character phrase is similar to the language of the Chinese voice control command;
- the error-triggered phrase tagging unit is used to mark a Chinese character or a Chinese character phrase as a false triggering phrase.
- the play time calculation module may include:
- a second playing time determining unit configured to acquire, according to the lyrics file, a second start time and a second end time of playing the lyrics statement to which the error-probable trigger phrase belongs;
- a first play time calculation unit configured to: according to the second start time, the second end time, the number of lyric units included in the lyrics statement, the number of lyric elements included in the erroneous trigger phrase, and the erroneous trigger phrase in the lyric sentence Position, calculate the first start time and the first end time of the phrase triggering the error.
- the play time calculation module may include:
- a second playing time determining unit configured to acquire, according to the lyrics file, a second start time and a second end time of playing the lyrics statement to which the error-probable trigger phrase belongs;
- a compensation time acquisition unit configured to acquire a first compensation time of the first start time and a second compensation time of the first end time
- a second playing time calculation unit configured to include, according to the second start time, the second end time, the first compensation time, the second compensation time, the number of lyric units, and the number of lyric elements included in the erroneous trigger phrase And the position of the erroneously triggered phrase in the lyrics statement, and the first start time and the first end time of the easy-to-falsely triggered phrase play are calculated.
- the method may further include:
- the mis-identification statistic module is configured to: after the end of the playing of the song to be played, the erroneous triggering phrase that causes and does not cause the erroneous recognition of the preset voice control command;
- the compensation time correction module is configured to correct the first compensation time and the second compensation time corresponding to the error-prone trigger phrase, and recalculate the first start time and the first end time of the error-probable trigger phrase play.
- the device for preventing misrecognition of a voice command provided by the embodiment of the present invention can be used to perform the method for preventing false recognition of a voice command provided by any embodiment of the present invention, and has a corresponding function module to achieve the same beneficial effect.
- the various modules or steps of the invention described above can be implemented by a server as described above.
- the embodiments of the present invention may be implemented by a program executable by a computer device, so that they may be stored in a storage device and executed by a processor, and the program may be stored in a computer readable storage medium.
- the above mentioned storage medium may be read only storage , disk or optical disk, etc.; or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated into a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Multimedia (AREA)
- Electrophonic Musical Instruments (AREA)
- Reverberation, Karaoke And Other Acoustics (AREA)
Abstract
一种防止语音命令误识别的方法和装置。方法包括:获取与待播放歌曲匹配的歌词文件(S110);查找歌词文件中的易误触发词组(S120);根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间(S130);播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块(S140)。克服了现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别。
Description
本发明实施例涉及数据处理技术,尤其涉及一种防止语音命令误识别的方法和装置。
随着科学技术的不断发展,以及人们对生活品质不断的更高追求,越来越多的设备具有语音控制功能。
汽车、家用电器以及手机中大多数都会安装语音控制功能,这些设备同时也可以播放歌曲、相声等音频文件,在这些设备在播放音频文件时,有可能会误开启语音控制功能,使得设备做出错误的动作。现有技术中通过提高语音识别算法的复杂度,优化语音识别算法,减小误触发的概率。
现有技术的缺陷在于:提高了CPU的计算负担导致设备功耗上升,语音识别算法移植困难,且无法从根本上避免误触发的可能性。
发明内容
有鉴于此,本发明实施例提供了一种防止语音命令误识别的方法和装置,以优化现有的减小语音误触发概率技术,实现了无需提高语音识别算法的复杂度,也可以可靠的减少由于歌曲歌词导致的语音误识别。
在第一方面,本发明实施例提供了一种防止语音命令误识别的方法,包括:
获取与待播放歌曲匹配的歌词文件;
查找所述歌词文件中的易误触发词组,其中,所述易误触发词组与预设语音控制命令的语言相同或相近;
根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间;
播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块。
在上述方法中,优选的是,所述播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块之后,还包括:
保存所述易误触发词组和对应的所述第一起始时间和所述第一结束时间;
所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间之前,还包括:
确认所述歌词文件不存在已保存的所述易误触发词组;
所述播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块之前,还包括:
若存在已保存的所述易误触发词组,读取所述待播放歌曲中所述易误触发词组对应的所述第一起始时间和所述第一结束时间。
在上述方法中,优选的是,所述歌词文件为中文歌词文件;
所述预设语音控制命令为汉语语音控制命令;
所述查找所述歌词文件中的易误触发词组包括:
遍历所述中文歌词文件中所有中文歌词的发音属性,其中,所述发音属性至少包括音调、声母和韵母;
如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相同;
如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相近;
将所述一个汉字或所述一个汉字词组标记为易误触发词组。
在上述方法中,优选的是,所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间包括:
根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;
根据所述第二起始时间、所述第二结束时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
在上述方法中,优选的是,所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间包括:
根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的所述第二起始时间和所述第二结束时间;
获取所述第一起始时间的第一补偿时间和所述第一结束时间的第二补偿时间;
根据所述第二起始时间、所述第二结束时间、所述第一补偿时间、所述第二补偿时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词
单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
在上述方法中,优选的是,还包括:
所述待播放歌曲播放结束后,统计引起和未引起所述预设语音控制命令误识别的所述易误触发词组;
修正所述易误触发词组对应的所述第一补偿时间和所述第二补偿时间,重新计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
在第二方面,本发明实施例提供了一种防止语音命令误识别的装置,包括:
歌词文件获取模块,用于获取与待播放歌曲匹配的歌词文件;
易误触发词组查找模块,用于查找所述歌词文件中的易误触发词组,其中,所述易误触发词组与预设语音控制命令的语言相同或相近;
播放时间计算模块,用于根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间;
语音识别模块控制模块,用于播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块。
在上述装置中,优选的是,所述语音识别模块控制模块之后,还包括:
播放时间保存模块,用于保存所述易误触发词组和对应的所述第一起始时间和所述第一结束时间;
所述播放时间计算模块之前,还包括:
易误触发词组确认模块,用于确认所述歌词文件不存在已保存的所述易误触发词组;
所述语音识别模块控制模块之前,还包括:
播放时间读取模块,用于若存在已保存的所述易误触发词组,读取所述待播放歌曲中所述易误触发词组对应的所述第一起始时间和所述第一结束时间。
在上述装置中,优选的是,所述歌词文件为中文歌词文件;
所述预设语音控制命令为汉语语音控制命令;
所述易误触发词组查找模块包括:
歌词遍历单元,用于遍历所述中文歌词文件中所有中文歌词的发音属性,其中,所述发音属性至少包括音调、声母和韵母;
相同词组确认单元,用于如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相同;
相近词组确认单元,用于如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相近;
易误触发词组标记单元,用于将所述一个汉字或所述一个汉字词组标记为易误触发词组。
在上述装置中,优选的是,所述播放时间计算模块包括:
第二播放时间确定单元,用于根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;
第一播放时间计算单元,用于根据所述第二起始时间、所述第二结束时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
在上述装置中,优选的是,所述播放时间计算模块包括:
第二播放时间确定单元,用于根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的所述第二起始时间和所述第二结束时间;
补偿时间获取单元,用于获取所述第一起始时间的第一补偿时间和所述第一结束时间的第二补偿时间;
第二播放时间计算单元,用于根据所述第二起始时间、所述第二结束时间、所述第一补偿时间、所述第二补偿时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
在上述装置中,优选的是,还包括:
误识别统计模块,用于所述待播放歌曲播放结束后,统计引起和未引起所述预设语音控制命令误识别的所述易误触发词组;
补偿时间修正模块,用于修正所述易误触发词组对应的所述第一补偿时间和所述第二补偿时间,重新计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
本发明实施例提供的防止语音命令误识别的方法和装置,通过先获取与待播放歌曲匹配的歌词文件,然后查找歌词文件中的易误触发词组,计算易误触发词组播放的第一起始时间和第一结束时间,最后播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块,克服了现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别。
图1是本发明实施例一提供的一种防止语音误识别的方法的流程图;
图2是本发明实施例二提供的一种防止语音误识别的方法的流程图;
图3是本发明实施例三提供的一种防止语音误识别的方法的流程图;
图4是本发明实施例四提供的一种防止语音误识别的装置的结构图。
为了使本发明的目的、技术方案和优点更加清楚,下面结合附图对本发明具体实施例作进一步的详细描述。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。
另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
实施例一
图1为本发明实施例一提供的一种防止语音命令误识别的方法的流程图,本实施例的方法可以由防止语音误识别装置来执行,该装置可通过硬件和/或软件的方式实现,并一般可集成于具有语音命令控制功能且可以播放音频文件的
设备中,例如:手机、汽车等。本实施例的方法具体包括:
步骤110、获取与待播放歌曲匹配的歌词文件。
一般来说,在现有技术中,同时具有语音命令控制功能和音频文件播放功能的设备,在获取到播放音频文件的命令时,都是直接进行播放,而不会在播放前,进行减小由于播放歌曲导致的语音命令误识别的操作。
在本实施例中,在播放待播放歌曲前,会先获取与待播放歌曲匹配的歌词文件。其中,获取的方式具体可以是从本地存储的歌词文件中获取,也可以通过互联网络从存储有所需歌词文件的服务器中获取,本实施例对此不进行限制。
其中,歌词文件具体是指包含待播放歌曲的所有歌词以及每句歌词的起始时间等信息的文件。典型的可以是:后缀名为.LRC、.SNC以及.KRC等的文件。
另外,本方案中所说的歌词并不限定于歌手演唱的歌曲的歌词,也包括其它音频文件中可能导致误识别的内容,例如朗诵、演讲等以声音播放为显示方式,同时朗诵稿或演讲稿可以以歌词文件的方式体现的多媒体内容。
步骤120、查找歌词文件中的易误触发词组,其中,易误触发词组与预设语音控制命令的语言相同或相近。
在本实施例中,易误触发词组具体是指可能会引起预设语音控制命令误触发的词组,也就是发音与预设语音控制命令的语言的发音相同或相近的词组。其中,预设语音控制命令具体是指预先存储的,可以用来实施语音控制的语言。
由于歌词中可能会存在易误触发词组,导致歌曲在播放的过程中,引起语音控制命令误识别,做出错误的操作,因此,在本实施例中,获取待播放歌曲的歌词文件后,首先会查找该歌词文件中的歌词是否包含有易误触发词组。
其中,查找易误触发词组的具体方式可以是遍历歌词文件中的所有歌词查找与预设的语音控制命令中每个汉字的音调、声母以及韵母均相同的词组做为
易误触发词组,也可以是遍历歌词文件中的所有歌词查找与预设的语音控制命令中每个英文单词的音标均相同的词组做为易误触发词组等方式。其中,遍历歌词文件中的所有歌词查找易误触发词组的方式可以是在遍历一遍所有歌词的同时只针对一个预设语音控制命令查找与之对应的易误触发词组,也就是说,有多少个预设的语音控制命令就要遍历多少遍所有歌词,也可以是只遍历一遍所有歌词,在遍历的同时与所有的预设语音控制命令相比较查找易误触发词组,也就是说,每遍历到歌词中的任意一个字或词时都要与所有的预设语音控制命令进行对比。
另外需要说明的是,上面仅对歌词为汉语和英语的两种情况进行了说明,当歌词为汉语和英语以外的语言时,本实施例的方法同样适用,因为无论是哪一种语言,都对应有本语言特有的音素集,而本语言的所有单个字或单个词的发音都是由本语言特有的一个或多个音素构成,在查找易误触发词组时,就可以使用本语言特有的音素作为比对的基础,当某个字或某个词组与预设语音控制命令中每个字或每个词的音素都相同或相近时,则判定该字或该词组为易误触发词组。
步骤130、根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间。
在本实施例中,第一起始时间具体是指易误触发词组开始播放的时间,第一结束时间具体是指易误触发词组结束播放的时间,其中,第一起始时间和第一结束时间都是相对于待播放歌曲的起始播放时间计算出来的具体时间,待播放歌曲的起始播放时间可以记录为0分0秒0毫秒或0分0秒等时间格式。
在本实施例中,由于在查找易误触发词组时,可以同时获知该易误触发词组在歌词中的具体位置(例如:在第五句歌词的第3至第6个字),并且根据歌
词文件可以获知每句歌词的起始播放时间等时间信息,因此,根据易误触发词组在歌词中的具体位置以及每句歌词的起始播放时间等时间信息可以较为容易地计算出易误触发词组播放的第一起始时间和第一结束时间。
进一步地,由于不能保证每一句歌词都是匀速播放的,且歌词文件中一般不会详细记录每一个字或词的起始播放时间,一般只记录每句歌词的起始播放时间,所以,在计算第一起始时间和第一结束时间时,如果默认每一句歌词中的所有字或词都是匀速播放的,计算结果可能会跟易误触发词组实际的起始播放时间和结束播放时间有一定误差,因此,可以对计算得到的第一起始时间和第一结束时间略作调整,使他们更加接近易误触发词组实际的起始播放时间和结束播放时间。其中,调整的方式可以是设置补偿时间,将计算得到的第一起始时间减去该补偿时间,第一结束时间加上该补偿时间,第一起始时间和第一结束时间的补偿时间可以相同,也可以不相同,本实施例对此不进行限制。
步骤140、播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块。
在本实施例中,在完成计算易误触发词组播放的第一起始时间和第一结束时间后,开始播放待播放歌曲,在播放该歌曲时,当到达第一起始时间时,就会关闭语音识别模块,以防止易误触发词组的播放引起语音误识别,导致做出错误的操作,当到达第一结束时间时就会开启语音识别模块,以便实时进行语音控制命令的识别。
本发明实施例提供的防止语音命令误识别的方法,通过先获取与待播放歌曲匹配的歌词文件,然后查找歌词文件中的易误触发词组,计算易误触发词组播放的第一起始时间和第一结束时间,最后播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块,克服了
现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别。
实施例二
图2是本发明实施例二提供的一种防止语音命令误识别的方法的流程图。本实施例以上述实施例为基础进行优化,在本实施例中,将歌词文件优化为中文歌词文件;
将预设语音控制命令优化为汉语语音控制命令;
相应的,将查找歌词文件中的易误触发词组优化为:遍历中文歌词文件中所有中文歌词的发音属性,其中,发音属性至少包括音调、声母和韵母;如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性相同,则确认该汉字或汉字词组与汉语语音控制命令的语言相同;如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与汉语语音控制命令的语言相近;将一个汉字或一个汉字词组标记为易误触发词组。
进一步地,将根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间优化为:根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;根据第二起始时间、第二结束时间、歌词语句包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
进一步地,在播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块之后,还可以包括:保存易误触发词组和对应的第一起始时间和第一结束时间。
相应的,在根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间之前,还可以包括:确认歌词文件不存在已保存的易误触发词组。
相应的,在播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块之前,还可以包括:若存在已保存的易误触发词组,读取待播放歌曲中易误触发词组对应的第一起始时间和第一结束时间。
相应的,本实施例的方法具体包括:
步骤201、获取与待播放歌曲匹配的中文歌词文件。
在本实施例中,待播放歌曲的歌词为中文,匹配的歌词文件为中文歌词文件。
步骤202、判断中文歌词文件是否存在已保存的易误触发词组,若不存在,则执行步骤203,若存在,则执行步骤209。
在本实施例中,如果待播放歌曲之前播放过,那么就会存在已保存的易误触发词组以及对应的第一起始时间和第一结束时间,此时,就无需再查找中文歌词中的易误触发词组和计算易误触发词组播放的第一起始时间和第一结束时间,可以直接调用之前保存的相关内容。
步骤203、遍历中文歌词文件中所有中文歌词的发音属性,其中,发音属性至少包括音调、声母和韵母。
在本实施例中,如果中文歌词文件不存在已保存的易误触发词组,则要从中文歌词中查找易误触发词组,查找易误触发词组的具体方式为遍历中文歌词
中的每一个汉字的发音属性,根据该汉字与汉语语音控制命令的语言的发音属性的匹配程度,判定该汉字是否为或是否属于易误触发词组。
其中,发音属性具体是指由音调、声母和韵母等与发音相关的属性组成的属性集合。中文歌词中汉字的发音属性具体可以从中文歌词文件中获取,也可以通过互联网络从服务器中下载,本实施例对此不进行限制。
步骤204、确认与汉语语音控制命令的语言相同的汉字或汉字词组,具体地,如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性相同,则确认该汉字或汉字词组与汉语语音控制命令的语言相同。
在一个具体的例子中,当进行对比的汉语语音控制命令为“开”时,在遍历中文歌词文件时,查找到中文歌词文件中有一个汉字的发音属性与“开”字的发音属性相同,则将中文歌词文件中的该汉字确认为易误触发词组。
在一个具体的例子中,当进行对比的汉语语音控制命令为“增加音量”时,在遍历中文歌词文件时,查找到中文歌词文件中有一个汉字A的发音属性与“增”字的发音属性相同,则继续判断汉字A后面的汉字B的发音属性是否与“加”字相同,若不相同,则认为由汉字A和汉字B组成的词组不是对应“增加音量”的易误触发词组;若相同,则继续判断汉字B后面的汉字C的发音属性是否与“音”字的发音属性相同,若不相同,则认为由汉字A、B和C组成的词组不是对应“增加音量”的易误触发词组;若相同,则继续判断汉字C后面的汉字D的发音属性是否与“量”字的发音属性相同,若不相同,则认为由汉字A、B、C和D组成的词组不是对应“增加音量”的易误触发词组;若相同,则认为由汉字A、B、C和D组成的词组是对应“增加音量”的易误触发词组。
步骤205、确认与汉语语音控制命令的语言相近的汉字或汉字词组,具体地,如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与汉语语音控制命令的语言相近。
在本实施例中,在查找与汉语语音控制命令的语言相近的汉字或汉字词组时,只要该汉字或汉字词组的发音属性与汉语语音控制命令中对应位置的汉字的发音属性中至少有一种不同且至少有两种相同,就认为该汉字或汉字词组为易误触发词组。
举例而言,汉语语音控制命令为“关灯”,中文歌词中有紧邻的两个汉字A和B,汉字A的音调和声母与“关”字的音调和声母相同且汉字A的韵母与“关”字的韵母不同,汉字B的声母和韵母与“灯”字的声母和韵母相同且汉字B的音调与“灯”字的音调不同,则认为由汉字A和B组成的词组是对应“关灯”的易误触发词组。
相应的,判断中文歌词中的一个汉字或一个汉字词组是否是易误触发词组的具体方法与步骤204中所举的两个例子相同,在此不再详述,只是本步骤中该汉字或汉字词组的发音属性中至少有一种应与对应的汉语语音控制命令中对应位置的汉字不同且至少有两种应与对应的汉语语音控制命令中对应位置的汉字相同才满足判定为易误触发词组的条件。
步骤206、将一个汉字或一个汉字词组标记为易误触发词组。
在本实施例中,当确定中文歌词中的所有易误触发词组后,需要对这些易误触发词组进行标记,标记方法具体可以是直接在中文歌词文件中直接进行标注,也可以是将易误触发词组的相关信息存储在另外一个可识别的文件中,本实施例对此不进行限制。
步骤207、根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间。
在本实施例中,歌词语句播放的第二起始时间和第二结束时间具体是指该歌词语句播放的起始时间和结束时间,其中,第二起始时间和第二结束时间都是相对于待播放歌曲的起始播放时间计算出来的具体时间。
在本实施例中,在查找到易误触发词组的同时,会相应地记录下易误触发词组所属的歌词语句,以及其在该歌词语句中的位置。相应的,如果标记易误触发词组时,是直接在中文歌词文件中直接进行标注,那么很容易获知易误触发词组所属的歌词语句以及在该歌词语句中的位置;如果标记易误触发词组时,是将易误触发词组的相关信息存储在另外一个可识别的文件中,那么要在该文件中同时记录下易误触发词组所属的歌词语句以及在该歌词语句中的位置。
本领域技术人员可以理解的是,歌词文件中一般都会记录每一句歌词播放的起始时间,同时还会记录每一句歌词播放的时间长度或每一句歌词播放的结束时间,因此,当易误触发词组所属的歌词语句已经确定的情况下,根据歌词文件可以较为容易地获取或计算出易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间。但是,LRC歌词文件只记录每句歌词的播放起始时间而不记录每句歌词的结束时间或播放的时间长度,因此,当待播放歌曲匹配的歌词文件的类型为LRC文件时,则默认下一句歌词的播放起始时间为上一句歌词的播放结束时间。
步骤208、计算易误触发词组播放的第一起始时间和第一结束时间,具体地,根据第二起始时间、第二结束时间、歌词语句包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
在本实施例中,歌词单元具体是指组成歌词的基本单位,例如:中文歌词文件的歌词单元为汉字、英文歌词文件的歌词单元为英文单词等。
在一个具体的例子中,假设每一句歌词都是以匀速演唱,易误触发词组所在歌词语句的起始播放时间为t1,结束播放时间为t2,该歌词语句共有10个汉字,该易误触发词组位于该歌词语句的第3、4、5个字,那么,该易误触发词组的第一起始时间T1和第一结束时间T2的计算公式分别为:
T1=t1+2[(t2-t1)/10]、T2=t1+5[(t2-t1)/10]。
步骤209、读取待播放歌曲中易误触发词组对应的第一起始时间和第一结束时间。
在本实施例中,如果中文歌词文件存在已保存的易误触发词组,则无需重新查找易误触发词组,只需直接调用该已保存的易误触发词组。
步骤210、播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块。
步骤211、保存易误触发词组和对应的第一起始时间和第一结束时间。
在本实施例中,待播放歌曲播放完毕后,需要保存易误触发词组和对应的第一起始时间和第一结束时间,以便下次播放一首歌曲时直接调用。
本发明实施例提供的防止语音命令误识别的方法,通过先获取与待播放歌曲匹配的歌词文件,根据歌词文件是、否存在已保存的易误触发词组,分别进行直接读取易误触发词组及其对应的第一起始时间和第一结束时间的操作,以及通过遍历歌词中所有汉字的发音属性确定易误触发词组、获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间,并计算易误触发词组播放的第一起始时间和第一结束时间的操作,然后播放待播放歌曲并适时关、开语音识别模块,最后保存易误触发词组和对应的第一起始时间和第一结束时间,
克服了现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别。
实施例三
图3是本发明实施例三提供的一种防止语音命令误识别的方法的流程图。本实施例以上述实施例为基础进行优化,在本实施例中,将根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间优化为:根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;获取第一起始时间的第一补偿时间和第一结束时间的第二补偿时间;根据第二起始时间、第二结束时间、第一补偿时间、第二补偿时间、歌词语句包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
进一步地,还可以包括:待播放歌曲播放结束后,统计引起和未引起预设语音控制命令误识别的易误触发词组;修正易误触发词组对应的第一补偿时间和第二补偿时间,重新计算易误触发词组播放的第一起始时间和第一结束时间。
相应的,本实施例的方法具体包括:
步骤301、获取与待播放歌曲匹配的歌词文件。
步骤302、判断中文歌词文件是否存在已保存的易误触发词组,若不存在,则执行步骤303,若存在,则执行步骤307。
步骤303、查找歌词文件中的易误触发词组,其中,易误触发词组与预设语音控制命令的语言相同或相近。
步骤304、根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间。
步骤305、获取第一起始时间的第一补偿时间和第一结束时间的第二补偿时间。
根据实施例一中的说明可知,如果假设待播放歌曲是完全匀速播放的,那么按照这种情况计算出来的易误触发词组播放的第一起始时间和第一结束时间可能与实际情况有误差,因此,为了使易误触发词组播放的第一起始时间和第一结束时间更加准确,本实施例中增加了第一补偿时间和第二补偿时间,以对易误触发词组播放的第一起始时间和第一结束时间进行修正。
其中,第一补偿时间具体用于调整第一起始时间,第二补偿时间具体用于调整第一结束时间,第一补偿时间和第二补偿时间可以相同,也可以不同,本实施例对此不进行限制。第一补偿时间和第二补偿时间的具体数值可以是经验数值(例如:1秒钟等),也可在合理的范围内随意设置。
另外,由于LRC歌词文件只记录每句歌词的播放起始时间而不记录每句歌词的结束时间或播放的时间长度,因此,当待播放歌曲匹配的歌词文件的类型为LRC文件时,且当易误触发词组所在的歌词语句与下一歌词语句之间有音乐伴奏时,如果默认下一句歌词的播放起始时间为上一句歌词的播放结束时间,那么该上一句歌词默认的播放结束时间与实际的播放结束时间不相同,因此,按照默认的下一句歌词的播放起始时间为上一句歌词的播放结束时间计算出来的所需时间点与实际的时间点有误差,补偿时间的引入可以减小甚至消灭这种误差。
步骤306、计算易误触发词组播放的第一起始时间和第一结束时间,具体地,根据第二起始时间、第二结束时间、第一补偿时间、第二补偿时间、歌词语句
包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
在本实施例中,计算易误触发词组播放的第一起始时间T1’和第一结束时间T2’的方法为:首先计算出易误触发词组不考虑补偿时间时的播放的第一起始时间T1和第一结束时间T2,具体步骤可以参见步骤208中的具体说明,然后根据第一补偿时间T’和第二补偿时间T”计算T1’和T2’,公式为:
T1′=T1-T′,T2′=T2+T″,其中,T’和T”均为正数。
步骤307、读取待播放歌曲中易误触发词组对应的第一起始时间和第一结束时间。
步骤308、播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块。
步骤309、待播放歌曲播放结束后,统计引起和未引起预设语音控制命令误识别的易误触发词组。
在本实施例中,待播放歌曲播放结束后,会对引起和未引起预设语音控制命令误识别的易误触发词组进行统计。
步骤310、修正易误触发词组对应的第一补偿时间和第二补偿时间,重新计算易误触发词组播放的第一起始时间和第一结束时间。
在本实施例中,当易误触发词组在待播放歌曲的播放过程中引起了预设语音控制命令的误识别,则认为该易误触发词组对应的第一起始时间和第一结束时间不准确,需要进行调整。调整的方法具体可以是将第一补偿时间和第二补偿时间相应增大,两者增大的时间量可以相同,也可以不同,例如可以将第一补偿时间和第二补偿时间同时增加10%,然后使用增加后的第一补偿时间和第二补偿时间重新计算该易误触发词组播放的第一起始时间和第一结束时间。
在本实施例中,当易误触发词组在待播放歌曲的播放过程中没有引起了预设语音控制命令的误识别,则可以相应减小第一补偿时间和第二补偿时间的数值,两者减小的时间量可以相同,也可以不同,例如可以将第一补偿时间和第二补偿时间同时减小5%,然后使用减小后的第一补偿时间和第二补偿时间重新计算该易误触发词组播放的第一起始时间和第一结束时间。
步骤311、保存易误触发词组和对应的第一起始时间和第一结束时间。
本发明实施例提供的防止语音命令误识别的方法,通过先获取与待播放歌曲匹配的歌词文件,根据歌词文件是、否存在已保存的易误触发词组,分别进行直接读取易误触发词组对应的第一起始时间和第一结束时间的操作,以及通过遍历歌词中所有汉字的发音属性确定易误触发词组、获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间以及第一补偿时间和第二补偿使劲,并计算易误触发词组播放的第一起始时间和第一结束时间的操作,然后播放待播放歌曲并适时关、开语音识别模块,播放结束后统计易误触发词组是否引起语音识别误的情况并相应地对第一起始时间和第一结束时间进行修正,最后保存易误触发词组和对应的第一起始时间和第一结束时间,克服了现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别,并在播放歌曲的同时最大限度地开启语音识别模块。
实施例四
图4是本发明实施例四提供的一种防止语音命令误识别的装置的结构图。如图4所示,所述装置包括:歌词文件获取模块101、易误触发词组查找模块102、播放时间计算模块103和语音识别模块控制模块104。其中:
歌词文件获取模块101,用于获取与待播放歌曲匹配的歌词文件;
易误触发词组查找模块102,用于查找歌词文件中的易误触发词组,其中,易误触发词组与预设语音控制命令的语言相同或相近;
播放时间计算模块103,用于根据歌词文件,计算易误触发词组播放的第一起始时间和第一结束时间;
语音识别模块控制模块104,用于播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块。
本发明实施例提供的防止语音命令误识别的装置,通过先获取与待播放歌曲匹配的歌词文件,然后查找歌词文件中的易误触发词组,计算易误触发词组播放的第一起始时间和第一结束时间,最后播放待播放歌曲,在到达第一起始时间时关闭语音识别模块,在到达第一结束时间时启动语音识别模块,克服了现有技术中为了减小语音误触发的概率,进而增加语音识别算法的复杂度,导致处理器计算负担增加、设备功耗上升以及语音识别算法移植困难的技术缺陷,实现了无需提高语音识别算法的复杂度,也可以可靠地减少由于播放歌曲导致的语音误识别。
在上述各实施例的基础上,语音识别模块控制模块之后,还可以包括:
播放时间保存模块,用于保存易误触发词组和对应的第一起始时间和第一结束时间;
播放时间计算模块之前,还可以包括:
易误触发词组确认模块,用于确认歌词文件不存在已保存的易误触发词组;
语音识别模块控制模块之前,还可以包括:
播放时间读取模块,用于若存在已保存的易误触发词组,读取待播放歌曲中易误触发词组对应的第一起始时间和第一结束时间。
在上述各实施例的基础上,歌词文件可以为中文歌词文件;
预设语音控制命令可以为汉语语音控制命令;
易误触发词组查找模块可以包括:
歌词遍历单元,用于遍历中文歌词文件中所有中文歌词的发音属性,其中,发音属性至少包括音调、声母和韵母;
相同词组确认单元,用于如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性相同,则确认该汉字或汉字词组与汉语语音控制命令的语言相同;
相近词组确认单元,用于如果所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与汉语语音控制命令中对应位置的汉字的发音属性中至少有一种不同且至少有两种相同,则确认该汉字或所汉字词组与汉语语音控制命令的语言相近;
易误触发词组标记单元,用于将一个汉字或一个汉字词组标记为易误触发词组。
在上述各实施例的基础上,播放时间计算模块可以包括:
第二播放时间确定单元,用于根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;
第一播放时间计算单元,用于根据第二起始时间、第二结束时间、歌词语句包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
在上述各实施例的基础上,播放时间计算模块可以包括:
第二播放时间确定单元,用于根据歌词文件,获取易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;
补偿时间获取单元,用于获取第一起始时间的第一补偿时间和第一结束时间的第二补偿时间;
第二播放时间计算单元,用于根据第二起始时间、第二结束时间、第一补偿时间、第二补偿时间、歌词语句包含歌词单元的个数、易误触发词组包含歌词单元的个数和易误触发词组在歌词语句中的位置,计算易误触发词组播放的第一起始时间和第一结束时间。
在上述各实施例的基础上,还可以包括:
误识别统计模块,用于待播放歌曲播放结束后,统计引起和未引起预设语音控制命令误识别的易误触发词组;
补偿时间修正模块,用于修正易误触发词组对应的第一补偿时间和第二补偿时间,重新计算易误触发词组播放的第一起始时间和第一结束时间。
本发明实施例所提供的防止语音命令误识别的装置可用于执行本发明任意实施例提供的防止语音命令误识别的方法,具备相应的功能模块,实现相同的有益效果。
显然,本领域技术人员应该明白,上述的本发明的各模块或各步骤可以通过如上所述的服务器实施。可选地,本发明实施例可以用计算机装置可执行的程序来实现,从而可以将它们存储在存储装置中由处理器来执行,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储
器,磁盘或光盘等;或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件的结合。
以上所述仅为本发明的优选实施例,并不用于限制本发明,对于本领域技术人员而言,本发明可以有各种改动和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Claims (12)
- 一种防止语音命令误识别的方法,其特征在于,包括:获取与待播放歌曲匹配的歌词文件;查找所述歌词文件中的易误触发词组,其中,所述易误触发词组与预设语音控制命令的语言相同或相近;根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间;播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块。
- 根据权利要求1所述的方法,其特征在于,所述播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块之后,还包括:保存所述易误触发词组和对应的所述第一起始时间和所述第一结束时间;所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间之前,还包括:确认所述歌词文件不存在已保存的所述易误触发词组;所述播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块之前,还包括:若存在已保存的所述易误触发词组,读取所述待播放歌曲中所述易误触发词组对应的所述第一起始时间和所述第一结束时间。
- 根据权利要求1所述的方法,其特征在于,所述歌词文件为中文歌词文件;所述预设语音控制命令为汉语语音控制命令;所述查找所述歌词文件中的易误触发词组包括:遍历所述中文歌词文件中所有中文歌词的发音属性,其中,所述发音属性至少包括音调、声母和韵母;如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相同;如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相近;将所述一个汉字或所述一个汉字词组标记为易误触发词组。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间包括:根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;根据所述第二起始时间、所述第二结束时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
- 根据权利要求1-3任一项所述的方法,其特征在于,所述根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间包括:根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的所述第二起始时间和所述第二结束时间;获取所述第一起始时间的第一补偿时间和所述第一结束时间的第二补偿时间;根据所述第二起始时间、所述第二结束时间、所述第一补偿时间、所述第二补偿时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
- 根据权利要求5所述的方法,其特征在于,还包括:所述待播放歌曲播放结束后,统计引起和未引起所述预设语音控制命令误识别的所述易误触发词组;修正所述易误触发词组对应的所述第一补偿时间和所述第二补偿时间,重新计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
- 一种防止语音命令误识别的装置,其特征在于,包括:歌词文件获取模块,用于获取与待播放歌曲匹配的歌词文件;易误触发词组查找模块,用于查找所述歌词文件中的易误触发词组,其中,所述易误触发词组与预设语音控制命令的语言相同或相近;播放时间计算模块,用于根据所述歌词文件,计算所述易误触发词组播放的第一起始时间和第一结束时间;语音识别模块控制模块,用于播放所述待播放歌曲,在到达所述第一起始时间时关闭语音识别模块,在到达所述第一结束时间时启动所述语音识别模块。
- 根据权利要求7所述的装置,其特征在于,所述语音识别模块控制模块之后,还包括:播放时间保存模块,用于保存所述易误触发词组和对应的所述第一起始时间和所述第一结束时间;所述播放时间计算模块之前,还包括:易误触发词组确认模块,用于确认所述歌词文件不存在已保存的所述易误触发词组;所述语音识别模块控制模块之前,还包括:播放时间读取模块,用于若存在已保存的所述易误触发词组,读取所述待播放歌曲中所述易误触发词组对应的所述第一起始时间和所述第一结束时间。
- 根据权利要求7所述的装置,其特征在于,所述歌词文件为中文歌词文件;所述预设语音控制命令为汉语语音控制命令;所述易误触发词组查找模块包括:歌词遍历单元,用于遍历所述中文歌词文件中所有中文歌词的发音属性,其中,所述发音属性至少包括音调、声母和韵母;相同词组确认单元,用于如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相同;相近词组确认单元,用于如果所述所有中文歌词中的一个汉字或一个汉字词组中的各个汉字均与所述汉语语音控制命令中对应位置的汉字的所述发音属性中至少有一种不同且至少有两种相同,则确认该汉字或汉字词组与所述汉语语音控制命令的语言相近;易误触发词组标记单元,用于将所述一个汉字或所述一个汉字词组标记为易误触发词组。
- 根据权利要求7-9任一项所述的装置,其特征在于,所述播放时间计算模块包括:第二播放时间确定单元,用于根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的第二起始时间和第二结束时间;第一播放时间计算单元,用于根据所述第二起始时间、所述第二结束时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
- 根据权利要求7-9任一项所述的装置,其特征在于,所述播放时间计算模块包括:第二播放时间确定单元,用于根据所述歌词文件,获取所述易误触发词组所属的歌词语句播放的所述第二起始时间和所述第二结束时间;补偿时间获取单元,用于获取所述第一起始时间的第一补偿时间和所述第一结束时间的第二补偿时间;第二播放时间计算单元,用于根据所述第二起始时间、所述第二结束时间、所述第一补偿时间、所述第二补偿时间、所述歌词语句包含歌词单元的个数、所述易误触发词组包含歌词单元的个数和所述易误触发词组在所述歌词语句中的位置,计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
- 根据权利要求11所述的装置,其特征在于,还包括:误识别统计模块,用于所述待播放歌曲播放结束后,统计引起和未引起所述预设语音控制命令误识别的所述易误触发词组;补偿时间修正模块,用于修正所述易误触发词组对应的所述第一补偿时间和所述第二补偿时间,重新计算所述易误触发词组播放的所述第一起始时间和所述第一结束时间。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610909229.6 | 2016-10-18 | ||
CN201610909229.6A CN106409294B (zh) | 2016-10-18 | 2016-10-18 | 防止语音命令误识别的方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018072327A1 true WO2018072327A1 (zh) | 2018-04-26 |
Family
ID=58013014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/113279 WO2018072327A1 (zh) | 2016-10-18 | 2016-12-29 | 防止语音命令误识别的方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106409294B (zh) |
WO (1) | WO2018072327A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112509567A (zh) * | 2020-12-25 | 2021-03-16 | 北京百度网讯科技有限公司 | 语音数据处理的方法、装置、设备、存储介质及程序产品 |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102492727B1 (ko) * | 2017-12-04 | 2023-02-01 | 삼성전자주식회사 | 전자장치 및 그 제어방법 |
CN108231076A (zh) * | 2018-01-04 | 2018-06-29 | 广州视源电子科技股份有限公司 | 一种语音控制方法、装置、设备及存储介质 |
CN110827792B (zh) * | 2019-11-15 | 2022-06-03 | 广州视源电子科技股份有限公司 | 语音播报方法及装置 |
CN110970027B (zh) * | 2019-12-25 | 2023-07-25 | 博泰车联网科技(上海)股份有限公司 | 一种语音识别方法、装置、计算机存储介质及系统 |
CN116884399B (zh) * | 2023-09-06 | 2023-12-08 | 深圳市友杰智新科技有限公司 | 降低语音误识别的方法、装置、设备和介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6243683B1 (en) * | 1998-12-29 | 2001-06-05 | Intel Corporation | Video control of speech recognition |
CN1397063A (zh) * | 2000-11-27 | 2003-02-12 | 皇家菲利浦电子有限公司 | 对具有声音输出装置的设备进行控制的方法 |
CN101753871A (zh) * | 2008-11-28 | 2010-06-23 | 康佳集团股份有限公司 | 一种语音遥控电视机系统 |
CN102945672A (zh) * | 2012-09-29 | 2013-02-27 | 深圳市国华识别科技开发有限公司 | 一种多媒体设备语音控制系统及方法 |
US8738382B1 (en) * | 2005-12-16 | 2014-05-27 | Nvidia Corporation | Audio feedback time shift filter system and method |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101290767A (zh) * | 2007-04-20 | 2008-10-22 | 华硕电脑股份有限公司 | 具有语音识别功能的便携式计算机与其处理方法 |
CN101634987A (zh) * | 2008-07-21 | 2010-01-27 | 上海天统电子科技有限公司 | 多媒体播放器 |
CN101383150B (zh) * | 2008-08-19 | 2010-11-10 | 南京师范大学 | 语音软开关的控制方法及其在地理信息系统中的应用 |
CN101998138A (zh) * | 2009-08-25 | 2011-03-30 | 北京达鸣慧科技有限公司 | 电视频道监控系统及其实时监控方法 |
CN102118886A (zh) * | 2010-01-04 | 2011-07-06 | 中国移动通信集团公司 | 一种语音信息的识别方法和设备 |
JP2011215358A (ja) * | 2010-03-31 | 2011-10-27 | Sony Corp | 情報処理装置、情報処理方法及びプログラム |
CN102236686A (zh) * | 2010-05-07 | 2011-11-09 | 盛乐信息技术(上海)有限公司 | 语音分段式歌曲检索方法 |
CN102280106A (zh) * | 2010-06-12 | 2011-12-14 | 三星电子株式会社 | 用于移动通信终端的语音网络搜索方法及其装置 |
CN102006373B (zh) * | 2010-11-24 | 2015-01-28 | 深圳市车音网科技有限公司 | 基于语音命令控制的车载服务系统及方法 |
CN102332265B (zh) * | 2011-06-20 | 2014-04-16 | 浙江吉利汽车研究院有限公司 | 一种提高汽车声控系统语音识别率的方法 |
CN103151038A (zh) * | 2011-12-06 | 2013-06-12 | 张国鸿 | 在电子产品中实现语音识别操控的方法 |
CN103971685B (zh) * | 2013-01-30 | 2015-06-10 | 腾讯科技(深圳)有限公司 | 语音命令识别方法和系统 |
US20150088525A1 (en) * | 2013-09-24 | 2015-03-26 | Tencent Technology (Shenzhen) Co., Ltd. | Method and apparatus for controlling applications and operations on a terminal |
-
2016
- 2016-10-18 CN CN201610909229.6A patent/CN106409294B/zh active Active
- 2016-12-29 WO PCT/CN2016/113279 patent/WO2018072327A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6243683B1 (en) * | 1998-12-29 | 2001-06-05 | Intel Corporation | Video control of speech recognition |
CN1397063A (zh) * | 2000-11-27 | 2003-02-12 | 皇家菲利浦电子有限公司 | 对具有声音输出装置的设备进行控制的方法 |
US8738382B1 (en) * | 2005-12-16 | 2014-05-27 | Nvidia Corporation | Audio feedback time shift filter system and method |
CN101753871A (zh) * | 2008-11-28 | 2010-06-23 | 康佳集团股份有限公司 | 一种语音遥控电视机系统 |
CN102945672A (zh) * | 2012-09-29 | 2013-02-27 | 深圳市国华识别科技开发有限公司 | 一种多媒体设备语音控制系统及方法 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112509567A (zh) * | 2020-12-25 | 2021-03-16 | 北京百度网讯科技有限公司 | 语音数据处理的方法、装置、设备、存储介质及程序产品 |
CN112509567B (zh) * | 2020-12-25 | 2024-05-10 | 阿波罗智联(北京)科技有限公司 | 语音数据处理的方法、装置、设备、存储介质及程序产品 |
Also Published As
Publication number | Publication date |
---|---|
CN106409294B (zh) | 2019-07-16 |
CN106409294A (zh) | 2017-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018072327A1 (zh) | 防止语音命令误识别的方法和装置 | |
US8543395B2 (en) | Methods and systems for performing synchronization of audio with corresponding textual transcriptions and determining confidence values of the synchronization | |
US9858917B1 (en) | Adapting enhanced acoustic models | |
CN106463113B (zh) | 在语音辨识中预测发音 | |
US8972260B2 (en) | Speech recognition using multiple language models | |
US10204619B2 (en) | Speech recognition using associative mapping | |
EP2880652B1 (en) | Alignment of corresponding media content portions | |
US8731926B2 (en) | Spoken term detection apparatus, method, program, and storage medium | |
CN105632499B (zh) | 用于优化语音识别结果的方法和装置 | |
US9361879B2 (en) | Word spotting false alarm phrases | |
US20150112679A1 (en) | Method for building language model, speech recognition method and electronic apparatus | |
US20150058018A1 (en) | Multiple pass automatic speech recognition methods and apparatus | |
KR20180066216A (ko) | 외부 데이터 소스들을 사용한 스피치 재-인식 | |
Davel et al. | Validating smartphone-collected speech corpora | |
US10417345B1 (en) | Providing customer service agents with customer-personalized result of spoken language intent | |
JP4736478B2 (ja) | 音声書き起こし支援装置およびその方法ならびにプログラム | |
JP5451982B2 (ja) | 支援装置、プログラムおよび支援方法 | |
US20170270923A1 (en) | Voice processing device and voice processing method | |
JP5897718B2 (ja) | 音声検索装置、計算機読み取り可能な記憶媒体、及び音声検索方法 | |
JP6027754B2 (ja) | 適応化装置、音声認識装置、およびそのプログラム | |
US20140207454A1 (en) | Text reproduction device, text reproduction method and computer program product | |
Mertens et al. | Merging search spaces for subword spoken term detection. | |
JPWO2021059968A5 (zh) | ||
Seppi et al. | Template-Based Automatic Speech Recognition Meets Prosody. | |
CN115938348A (zh) | 配音效果确定方法、装置、电子设备及可读存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16919116 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 071019) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16919116 Country of ref document: EP Kind code of ref document: A1 |