Electronic device and method of controlling speech recognition by electronic device
An electronic device for adjusting a speech output rate (speech rate) of speech output data.
1. An electronic device comprising:
a speaker;
a microphone;
a processor; and
memory that stores computer-readable instructions,
wherein the processor, when executing the computer-readable instructions, is configured to control the electronic device to:
receive a speech input signal through the microphone,
obtain speech output data to be output in response to the received speech input signal,
identify a specific condition for an adjustment of a speech rate of a portion of the speech output data,
when the specific condition is a first predetermined condition, generate a first speech signal of the speech output data comprising the portion of the speech output data having an adjusted speech rate based on whether the portion of the speech output data is a consonant or a vowel and a remaining portion of the speech output data having a speech rate that is different from the adjusted speech rate,
when the specific condition is a second predetermined condition, generate a second speech signal of the speech output data comprising the portion of the speech output data having the adjusted speech rate based on whether the portion of the speech output data is a predetermined syllable in a predetermined word and the remaining portion of the speech output data having the speech rate that is different from the adjusted speech rate, and
output the first speech signal or the second speech signal through the speaker.
2. The electronic device of claim 1 , wherein the speech output data is generated by performing Automatic Speech Recognition (ASR) or Natural Language Understanding (NLU) processing on the speech input signal.
3. The electronic device of claim 2 , wherein the speech output data is generated by an external server performing the ASR or NLU processing on the speech input signal.
4. The electronic device of claim 1 , wherein the processor, when executing the computer-readable instructions, is configured to control the electronic device to generate the second speech signal comprising the portion of the speech output data having the adjusted speech rate by inserting a pause interval of a predetermined length between syllables included in the portion of the speech output data.
5. The electronic device of claim 1 , wherein the processor, when executing the computer-readable instructions, is configured to control the electronic device to identify a user of the electronic device from the speech input signal and generate the first or second speech signal of the speech output data based on identity of the user.
6. A method of controlling speech recognition by an electronic device, the method comprising:
receiving a speech input signal through a microphone;
obtaining speech output data to be output in response to the received speech input signal;
identifying a specific condition for an adjustment of a speech rate of a portion of the speech output data;
when the specific condition is a first predetermined condition, generating a first speech signal of the speech output data comprising the portion of the speech output data having an adjusted speech rate based on whether the portion of the speech output data is a consonant or a vowel and a remaining portion of the speech output data having a speech rate that is different from the adjusted speech rate;
when the specific condition is a second predetermined condition, generating a second speech signal of the speech output data comprising the portion of the speech output data having the adjusted speech rate based on whether the portion of the speech output data is a predetermined syllable in a predetermined word and the remaining portion of the speech output data having the speech rate that is different from the adjusted speech rate, and
outputting the first speech signal or the second speech signal through a speaker of the electronic device.
7. The method of claim 6 , wherein the speech output data is generated by performing Automatic Speech Recognition (ASR) or Natural Language Understanding (NLU) processing on the speech input signal.
8. The method of claim 7 , wherein the speech output data is generated by an external server performing the ASR and/or NLU processing on the speech input signal.
9. The method of claim 6 , wherein generating the second speech signal of the speech output data comprises inserting a pause interval of a predetermined length between syllables included in the portion of the speech output data.
10. The method of claim 6 , further comprising:
identifying a user of the electronic device from the received speech input signal; and
generating the first or second speech signal of the speech output data based on identity of the user.