Audio playing method, electronic device, and storage medium
AssigneeNetease (Hangzhou) Network Co., Ltd.
InventorsXiang Gao, Jing Sun
Life of this patent
Estimating the term…
Abstract
The present application provides an audio playing method, an electronic device, and a computer readable storage medium. The method comprises: recognizing an audio file to be played as a text file containing sentence segmentation symbols; generating respective sentence segmentation tags at positions corresponding to the sentence segmentation symbols in the audio file, according to a correspondence relationship between the audio file and the text file; in response to a trigger operation, determining a target play point according to a current play position of the audio file and respective positions of the sentence segmentation tags; and playing the audio file from the target play point.
Claims20
An audio playing method, comprising,
- recognizing an audio file to be played as a text file containing sentence segmentation symbols;
- generating respective sentence segmentation tags at positions corresponding to the sentence segmentation symbols in the audio file, according to a correspondence relationship between the audio file and the text file;
- in response to a return operation during an audio playing process, determining a target play point according to a current play position of the audio file and respective positions of the sentence segmentation tags, wherein the target play point is a starting point of a part in the audio file to be played repeatedly, and the current play position is a position where a frame of the audio file is currently played during the audio playing process;
- and
- playing the audio file from the target play point;
- wherein the in response to the return operation during the audio playing process, determining the target play point according to the current play position of the audio file and the respective positions of the sentence segmentation tags comprises:
- determining, according to a character interval between a text character corresponding to the current play position of the audio file and a preceding sentence segmentation symbol adjacent to the text character corresponding to the current play position of the audio file, the target play point from which the audio file is played repeatedly;
- or
- determining, according to a time interval between a play time of the current play position of the audio file and a play time of a preceding sentence segmentation tag adjacent to the current play position of the audio file, the target play point from which the audio file is played repeatedly.
An audio playing method, wherein,
- in response to a trigger operation, detecting whether a speech rate of an audio file to be played is less than a preset speech rate;
- in response to detecting that the speech rate of the audio file to be played is less than the preset speech rate, recognizing the audio file to be played as a text file containing sentence segmentation symbols;
- generating respective sentence segmentation tags at positions corresponding to the sentence segmentation symbols in the audio file, according to a correspondence relationship between the audio file and the text file;
- in response to detecting that the speech rate of the audio file to be played is greater than or equal to the preset speech rate, generating a corresponding sentence segmentation tag in the audio file according to an audio pause duration;
- in response to a return operation during an audio playing process, determining a target play point according to a current play position of the audio file and respective positions of the sentence segmentation tags, wherein the target play point is a starting point of a part in the audio file to be played repeatedly, and the current play position is a position where a frame of the audio file is currently played during the audio playing process;
- and
- playing the audio file from the target play point;
- wherein the in response to the return operation during the audio playing process, determining the target play point according to the current play position of the audio file and the respective positions of the sentence segmentation tags comprises:
- determining, according to a character interval between a text character corresponding to the current play position of the audio file and a preceding sentence segmentation symbol adjacent to the text character corresponding to the current play position of the audio file, the target play point from which the audio file is played repeatedly;
- or
- determining, according to a time interval between a play time of the current play position of the audio file and a play time of a preceding sentence segmentation tag adjacent to the current play position of the audio file, the target play point from which the audio file is played repeatedly.
An electronic device, comprising:
- a processor;
- memory for storing instructions executable by the processor;
- wherein the processor is configured to:
- recognize an audio file to be played as a text file containing sentence segmentation symbols;
- generate respective sentence segmentation tags at positions corresponding to the sentence segmentation symbols in the audio file, according to a correspondence relationship between the audio file and the text file;
- in response to a return operation during an audio playing process, determine a target play point according to a current play position of the audio file and respective positions of the sentence segmentation tags, wherein the target play point is a starting point of a part in the audio file to be played repeatedly, and the current play position is a position where a frame of the audio file is currently played during the audio playing process;
- and
- play the audio file from the target play point;
- wherein the processor is specifically configured to:
- determine, according to a character interval between a text character corresponding to the current play position of the audio file and a preceding sentence segmentation symbol adjacent to the text character corresponding to the current play position of the audio file, the target play point from which the audio file is played repeatedly;
- or
- determine, according to a time interval between a play time of the current play position of the audio file and a play time of a preceding sentence segmentation tag adjacent to the current play position of the audio file, the target play point from which the audio file is played repeatedly.
Dependencies are inferred from the claim text.