A text segmentation method, device, equipment and storage medium

By acquiring and utilizing the speech pause characteristics of the target speaker to segment the text, the problem of text segmentation in the prior art that does not conform to the user's reading habits is solved, and a text segmentation effect consistent with the speech pause is achieved.

CN112686018BActive Publication Date: 2024-08-23UNIV OF SCI & TECH OF CHINA +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202011545165.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-23
Publication Date
2024-08-23
Estimated Expiration
2040-12-23

Smart Images

  • Figure CN112686018B
    Figure CN112686018B
Patent Text Reader

Abstract

The present application provides a text segmentation method, device, equipment and storage medium, wherein the method includes: obtaining the recognition text of the target speech of the target speaker as the target text to be segmented; obtaining the speech pause characteristics of the target speaker according to the target speech and the target text, wherein the speech pause characteristics of the target speaker can reflect the rhythmic changes of the target speaker; and segmenting the target text according to the speech pause characteristics of the target speaker. The text segmentation method provided by the present application can segment the target text into text segments that are more in line with the user's reading habits. In addition, since the speech pause characteristics of the target speaker can reflect the rhythmic changes of the target speaker, segmenting the target text based on the speech pause characteristics of the target speaker can obtain a text segmentation result that is consistent with the speech pauses of the target speaker.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a text segmentation method, apparatus, device and storage medium. Background Art

[0002] Text segmentation refers to dividing text into short text segments. Compared with long unsegmented text, segmented text segments are more in line with user reading habits. A text segment usually has a simple and clear theme. Segmenting long text into text segments can help users quickly extract key information and relieve reading pressure. How to achieve text segmentation is a problem that needs to be solved urgently. Summary of the invention

[0003] In view of this, the present application provides a text segmentation method, apparatus, device and storage medium for segmenting text into text segments that are more in line with user reading habits. The technical solution is as follows:

[0004] A text segmentation method, comprising:

[0005] Obtaining the recognized text of the target speech of the target speaker as the target text to be segmented;

[0006] Acquire speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker;

[0007] The target text is segmented according to the speech pause characteristics of the target speaker.

[0008] Optionally, the speech pause features include: inter-word pause features and inter-sentence pause features;

[0009] The acquiring the speech pause features of the target speaker according to the target speech and the target text comprises:

[0010] Acquire the pause durations corresponding to the respective words in the target text according to the target speech as the pause features between words of the target speaker, wherein the pause duration corresponding to a word is the time interval between the word and an adjacent word;

[0011] The pause durations corresponding to the respective sentences in the target text are obtained according to the target speech as inter-sentence pause features of the target speaker, wherein the pause duration corresponding to a sentence is the time interval between the sentence and an adjacent sentence.

[0012] Optionally, acquiring the pause durations corresponding to the respective words in the target text according to the target speech includes:

[0013] The pause durations corresponding to the respective words in the target text are determined according to the positions of the respective words in the target text and the adjacent words of the respective words in the target speech.

[0014] Optionally, acquiring the pause durations corresponding to the respective words in the target text according to the target speech includes:

[0015] Determining the pause durations corresponding to the sentences in the target text according to the positions of the first word of each sentence in the target text and the last word of the preceding adjacent sentence of each sentence in the target speech;

[0016] Alternatively, the pause durations corresponding to the respective sentences in the target text are determined according to the positions of the last word of the respective sentences in the target text and the first word of the backward adjacent sentences of the respective sentences in the target speech.

[0017] Optionally, segmenting the target text according to speech pause features of the target speaker includes:

[0018] Determine the statistical features of the pause duration corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word;

[0019] Determine the statistical features of the pause duration corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to the surrounding sentences of each sentence;

[0020] The target text is segmented according to the pause duration statistical features corresponding to each word in the target text and the pause duration statistical features corresponding to each sentence in the target text.

[0021] Optionally, determining the pause duration statistical features corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word includes:

[0022] For each target word in the target text:

[0023] Obtain a word string corresponding to the target word, and calculate the mean and variance of the pause durations corresponding to each word in the word string corresponding to the target word as the pause duration statistical feature corresponding to the target word, wherein the word string corresponding to the target word consists of the target word and surrounding words of the target word;

[0024] or,

[0025] Acquire multiple word strings of different lengths corresponding to the target word, calculate the mean and variance of the pause durations corresponding to each word in each word string corresponding to the target word, obtain multiple pause duration statistical features corresponding to the target word, and splice the multiple pause duration statistical features corresponding to the target word, and use the spliced ​​features as the pause duration statistical features finally corresponding to the target word.

[0026] Optionally, determining the pause duration statistical features corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause durations corresponding to surrounding sentences of each sentence includes:

[0027] For each target sentence in the target text:

[0028] Acquire a sentence sequence corresponding to the target sentence, and calculate the mean and variance of the pause durations corresponding to the sentences in the sentence sequence corresponding to the target sentence as the pause duration statistical features corresponding to the target sentence, wherein the sentence sequence corresponding to the target sentence consists of the target sentence and surrounding sentences of the target sentence;

[0029] or,

[0030] Acquire multiple sentence sequences of different lengths corresponding to the target sentence, calculate the mean and variance of the pause durations corresponding to each sentence in each sentence sequence corresponding to the target sentence, obtain multiple pause duration statistical features corresponding to the target sentence, and splice the multiple pause duration statistical features corresponding to the target sentence, and use the spliced ​​features as the pause duration statistical features finally corresponding to the target sentence.

[0031] Optionally, segmenting the target text according to the pause duration statistical features corresponding to each word in the target text and the pause duration statistical features corresponding to each sentence in the target text includes:

[0032] Segmenting the target text using the target text, the pause duration statistical features corresponding to each word in the target text, the pause duration statistical features corresponding to each sentence in the target text, and a pre-established text segmentation model;

[0033] The text segmentation model is trained using training text with segmentation annotations, statistical features of pause duration corresponding to each word in the training text, and statistical features of pause duration corresponding to each sentence in the training text.

[0034] Optionally, segmenting the target text by using the target text, the pause duration statistical feature corresponding to each word in the target text, the pause duration statistical feature corresponding to each sentence in the target text, and a pre-established text segmentation model includes:

[0035] For each target sentence in the target text, the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence are input into the text segmentation model to obtain the probability that the target sentence is a segmentation boundary, and determine whether the target sentence is a segmentation boundary according to the probability that the target sentence is a segmentation boundary;

[0036] The target text is segmented according to the determined segmentation boundaries.

[0037] Optionally, the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence are input into the text segmentation model to obtain the probability that the target sentence is a segmentation boundary, including:

[0038] Inputting the target sentence and the pause duration statistical features corresponding to each word in the target sentence into the word encoding module of the text segmentation model to obtain the semantic representation vector corresponding to each word in the target sentence;

[0039] Inputting the semantic representation vectors corresponding to each word in the target sentence into the sentence vector determination module of the text segmentation model to obtain the sentence vector corresponding to the target sentence;

[0040] Inputting the sentence vector corresponding to the target sentence and the pause duration statistical features corresponding to the target sentence into the sentence encoding module of the text segmentation model to obtain a target sentence vector corresponding to the target sentence that can characterize the semantics, speech speed and rhythm of the target sentence;

[0041] The target sentence vector corresponding to the target sentence is input into the probability determination module of the text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

[0042] A text segmentation device, comprising: a to-be-segmented text acquisition module, a speech pause feature acquisition module and a text segmentation module;

[0043] The to-be-segmented text acquisition module is used to acquire the recognized text of the target speech of the target speaker as the target text to be segmented;

[0044] The speech pause feature acquisition module is used to acquire the speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker;

[0045] The text segmentation module is used to segment the target text according to the speech pause characteristics of the target speaker.

[0046] Optionally, the speech pause features include: inter-word pause features and inter-sentence pause features;

[0047] The speech pause feature acquisition module includes: an inter-word pause feature acquisition submodule and an inter-sentence pause feature acquisition submodule;

[0048] The inter-word pause feature acquisition submodule is used to acquire the pause duration corresponding to each word in the target text according to the target speech as the inter-word pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding word and the adjacent word;

[0049] The inter-sentence pause feature acquisition submodule is used to obtain the pause duration corresponding to each sentence in the target text according to the target speech as the inter-sentence pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding sentence and the adjacent sentence.

[0050] A text segmentation device, comprising: a memory and a processor;

[0051] The memory is used to store programs;

[0052] The processor is used to execute the program to implement each step of any of the above-mentioned text segmentation methods.

[0053] A readable storage medium stores a computer program, and when the computer program is executed by a processor, each step of any of the above-mentioned text segmentation methods is implemented.

[0054] Through the above scheme, it can be known that the text segmentation method, device, equipment and storage medium provided by the present application, after obtaining the target text to be segmented (i.e., the recognized text of the target speech of the target speaker), first obtains the speech pause characteristics of the target speaker according to the target speech and the target text, and then segments the target text according to the speech pause characteristics of the target speaker. The text segmentation method provided by the present application can segment the target text into text segments that are more in line with the user's reading habits. In addition, since the speech pause characteristics of the target speaker can reflect the rhythm changes of the target speaker, therefore, segmenting the target text based on the speech pause characteristics of the target speaker can obtain a text segmentation result that is consistent with the speech pauses of the target speaker. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0056] Figure 1 A flowchart of a text segmentation method provided in an embodiment of the present application;

[0057] Figure 2 A schematic diagram of a flow chart of segmenting a target text using a target text, pause durations corresponding to respective sentences in the target text, pause durations corresponding to respective words in the target text, and a pre-established first text segmentation model provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of a flow chart of segmenting a target text according to speech pause characteristics of a target speaker provided in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of a process for segmenting a target text using a target text, a pause duration statistical feature corresponding to each word in the target text, a pause duration statistical feature corresponding to each sentence in the target text, and a pre-established second text segmentation model provided in an embodiment of the present application;

[0060] Figure 5 A schematic diagram of a process for establishing a second text segmentation model provided in an embodiment of the present application;

[0061] Figure 6 A schematic diagram of the topological structure of the second text segmentation model provided in an embodiment of the present application;

[0062] Figure 7A schematic diagram of the structure of a text segmentation device provided in an embodiment of the present application;

[0063] Figure 8 A schematic diagram of the structure of a text segmentation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] In order to achieve text segmentation, the inventor of this case conducted research, and the initial idea was:

[0066] The target text to be segmented is segmented by a text segmentation method based on linguistic features. The basic idea of ​​this segmentation method is to segment the target text to be segmented based on features such as clue words, named entities, and the occurrence of new words.

[0067] However, since features such as clue words, named entities, and new word occurrences do not have sufficient information for text segmentation, the segmentation effect of the text segmentation method based on linguistic features is not good. In addition, the segmentation method does not have good generalization ability.

[0068] In view of the poor effect of the text segmentation method based on linguistic features, the inventor of this case continued to study and then proposed a semantic-based text segmentation method, which segments the text to be segmented based on the semantics of the text to be segmented.

[0069] However, in the speech recognition scenario, the text to be segmented is speech recognition text. Since the speaker's speech content is random and the expression is highly colloquial, the extracted semantics may not be the semantics truly expressed by the text to be segmented. Performing text segmentation based on the extracted semantics will result in poor segmentation results.

[0070] In view of the problems existing in the above-mentioned semantic-based text segmentation method, the inventor of this case conducted further research and found that in the speech recognition scenario, speakers often modify their speaking speed and intonation to emphasize key points and topic switching by using techniques such as strengthening the tone and controlling the length of pauses. Based on this finding, the inventor of this case finally proposed a text segmentation method with better results through research. The basic concept of this text segmentation method is:

[0071] According to the text to be segmented and the speech corresponding to the text to be segmented, speech pause features that can reflect the prosody changes of the speaker are obtained, and the text to be segmented is segmented based on the speech pause features that reflect the prosody changes of the speaker. The segmentation result obtained by the segmentation method can be consistent with the speech pauses of the speaker.

[0072] The text segmentation method provided in the present application can be applied to electronic devices with processing capabilities, which electronic devices can be servers on the network side or terminals used on the user side, such as PCs, notebooks, smart phones, etc. The server on the network side or the terminal used on the user side can segment the text to be segmented according to the text segmentation method provided in the present application.

[0073] Next, the text segmentation method provided by the present application is introduced through the following embodiments.

[0074] First embodiment

[0075] See also Figure 1 , shows a flow chart of a text segmentation method provided by an embodiment of the present application, the method may include:

[0076] Step S101: obtaining the recognized text of the target speech of the target speaker as the target text to be segmented.

[0077] The target text to be segmented is generally a long text. In order to facilitate user reading, it is usually necessary to segment it into shorter text segments.

[0078] Step S102: Acquire speech pause features of the target speaker according to the target speech and the target text.

[0079] Among them, the speech pause characteristics of the target speaker can reflect the target speaker's speaking speed and rhythm changes.

[0080] Specifically, the speech pause features of the target speaker may include the pause features between words of the target speaker and the pause features between sentences of the target speaker.

[0081] It should be noted that the inter-word pause characteristics of the target speaker can reflect the overall speaking speed and rhythmic changes of the target speaker, and the inter-sentence pause characteristics of the target speaker can reflect the speaking speed of the target speaker at the sentence level.

[0082] Among them, the pause characteristics between words of the target speaker include the pause durations corresponding to each word in the target text. It should be noted that the pause duration corresponding to a word is the time interval between the word and an adjacent word. Optionally, the pause duration corresponding to a word can be the time interval between the word and a forward adjacent word. Of course, this embodiment is not limited thereto, and the pause duration corresponding to a word can also be the time interval between the word and a backward adjacent word.

[0083] Among them, the inter-sentence pause feature of the target speaker includes the pause duration corresponding to each sentence in the target text. It should be noted that the pause duration corresponding to a sentence is the time interval between the sentence and an adjacent sentence. Optionally, the pause duration corresponding to a sentence can be the time interval between the first word of the sentence and the last word of the sentence adjacent to the sentence in the front direction. Of course, this embodiment is not limited to this. The pause duration corresponding to a sentence can also be the time interval between the last word of the sentence and the first word of the sentence adjacent to the sentence in the back direction.

[0084] Step S103: segmenting the target text according to the speech pause characteristics of the target speaker.

[0085] In one possible implementation, the target text may be segmented directly according to the pause durations corresponding to the respective words in the target text and the pause durations corresponding to the respective sentences in the target text; in another possible implementation, the statistical features of the pause durations corresponding to the respective words in the target text may be first determined according to the pause durations corresponding to the respective words in the target text, and the statistical features of the pause durations corresponding to the respective sentences in the target text may be determined according to the pause durations corresponding to the respective sentences in the target text, and then the target text may be segmented according to the statistical features of the pause durations corresponding to the respective words in the target text and the statistical features of the pause durations corresponding to the respective sentences in the target text.

[0086] When segmenting the target text, it may be first determined whether each sentence in the target text is a segmentation boundary, and then the target text is segmented according to the determined segmentation boundaries.

[0087] The text segmentation method provided in the embodiment of the present application, after obtaining the target text to be segmented (i.e., the recognized text of the target speech of the target speaker), first obtains the speech pause characteristics of the target speaker according to the target speech and the target text, and then segments the target text according to the speech pause characteristics of the target speaker. The text segmentation method provided in the embodiment of the present application can segment the target text into text segments that are more in line with the user's reading habits. In addition, since the speech pause characteristics of the target speaker can reflect the speed and rhythm changes of the target speaker, therefore, segmenting the target text based on the speech pause characteristics of the target speaker can obtain a text segmentation result that is consistent with the speaker's speech pauses.

[0088] Second embodiment

[0089] This embodiment introduces the specific implementation process of "step S102: acquiring speech pause features of the target speaker according to the target speech and the target text" in the above embodiment.

[0090] According to the target speech and the target text, the process of obtaining the speech pause features of the target speaker may include:

[0091] Step a1: According to the target speech, the pause duration corresponding to each word in the target text is obtained as the pause feature between words of the target speaker.

[0092] Specifically, the pause duration corresponding to each word in the target text may be determined according to the positions of each word in the target text and the adjacent words of each word in the target speech.

[0093] More specifically, for each target word in the target text whose pause duration is to be determined, the number of speech frames between the target word and its adjacent words (such as the forward adjacent words) is determined according to the position of the target word in the target speech and the position of the adjacent words of the target word in the target speech, and the time interval between the target word and its adjacent words is determined according to the determined number of speech frames and the duration of the speech frames as the pause duration corresponding to the target word. It should be noted that when performing speech recognition on the target speech, the speech recognition model decodes each frame of the target speech into phonemes and corresponds to words, so that the position of each word in the audio can be obtained.

[0094] Taking into account that in some scenarios, the speaker may be interrupted for some reason, that is, there may be a long pause. In this case, after obtaining the pause duration corresponding to the target word in the above manner, it can be determined whether it is greater than the preset first duration threshold. If so, the pause duration corresponding to the target word is adjusted to the first duration threshold (for example, 5s), and then the adjusted pause duration is divided by the first duration threshold for normalization (the normalized pause duration is limited to between 0 and 1). If not, the pause duration corresponding to the target word is directly divided by the first duration threshold for normalization, and the normalized pause duration is used as the final pause duration corresponding to the target word.

[0095] Step a2: According to the target speech, the pause duration corresponding to each sentence in the target text is obtained as the inter-sentence pause feature of the target speaker.

[0096] The above embodiment mentioned that the pause duration corresponding to a sentence can be the time interval between the first word of the sentence and the last word of the previous adjacent sentence of the sentence. In this case, according to the target speech, the process of obtaining the pause duration corresponding to each sentence in the target text can include: determining the pause duration corresponding to each sentence in the target text according to the position of the first word of each sentence in the target text and the last word of the previous adjacent sentence of each sentence in the target speech.

[0097] More specifically, for each target sentence in the target text whose pause duration is to be determined, the number of speech frames between the first word of the target sentence and the last word of the previous adjacent sentence of the target sentence is determined according to the position of the first word of the target sentence in the target speech and the position of the last word of the previous adjacent sentence of the target sentence in the target speech, and the time interval between the first word of the target sentence and the last word of the previous adjacent sentence of the target sentence is determined according to the determined number of speech frames and the duration of the speech frames as the pause duration corresponding to the target sentence, so as to obtain the pause durations corresponding to each sentence in the target text.

[0098] The above embodiment mentioned that the pause duration corresponding to a sentence can also be the time interval between the last word of the sentence and the first word of the backward adjacent sentence of the sentence. In this case, according to the target speech, the process of obtaining the pause duration corresponding to each sentence in the target text can include: determining the pause duration corresponding to each sentence in the target text according to the position of the last word of each sentence in the target text and the first word of the backward adjacent sentence of each sentence in the target speech.

[0099] More specifically, for each target sentence in the target text whose pause duration is to be determined, the number of speech frames between the last word of the target sentence and the first word of the backward adjacent sentence of the target sentence is determined according to the position of the last word of the target sentence in the target speech and the position of the first word of the backward adjacent sentence of the target sentence in the target speech, and the time interval between the last word of the target sentence and the first word of the backward adjacent sentence of the target sentence is determined according to the determined number of speech frames and the duration of the speech frames as the pause duration corresponding to the target sentence, so as to obtain the pause durations corresponding to each sentence in the target text.

[0100] Preferably, after obtaining the pause duration corresponding to the target sentence in the above manner, it can be determined whether it is greater than a preset second duration threshold. If so, the pause duration corresponding to the target sentence is adjusted to the second duration threshold, and then the adjusted pause duration is divided by the second duration threshold for standardization (the standardized pause duration is limited to between 0 and 1). If not, the pause duration corresponding to the target sentence is directly divided by the second duration threshold for standardization, and the standardized pause duration is used as the final pause duration corresponding to the target sentence.

[0101] It should be noted that this embodiment does not limit the execution order of step a1 and step a2. Step a1 may be executed first and then step a2, or step a2 may be executed first and then step a1, or step a1 and step a2 may be executed in parallel.

[0102] Third embodiment

[0103] This embodiment introduces the specific implementation process of "Step S103: segmenting the target text according to the speech pause characteristics of the target speaker" in the first embodiment.

[0104] There are many ways to segment the target text according to the speech pause characteristics of the target speaker. This embodiment provides the following two optional implementation methods.

[0105] The first implementation method:

[0106] The process of segmenting the target text according to the speech pause characteristics of the target speaker may include: segmenting the target text directly according to the speech pause characteristics of the target speaker, that is, segmenting the target text directly according to the pause durations corresponding to each sentence in the target text and the pause durations corresponding to each word in the target text.

[0107] Specifically, the process of segmenting the target text directly according to the pause durations corresponding to the sentences in the target text and the pause durations corresponding to the words in the target text includes: segmenting the target text using the target text, the pause durations corresponding to the sentences in the target text, the pause durations corresponding to the words in the target text, and a pre-established first text segmentation model. The first text segmentation model is trained using training text with segmentation annotations, the pause durations corresponding to the words in the training text, and the pause durations corresponding to the sentences in the training text.

[0108] See also Figure 2 , shows a flow chart of segmenting the target text using the target text, the pause durations corresponding to the respective sentences in the target text, the pause durations corresponding to the respective words in the target text, and the pre-established first text segmentation model, which may include:

[0109] Step S201: For each target sentence in the target text, execute:

[0110] Step S2011: input the target sentence, the pause duration corresponding to the target sentence, and the pause duration corresponding to each word in the target sentence into the first text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

[0111] Step S2012: Determine whether the target sentence is a segmentation boundary based on the probability that the target sentence is a segmentation boundary.

[0112] Specifically, it is determined whether the probability that the target sentence is a segmentation boundary is greater than a preset probability threshold. If so, it is determined that the target sentence is a segmentation boundary. Otherwise, it is determined that the target sentence is not a segmentation boundary.

[0113] Step S202: Segment the target text according to the determined segmentation boundaries.

[0114] Specifically, a segmentation mark may be added at the beginning of a sentence that is a segmentation boundary.

[0115] After segmenting the target text according to the determined segmentation boundaries, a text segmentation result that is consistent with the speech pauses of the target speaker can be obtained.

[0116] The second implementation method:

[0117] In order to improve the text segmentation effect, this embodiment provides a second more preferred implementation method, please refer to Figure 3 , a flow chart of a second implementation method of segmenting a target text according to speech pause characteristics of a target speaker is shown, which may include:

[0118] Step S301a: Determine the statistical features of the pause duration corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word.

[0119] There are many implementation methods for step S301a. This embodiment provides the following two optional implementation methods:

[0120] The first implementation method: For each target word in the target text, execute:

[0121] Step b1: Obtain a word string corresponding to the target word.

[0122] The word string corresponding to the target word is composed of the target word and the surrounding words of the target word. For example, the word string composed of the target word and K-1 words before the target word can be used as the word string corresponding to the target word, wherein the value of K can be set according to the specific situation.

[0123] Step b2: Calculate the mean and variance of the pause durations corresponding to each word in the word string corresponding to the target word as the statistical features of the pause durations corresponding to the target word.

[0124] Assume the target word is w i,j (i.e., the jth word in the i-th sentence in the target text), the target word w i,j The corresponding word string includes K words, and the target word w can be calculated based on the following formula i,j The mean value μ of the pause duration corresponding to each word in the corresponding word string i,j and variance σ i,j :

[0125]

[0126]

[0127] Among them, t k The target word w i,j The pause duration corresponding to the kth word in the corresponding word string.

[0128] The second implementation method: For each target word in the target text, execute:

[0129] Step c1: Obtain multiple word strings of different lengths corresponding to the target word.

[0130] Considering that the word pause duration statistical feature determined based on a word string is not stable enough, in this implementation, multiple word strings of different lengths corresponding to the target word are obtained to obtain relatively stable pause duration statistical features based on multiple word strings of different lengths.

[0131] Step c2: Calculate the mean and variance of the pause durations corresponding to each word in each word string corresponding to the target word, and obtain multiple pause duration statistical features corresponding to the target word.

[0132] Assuming that N word strings of different lengths corresponding to the target word are obtained, N statistical features can be obtained through step e2.

[0133] It should be noted that the statistical features determined based on the pause duration corresponding to each word in a longer word string can reflect the overall speaking speed and rhythm changes of the target speaker, and the statistical features determined based on the pause duration corresponding to each word in a shorter word string can reflect the local speaking speed and rhythm changes of the target speaker.

[0134] Step c3: concatenate multiple pause duration statistical features corresponding to the target word, and use the concatenated features as the final pause duration statistical features corresponding to the target word.

[0135] Assume the target word is w i,j (i.e., the jth word in the i-th sentence in the target text), the target word w i,j There are l corresponding word strings, then the target word w i,j The final corresponding pause duration statistical characteristics can be expressed as:

[0136] D i,j ={[t i,j ,[Stat1,...Stat l ]]|Stat k =(μ i,j ,σ i,j ) 1≤k≤l}

[0137] Among them, Stat k =(μ i,j ,σ i,j ) represents the statistical feature determined according to the pause duration corresponding to each word in the k-th word string among l word strings.

[0138] Step S301b: Determine the statistical features of the pause duration corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to the surrounding sentences of each sentence.

[0139] Similar to step S301a, there are multiple implementations of step S301b. This embodiment provides the following two optional implementations:

[0140] The first implementation method: For each target sentence in the target text, execute:

[0141] Step d1: Obtain a sentence sequence corresponding to the target sentence.

[0142] The sentence sequence corresponding to the target sentence is composed of the target sentence and surrounding sentences of the target sentence. For example, the sentence sequence composed of the target sentence and M-1 sentences before the target sentence can be used as the sentence sequence corresponding to the target sentence, wherein the value of M can be set according to the specific situation.

[0143] Step d2: Calculate the mean and variance of the pause durations corresponding to each sentence in the sentence sequence corresponding to the target sentence as the statistical features of the pause durations corresponding to the target sentence.

[0144] Assume the target sentence is s i (i.e., the i-th sentence in the target text), the target sentence s i The corresponding sentence sequence includes M sentences, and the target sentence s can be calculated based on the following formula: i The mean pause duration μ of each sentence in the corresponding sentence sequence i and variance σ i :

[0145]

[0146]

[0147] Among them, t′ m The target sentence s i The pause duration corresponding to the mth sentence in the corresponding sentence sequence.

[0148] The second implementation method: For each target sentence in the target text, execute:

[0149] Step e1: Obtain multiple sentence sequences of different lengths corresponding to the target sentence.

[0150] The length of a sentence sequence refers to the number of sentences contained in the sentence sequence.

[0151] Considering that the pause duration statistical feature determined based on a sentence sequence is not stable enough, in this implementation, multiple sentence sequences of different lengths corresponding to the target sentence are obtained to obtain relatively stable pause duration statistical features based on multiple sentence sequences of different lengths.

[0152] Step e2: Calculate the mean and variance of the pause durations corresponding to each sentence in each sentence sequence corresponding to the target sentence, and obtain multiple pause duration statistical features corresponding to the target sentence.

[0153] Assuming that P sentence sequences of different lengths corresponding to the target sentence are obtained, P statistical features can be obtained through step e2.

[0154] Step e3: concatenate multiple pause duration statistical features corresponding to the target sentence, and use the concatenated features as the final pause duration statistical features corresponding to the target sentence.

[0155] Assume the target sentence is s i (i.e., the i-th sentence in the target text), the target sentence s i There are P corresponding sentence sequences, and the statistical characteristics of the pause duration corresponding to the target sentence can be expressed as:

[0156] E i ={[t′ i ,[Stat1,...Stat P ]]|Stat p =(μ i ,σ i ) 1≤p≤P}

[0157] Among them, Stat p =(μ i ,σ i ) 1≤p≤P It represents the statistical features determined according to the pause durations corresponding to the respective sentences in the p-th sentence sequence in the P sentence sequences.

[0158] It should be noted that this embodiment does not limit the execution order of step S301a and step S301b. Step S301a may be executed first and then step S301b, or step S301b may be executed first and then step S301a, or step S301a and step S301b may be executed in parallel.

[0159] Step S302: segmenting the target text according to the pause duration statistical features corresponding to each word in the target text and the pause duration statistical features corresponding to each sentence in the target text.

[0160] Specifically, according to the pause duration statistical features corresponding to each word in the target text and the pause duration statistical features corresponding to each sentence in the target text, the process of segmenting the target text includes: segmenting the target text using the target text, the pause duration statistical features corresponding to each word in the target text, the pause duration statistical features corresponding to each sentence in the target text, and a pre-established second text segmentation model. The second text segmentation model is trained using training text with segmentation annotations, the pause duration statistical features corresponding to each word in the training text, and the pause duration statistical features corresponding to each sentence in the training text.

[0161] See also Figure 4, shows a schematic diagram of a process of segmenting a target text using a target text, a pause duration statistical feature corresponding to each word in the target text, a pause duration statistical feature corresponding to each sentence in the target text, and a pre-established second text segmentation model, which may include:

[0162] Step S401: for each target sentence in the target text, execute:

[0163] Step S4011: input the target sentence, the pause duration statistical features corresponding to the target sentence, and the pause duration statistical features corresponding to each word in the target sentence into the second text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

[0164] Step S4012: Determine whether the target sentence is a segmentation boundary based on the probability that the target sentence is a segmentation boundary.

[0165] Specifically, it is determined whether the probability that the target sentence is a segmentation boundary is greater than a preset probability threshold. If so, it is determined that the target sentence is a segmentation boundary. Otherwise, it is determined that the target sentence is not a segmentation boundary.

[0166] Step S402: Segment the target text according to the determined segmentation boundaries.

[0167] Specifically, a segmentation mark may be added at the beginning of a sentence that is a segmentation boundary.

[0168] After segmenting the target text according to the determined segmentation boundaries, a text segmentation result that is consistent with the speaker's speech pauses can be obtained.

[0169] Fourth embodiment

[0170] It can be seen from the third embodiment that the segmentation boundary of the target text is determined based on a pre-established text segmentation model (the first text segmentation model or the second segmentation model). Next, the process of establishing the text segmentation model is introduced.

[0171] Since the processes of establishing the first text segmentation model and the second text segmentation model are similar, this embodiment takes the second text segmentation model as an example to introduce the process of establishing the second text segmentation model.

[0172] See also Figure 5 , showing a schematic diagram of a process of establishing a second text segmentation model, which may include:

[0173] Step S501: Acquire training text from a training text set.

[0174] Each training text in the training text set has a segmentation annotation.

[0175] Step S502a: Determine the pause duration corresponding to each word in the training text according to the training text and the training speech corresponding to the training text.

[0176] Step S502b: Determine the pause duration corresponding to each sentence in the training text according to the training text and the training speech corresponding to the training text.

[0177] The implementation process of step S502a is similar to the process of determining the pause duration corresponding to each word in the target text according to the target text and the target speech corresponding to the target text in the above embodiment. The implementation process of step S502b is similar to the process of determining the pause duration corresponding to each sentence in the target text according to the target text and the target speech corresponding to the target text in the above embodiment, which will not be repeated in this embodiment.

[0178] Step S503a: Determine the statistical features of the pause duration corresponding to each word in the training text according to the pause duration corresponding to each word in the training text and the pause duration corresponding to the surrounding words of each word.

[0179] Step S503b: Determine the statistical features of the pause duration corresponding to each sentence in the training text according to the pause duration corresponding to each sentence in the training text and the pause duration corresponding to the surrounding sentences of each sentence.

[0180] The implementation process of step S503a is similar to the process of determining the statistical features of the pause duration corresponding to each word in the target text according to the pause duration corresponding to each word and the pause duration corresponding to the surrounding words of each word in the above embodiment. The implementation process of step S503b is similar to the process of determining the statistical features of the pause duration corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to the surrounding sentences of each sentence in the above embodiment, which will not be elaborated in this embodiment.

[0181] Step S504: input each sentence in the training text, the pause duration statistical features corresponding to each sentence, and the pause duration statistical features corresponding to each word in each sentence into the second text segmentation model to obtain the probability that each sentence in the training text is a segmentation boundary.

[0182] In this embodiment, the training text may be segmented into several sentences based on terminal punctuation marks such as periods, exclamation marks, and question marks, and the probability of each sentence being a segmentation boundary may be predicted based on the second text segmentation model.

[0183] Step S505: Determine the prediction loss of the second text segmentation model according to the probability that each sentence in the training text is a segmentation boundary and the segmentation boundaries annotated in the training text.

[0184] Step S506: Update the parameters of the second text segmentation model according to the prediction loss of the second text segmentation model.

[0185] The training is iterated multiple times according to the above steps S501 to S505 until the training end condition is met. The second text segmentation model obtained after the training is completed can be used to segment the target text to be segmented.

[0186] In one possible implementation, Figure 6 As shown, the second text segmentation model may include: a word encoding module, a sentence vector determination module, a sentence encoding module and a probability determination module. On this basis, the process of "step S504, inputting each sentence in the training text, the pause duration statistical features corresponding to each sentence, and the pause duration statistical features corresponding to each word in each sentence into the second text segmentation model to obtain the probability that each sentence in the training text is a segmentation boundary" may include: for each training sentence in the training text:

[0187] Step S5041: input the training sentence and the pause duration statistical features corresponding to each word in the training sentence into the word encoding module of the second text segmentation model to obtain the semantic representation vector corresponding to each word in the training sentence.

[0188] Among them, the word encoding module may include a word embedding module and a semantic encoding module. The semantic encoding module may be a transformer structure. Each word in the training sentence is input into the word embedding module to obtain the word vector of each word in the training sentence. The word vector of each word in the training sentence, the position coding of each word in the training sentence and the statistical features of the pause duration corresponding to each word in the training sentence are concatenated and input into the semantic encoding module to obtain the semantic representation vector corresponding to each word in the training sentence. It should be noted that the semantic representation vector of a word can represent the semantics of the word.

[0189] Step S5042: input the semantic representation vectors corresponding to the respective words in the training sentence into the sentence vector determination module of the second text segmentation model to obtain the sentence vector corresponding to the training sentence.

[0190] Specifically, the sentence vector determination module can be a pooling layer, which inputs the semantic representation vectors corresponding to each word in the training sentence into the pooling layer for a maximum pooling operation (i.e., max pooling operation). Through the maximum pooling operation, the semantic representation vectors corresponding to each word in the training sentence can be compressed into a sentence vector of a fixed length.

[0191] Step S5043: input the sentence vector corresponding to the training sentence and the pause duration statistical features corresponding to the training sentence into the sentence encoding module of the second text segmentation model to obtain the target sentence vector corresponding to the training sentence, which can represent the semantics, morphemes and rhythm of the training sentence.

[0192] Specifically, the sentence encoding module may include a sentence encoder and a pause information encoder, wherein the sentence encoder determines a first attention score AttScore corresponding to the training sentence based on the sentence vector corresponding to the training sentence and the sentence vectors corresponding to other training sentences in the training text. s , first attention score AttScore s It can reflect the semantic relevance between the training sentence and other sentences in the training text. The pause information encoder determines the second attention score AttScore corresponding to the training sentence based on the pause duration statistical features corresponding to the training sentence and the pause duration statistical features corresponding to other sentences in the training text. pause , the second attention score AttScore pause It can reflect the correlation between the pause information of the training sentence and the pause information of other sentences in the training text. The sentence encoder is the first attention score AttScore s Weighted second attention score AttScore pause (i.e. AttScore s *AttScore pause ), determine the target sentence vector corresponding to the training sentence and capable of representing the semantics, speaking speed and rhythm of the training sentence according to the weighted attention score AttScore. Specifically, use AttScore to weight the concatenated vector of the sentence vector corresponding to the training sentence and the statistical feature of the pause duration corresponding to the sentence to obtain the target sentence vector corresponding to the training sentence.

[0193] Among them, the first attention score AttScore s and the first attention score AttScore pause It can be calculated based on the following formula:

[0194]

[0195]

[0196] Q in the above formula p , K p All are the input E of the pause information encoder i , E i is the pause duration statistical feature corresponding to the i-th sentence, Q s , K s All are the input of the sentence encoder [S i ,Ei ],[S i ,E i ] indicates S i With E i Splicing, S i is the sentence vector corresponding to the ith sentence, and T is the model training hyperparameter, which is used to control the sharpness of the attention score distribution of pause information encoding. The larger T is, the flatter the distribution is, that is, AttScore pause The smaller the impact on AttScore.

[0197] It should be noted that in order to constrain the model's attention to pause information, this embodiment sets the attention score AttScore of the pause information encoder to pause AttScore of the weighted sentence encoder s That is, the topic switching information conveyed by the speaker through the prosodic information adjusts the attention distribution of the sentence encoder, thereby forcing the model to pay attention to the semantic and prosodic information of the sentence at the same time, thereby improving the text segmentation effect.

[0198] Step S5044: input the target sentence vector corresponding to the training sentence into the probability determination module of the second text segmentation model to obtain the probability that the training sentence is a segmentation boundary.

[0199] Specifically, the probability determination module determines the probability that the training sentence is a segmentation boundary based on the softmax function.

[0200] It should be noted that the process of establishing the first text segmentation model only requires removing the above steps S503a and S503b, adjusting step S504 to "input each sentence in the training text, the pause duration corresponding to each sentence, and the pause duration corresponding to each word in each sentence into the first text segmentation model to obtain the probability that each sentence in the training text is a segmentation boundary", and adjusting the "second text segmentation model" in step S505 to the "first text segmentation model". In addition, the structure of the first text segmentation model is the same as the topological structure of the second text segmentation model, and the only difference is that the pause features used and processed in the two models are different.

[0201] After constructing the second text segmentation model, it can be used to segment the target text to be segmented. That is, for each target sentence in the target text, the target sentence, the statistical features of the pause duration corresponding to the target sentence, and the statistical features of the pause duration corresponding to each word in the target sentence are input into the second text segmentation model to obtain the probability that the target sentence is a segmentation boundary. According to the probability that the target sentence is a segmentation boundary, it is determined whether the target sentence is a segmentation boundary, and the target text is segmented according to the determined segmentation boundary.

[0202] Among them, the target sentence, the pause duration statistical features corresponding to the target sentence, and the pause duration statistical features corresponding to each word in the target sentence are input into the second text segmentation model to obtain the probability that the target sentence is a segmentation boundary. The process includes: inputting the target sentence and the pause duration statistical features corresponding to each word in the target sentence into the word encoding module of the second text segmentation model to obtain the semantic representation vectors corresponding to each word in the target sentence; inputting the semantic representation vectors corresponding to each word in the target sentence into the sentence vector determination module of the second text segmentation model to obtain the sentence vector corresponding to the target sentence; inputting the sentence vector corresponding to the target sentence and the pause duration statistical features corresponding to the target sentence into the sentence encoding module of the second text segmentation model to obtain the target sentence vector corresponding to the target sentence that can represent the semantics and rhythm of the target sentence; inputting the target sentence vector corresponding to the target sentence into the probability determination module of the second text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

[0203] It should be noted that the "second text segmentation model" in the process of segmenting the target text to be segmented using the second text segmentation model constructed above is replaced by the "first text segmentation model", and the "pause duration statistical feature" is replaced by "pause duration", which is the process of segmenting the target text to be segmented using the first text segmentation model constructed above.

[0204] Fifth embodiment

[0205] The embodiment of the present application also provides a text segmentation device. The text segmentation device provided in the embodiment of the present application is described below. The text segmentation device described below and the text segmentation method described above can be referenced to each other.

[0206] See also Figure 7 , shows a schematic diagram of the structure of the text segmentation device provided in an embodiment of the present application, which may include: a text acquisition module 701 for segmentation, a speech pause feature acquisition module 702 and a text segmentation module 703.

[0207] The to-be-segmented text acquisition module 701 is used to acquire the recognized text of the target speech of the target speaker as the to-be-segmented target text.

[0208] The speech pause feature acquisition module 702 is used to acquire the speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker.

[0209] The text segmentation module 703 is used to segment the target text according to the speech pause characteristics of the target speaker.

[0210] Optionally, the speech pause features include: inter-word pause features and inter-sentence pause features;

[0211] The speech pause feature acquisition module 702 includes: a word pause feature acquisition submodule and a sentence pause feature acquisition submodule. Among them:

[0212] The inter-word pause feature acquisition submodule is used to acquire the pause duration corresponding to each word in the target text according to the target speech as the inter-word pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding word and the adjacent word.

[0213] The inter-sentence pause feature acquisition submodule is used to obtain the pause duration corresponding to each sentence in the target text according to the target speech as the inter-sentence pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding sentence and the adjacent sentence.

[0214] Optionally, the inter-word pause feature acquisition submodule is specifically used to determine the pause duration corresponding to each word in the target text according to the positions of each word in the target text and the adjacent words of each word in the target speech.

[0215] Optionally, the inter-sentence pause feature acquisition submodule is specifically used to determine the pause duration corresponding to each sentence in the target text according to the position of the first word of each sentence in the target text and the last word of the forward adjacent sentence of each sentence in the target text in the target speech; or, determine the pause duration corresponding to each sentence in the target text according to the position of the last word of each sentence in the target text and the first word of the backward adjacent sentence of each sentence in the target speech.

[0216] Optionally, the text segmentation module 703 may include: a word pause statistical feature determination submodule, a sentence pause feature determination submodule and a text segmentation submodule.

[0217] The word pause statistical feature determination submodule is used to determine the pause duration statistical feature corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word.

[0218] The sentence pause feature determination submodule is used to determine the pause duration statistical features corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to surrounding sentences of each sentence.

[0219] The text segmentation submodule is used to segment the target text according to the statistical features of the pause duration corresponding to each word in the target text and the statistical features of the pause duration corresponding to each sentence in the target text.

[0220] Optionally, the word pause statistical feature determination submodule is specifically used for each target word in the target text:

[0221] A word string corresponding to the target word is obtained, and the mean and variance of the pause durations corresponding to each word in the word string corresponding to the target word are calculated as the pause duration statistical features corresponding to the target word, wherein the word string corresponding to the target word is composed of the target word and surrounding words of the target word; or, multiple word strings of different lengths corresponding to the target word are obtained, the mean and variance of the pause durations corresponding to each word in each word string corresponding to the target word are calculated, and multiple pause duration statistical features corresponding to the target word are obtained, and the multiple pause duration statistical features corresponding to the target word are spliced, and the spliced ​​features are used as the pause duration statistical features finally corresponding to the target word.

[0222] Optionally, the sentence pause feature determination submodule is specifically used for each target sentence in the target text:

[0223] A sentence sequence corresponding to the target sentence is obtained, and the mean and variance of the pause durations corresponding to each sentence in the sentence sequence corresponding to the target sentence are calculated as the pause duration statistical features corresponding to the target sentence, wherein the sentence sequence corresponding to the target sentence is composed of the target sentence and surrounding sentences of the target sentence; or, multiple sentence sequences of different lengths corresponding to the target sentence are obtained, the mean and variance of the pause durations corresponding to each sentence in each sentence sequence corresponding to the target sentence are calculated, and multiple pause duration statistical features corresponding to the target sentence are obtained, and the multiple pause duration statistical features corresponding to the target sentence are spliced, and the spliced ​​features are used as the pause duration statistical features finally corresponding to the target sentence.

[0224] Optionally, the text segmentation submodule is specifically used to segment the target text by using the target text, the statistical features of pause duration corresponding to each word in the target text, the statistical features of pause duration corresponding to each sentence in the target text, and a pre-established text segmentation model; wherein the text segmentation model is trained using training text with segmentation annotations, the statistical features of pause duration corresponding to each word in the training text, and the statistical features of pause duration corresponding to each sentence in the training text.

[0225] Optionally, the text segmentation submodule is specifically used to input the target sentence, the pause duration statistical features corresponding to the target sentence, and the pause duration statistical features corresponding to each word in the target sentence into the text segmentation model for each target sentence in the target text, to obtain the probability that the target sentence is a segmentation boundary, and determine whether the target sentence is a segmentation boundary according to the probability that the target sentence is a segmentation boundary;

[0226] The target text is segmented according to the determined segmentation boundaries.

[0227] Optionally, when the text segmentation submodule inputs the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence into the text segmentation model to obtain the probability that the target sentence is a segmentation boundary, it is specifically used to:

[0228] The target sentence and the pause duration statistical features corresponding to each word in the target sentence are input into the word encoding module of the text segmentation model to obtain the semantic representation vectors corresponding to each word in the target sentence; the semantic representation vectors corresponding to each word in the target sentence are input into the sentence vector determination module of the text segmentation model to obtain the sentence vector corresponding to the target sentence; the sentence vector corresponding to the target sentence and the pause duration statistical features corresponding to the target sentence are input into the sentence encoding module of the text segmentation model to obtain the target sentence vector corresponding to the target sentence that can represent the semantics, speaking speed and rhythm of the target sentence; the target sentence vector corresponding to the target sentence is input into the probability determination module of the text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

[0229] The text segmentation device provided in the embodiment of the present application, after obtaining the target text to be segmented (i.e., the recognized text of the target speech of the target speaker), first obtains the speech pause characteristics of the target speaker according to the target speech and the target text, and then segments the target text according to the speech pause characteristics of the target speaker. The text segmentation device provided in the embodiment of the present application can segment the target text into text segments that are more in line with the user's reading habits. In addition, since the speech pause characteristics of the target speaker can reflect the speed and rhythm changes of the target speaker, therefore, segmenting the target text based on the speech pause characteristics of the target speaker can obtain a text segmentation result that is consistent with the speaker's speech pauses.

[0230] Sixth embodiment

[0231] The present application also provides a text segmentation device. Figure 8, shows a schematic diagram of the structure of the text segmentation device, the text segmentation device may include: at least one processor 801, at least one communication interface 802, at least one memory 803 and at least one communication bus 804;

[0232] In the embodiment of the present application, the number of the processor 801, the communication interface 802, the memory 803, and the communication bus 804 is at least one, and the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804;

[0233] The processor 801 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention;

[0234] The memory 803 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0235] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0236] Obtaining the recognized text of the target speech of the target speaker as the target text to be segmented;

[0237] Acquire speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker;

[0238] The target text is segmented according to the speech pause characteristics of the target speaker.

[0239] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0240] Seventh embodiment

[0241] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0242] Obtaining the recognized text of the target speech of the target speaker as the target text to be segmented;

[0243] Acquire speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker;

[0244] The target text is segmented according to the speech pause characteristics of the target speaker.

[0245] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0246] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0247] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0248] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text segmentation method, It is characterized in that include: Obtaining the recognized text of the target speech of the target speaker as the target text to be segmented; Acquire speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker; Segmenting the target text according to the speech pause characteristics of the target speaker; The step of segmenting the target text according to the speech pause characteristics of the target speaker includes: segmenting the target text according to the pause duration statistical characteristics corresponding to each word in the target text and the pause duration statistical characteristics corresponding to each sentence in the target text; The target text is segmented according to the pause duration statistical feature corresponding to each word in the target text and the pause duration statistical feature corresponding to each sentence in the target text, including: For each target sentence in the target text, the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence are input into a pre-established text segmentation model to obtain the probability that the target sentence is a segmentation boundary, determine whether the target sentence is a segmentation boundary according to the probability that the target sentence is a segmentation boundary, and segment the target text according to the determined segmentation boundary; The text segmentation model is trained using training text with segmentation annotations, as well as statistical features of pause duration corresponding to each word in the training text and statistical features of pause duration corresponding to each sentence in the training text; The step of inputting the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence into the text segmentation model to obtain the probability that the target sentence is a segmentation boundary includes: Inputting the target sentence and the pause duration statistical features corresponding to each word in the target sentence into the word encoding module of the text segmentation model to obtain the semantic representation vector corresponding to each word in the target sentence; Inputting the semantic representation vectors corresponding to each word in the target sentence into the sentence vector determination module of the text segmentation model to obtain the sentence vector corresponding to the target sentence; Inputting the sentence vector corresponding to the target sentence and the pause duration statistical features corresponding to the target sentence into the sentence encoding module of the text segmentation model to obtain a target sentence vector corresponding to the target sentence that can characterize the semantics, speech speed and rhythm of the target sentence; The target sentence vector corresponding to the target sentence is input into the probability determination module of the text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

2. The text segmentation method according to claim 1, It is characterized in that The speech pause features include: pause features between words and pause features between sentences; The acquiring the speech pause features of the target speaker according to the target speech and the target text comprises: Acquire the pause durations corresponding to the respective words in the target text according to the target speech as the pause features between words of the target speaker, wherein the pause duration corresponding to a word is the time interval between the word and an adjacent word; The pause durations corresponding to the respective sentences in the target text are obtained according to the target speech as inter-sentence pause features of the target speaker, wherein the pause duration corresponding to a sentence is the time interval between the sentence and an adjacent sentence.

3. The text segmentation method according to claim 2, It is characterized in that The step of obtaining the pause durations corresponding to the respective words in the target text according to the target speech includes: The pause durations corresponding to the respective words in the target text are determined according to the positions of the respective words in the target text and the adjacent words of the respective words in the target speech.

4. The text segmentation method according to claim 2, It is characterized in that The step of obtaining the pause durations corresponding to the respective sentences in the target text according to the target speech includes: Determining the pause durations corresponding to the sentences in the target text according to the positions of the first word of each sentence in the target text and the last word of the preceding adjacent sentence of each sentence in the target speech; or, The pause duration corresponding to each sentence in the target text is determined according to the position of the last word of each sentence in the target text and the first word of the backward adjacent sentence of each sentence in the target speech.

5. The text segmentation method according to claim 2, It is characterized in that The step of segmenting the target text according to the speech pause characteristics of the target speaker further comprises: Determine the statistical features of the pause duration corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word; According to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to surrounding sentences of each sentence, the statistical features of the pause duration corresponding to each sentence in the target text are determined.

6. The text segmentation method according to claim 5, It is characterized in that Determining the statistical features of the pause duration corresponding to each word in the target text according to the pause duration corresponding to each word in the target text and the pause duration corresponding to the surrounding words of each word includes: For each target word in the target text: Obtain a word string corresponding to the target word, and calculate the mean and variance of the pause durations corresponding to each word in the word string corresponding to the target word as the pause duration statistical feature corresponding to the target word, wherein the word string corresponding to the target word consists of the target word and surrounding words of the target word; or, Acquire multiple word strings of different lengths corresponding to the target word, calculate the mean and variance of the pause durations corresponding to each word in each word string corresponding to the target word, obtain multiple pause duration statistical features corresponding to the target word, and splice the multiple pause duration statistical features corresponding to the target word, and use the spliced ​​features as the pause duration statistical features finally corresponding to the target word.

7. The text segmentation method according to claim 5, It is characterized in that Determining the statistical features of the pause duration corresponding to each sentence in the target text according to the pause duration corresponding to each sentence in the target text and the pause duration corresponding to the surrounding sentences of each sentence includes: For each target sentence in the target text: Acquire a sentence sequence corresponding to the target sentence, and calculate the mean and variance of the pause durations corresponding to the sentences in the sentence sequence corresponding to the target sentence as the pause duration statistical features corresponding to the target sentence, wherein the sentence sequence corresponding to the target sentence consists of the target sentence and surrounding sentences of the target sentence; or, Acquire multiple sentence sequences of different lengths corresponding to the target sentence, calculate the mean and variance of the pause durations corresponding to each sentence in each sentence sequence corresponding to the target sentence, obtain multiple pause duration statistical features corresponding to the target sentence, and splice the multiple pause duration statistical features corresponding to the target sentence, and use the spliced ​​features as the pause duration statistical features finally corresponding to the target sentence.

8. A text segmentation device, It is characterized in that include: A module for acquiring text to be segmented, a module for acquiring speech pause features, and a module for segmenting text; The to-be-segmented text acquisition module is used to acquire the recognized text of the target speech of the target speaker as the target text to be segmented; The speech pause feature acquisition module is used to acquire the speech pause features of the target speaker according to the target speech and the target text, wherein the speech pause features of the target speaker can reflect the speech speed and rhythm changes of the target speaker; The text segmentation module is used to segment the target text according to the speech pause characteristics of the target speaker; The text segmentation module includes: a text segmentation submodule, which is used to segment the target text according to the pause duration statistical features corresponding to each word in the target text and the pause duration statistical features corresponding to each sentence in the target text; The text segmentation submodule is specifically used to input the target sentence, the pause duration statistical features corresponding to the target sentence, and the pause duration statistical features corresponding to each word in the target sentence into a pre-established text segmentation model for each target sentence in the target text, obtain the probability that the target sentence is a segmentation boundary, determine whether the target sentence is a segmentation boundary according to the probability that the target sentence is a segmentation boundary, and segment the target text according to the determined segmentation boundary; The text segmentation model is trained using training text with segmentation annotations, as well as statistical features of pause duration corresponding to each word in the training text and statistical features of pause duration corresponding to each sentence in the training text; The text segmentation submodule is specifically used to input the target sentence, the pause duration statistical feature corresponding to the target sentence, and the pause duration statistical feature corresponding to each word in the target sentence into the text segmentation model to obtain the probability that the target sentence is a segmentation boundary: The target sentence and the pause duration statistical features corresponding to each word in the target sentence are input into the word encoding module of the text segmentation model to obtain the semantic representation vectors corresponding to each word in the target sentence; the semantic representation vectors corresponding to each word in the target sentence are input into the sentence vector determination module of the text segmentation model to obtain the sentence vector corresponding to the target sentence; the sentence vector corresponding to the target sentence and the pause duration statistical features corresponding to the target sentence are input into the sentence encoding module of the text segmentation model to obtain the target sentence vector corresponding to the target sentence that can represent the semantics, speaking speed and rhythm of the target sentence; the target sentence vector corresponding to the target sentence is input into the probability determination module of the text segmentation model to obtain the probability that the target sentence is a segmentation boundary.

9. The text segmentation device according to claim 8, It is characterized in that The speech pause features include: pause features between words and pause features between sentences; The speech pause feature acquisition module includes: an inter-word pause feature acquisition submodule and an inter-sentence pause feature acquisition submodule; The inter-word pause feature acquisition submodule is used to acquire the pause duration corresponding to each word in the target text according to the target speech as the inter-word pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding word and the adjacent word; The inter-sentence pause feature acquisition submodule is used to obtain the pause duration corresponding to each sentence in the target text according to the target speech as the inter-sentence pause feature of the target speaker, wherein the pause duration is the time interval between the corresponding sentence and the adjacent sentence.

10. A text segmentation device, It is characterized in that include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the text segmentation method according to any one of claims 1 to 7.

11. A readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, each step of the text segmentation method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Cold start entity real-time embedding generation method and system based on time sequence constraint

    CN122347135A