CN113889113A - Sentence dividing method and device, storage medium and electronic equipment - Google Patents

Sentence dividing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113889113A
CN113889113A CN202111327536.0A CN202111327536A CN113889113A CN 113889113 A CN113889113 A CN 113889113A CN 202111327536 A CN202111327536 A CN 202111327536A CN 113889113 A CN113889113 A CN 113889113A
Authority
CN
China
Prior art keywords
time interval
speaker
audio data
target audio
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111327536.0A
Other languages
Chinese (zh)
Inventor
孙修松
刘艺
何怡
马泽君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202111327536.0A priority Critical patent/CN113889113A/en
Publication of CN113889113A publication Critical patent/CN113889113A/en
Priority to PCT/CN2022/130352 priority patent/WO2023083142A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/04Segmentation; Word boundary detection
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L17/00Speaker identification or verification
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/226Procedures used during a speech recognition process, e.g. man-machine dialogue using non-speech characteristics
    • G10L2015/227Procedures used during a speech recognition process, e.g. man-machine dialogue using non-speech characteristics of the speaker; Human-factor methodology

Abstract

The disclosure relates to a sentence dividing method, a sentence dividing device, a storage medium and an electronic device. The method comprises the following steps: acquiring target audio data; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; and segmenting the speaker of the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment to obtain a sentence segmentation result. Therefore, the time interval information of the speaker and the time interval corresponding to each character in the voice recognition text in the target audio data can be effectively utilized to segment the speaker for the voice recognition text, so that the reasonable and effective segmentation of the conversion part of the speaker is realized, the condition that a single sentence contains the speaking contents of a plurality of speakers is avoided, and the sentence segmentation effect is improved.

Description

Sentence dividing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of speech recognition technologies, and in particular, to a sentence segmentation method, an apparatus, a storage medium, and an electronic device.
Background
In a video subtitle scene voice recognition application, a recognized text needs to be divided into sentences for split screen display. In addition, in order to ensure the readability of the subtitles, a single sentence is often required to only contain one speaker, and the situation that the single-screen subtitles contain the speaking contents of different speakers at the same time is avoided. The conventional sentence segmentation method only combines the semantic information of the speech recognition text and segments the semantic turning part. The method has good effect on the video of a single speaker, but for the conversation scene video of multiple speakers, the segmentation effect at the conversion position of the speakers is poor due to the fact that the semantic information is used only, and the situation that a single sentence contains the speaking content of the multiple speakers occurs.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a sentence segmentation method, including:
acquiring target audio data;
extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data;
carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data;
and carrying out speaker segmentation on the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment to obtain a sentence segmentation result.
In a second aspect, the present disclosure provides a sentence segmentation apparatus, comprising:
the acquisition module is used for acquiring target audio data;
the extraction module is used for extracting the voice recognition text corresponding to the target audio data acquired by the acquisition module and a first time period corresponding to each recognition character in the target audio data in the voice recognition text;
the first segmentation module is used for carrying out speaker segmentation on the target audio data acquired by the acquisition module to obtain a second time interval corresponding to each speaking segment in the target audio data;
and the second segmentation module is used for segmenting the speaker of the voice recognition text according to the first time interval corresponding to each recognition character extracted by the extraction module and the second time interval corresponding to each speaking segment obtained by the first segmentation module to obtain a sentence segmentation result.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method provided by the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having one or more computer programs stored thereon;
one or more processing devices for executing the one or more computer programs in the storage device to implement the steps of the method provided by the first aspect of the present disclosure.
In the technical scheme, target audio data are obtained; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; meanwhile, carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; then, according to the first time interval corresponding to each identification character and the second time interval corresponding to each speaking segment, carrying out speaker segmentation on the voice identification text to obtain a sentence segmentation result. Therefore, the time interval information of the speaker and the time interval corresponding to each character in the voice recognition text in the target audio data can be effectively utilized to segment the speaker for the voice recognition text, so that the reasonable and effective segmentation of the conversion part of the speaker is realized, the condition that a single sentence contains the speaking contents of a plurality of speakers is avoided, and the sentence segmentation effect is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram illustrating a method of clauseing according to an exemplary embodiment.
Fig. 2 is a flow diagram illustrating a method of clauseing according to another exemplary embodiment.
Fig. 3 is a flow chart illustrating a method of clauseing according to another exemplary embodiment.
Fig. 4 is a block diagram illustrating a sentence segmentation apparatus in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
FIG. 1 is a flow diagram illustrating a method of clauseing according to an exemplary embodiment. As shown in fig. 1, the method may include S101 to S104.
In S101, target audio data is acquired.
In the present disclosure, the target audio data may include a plurality of speaker voice segments. Illustratively, the target audio data may be a multi-speaker conversation recording or an audio clip in a multi-speaker conversation scene video.
In S102, a speech recognition text corresponding to the target audio data and a first time period corresponding to each recognition character in the speech recognition text in the target audio data are extracted.
In the present disclosure, an Automatic Speech Recognition (ASR) technique may be utilized to perform Speech Recognition on the target audio data to obtain a Speech Recognition text and a start time and an end time, i.e., a first time period, corresponding to each character (referred to as a Recognition character herein) in the Speech Recognition text in the target audio data.
In S103, speaker segmentation is performed on the target audio data to obtain a second time period corresponding to each speaking segment in the target audio data.
In the present disclosure, performing speaker segmentation on a target audio refers to detecting a speaker transition point in target audio data, and taking a voice between two adjacent speaker transition points as a speaking segment.
In S104, according to the first time interval corresponding to each identification character and the second time interval corresponding to each speaking segment, carrying out speaker segmentation on the voice identification text to obtain a sentence segmentation result.
In the technical scheme, target audio data are obtained; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; meanwhile, carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; then, according to the first time interval corresponding to each identification character and the second time interval corresponding to each speaking segment, carrying out speaker segmentation on the voice identification text to obtain a sentence segmentation result. Therefore, the time interval information of the speaker and the time interval corresponding to each character in the voice recognition text in the target audio data can be effectively utilized to segment the speaker for the voice recognition text, so that the reasonable and effective segmentation of the conversion part of the speaker is realized, the condition that a single sentence contains the speaking contents of a plurality of speakers is avoided, and the sentence segmentation effect is improved.
The following describes in detail a specific implementation of the above S103, in which the speaker segmentation is performed on the target audio data to obtain the second time period corresponding to each speaking segment in the target audio data. In particular, the speaker segmentation may be performed through various embodiments, and in one embodiment, the speaker segmentation may be performed on the target audio data by receiving a manually input segmentation flag, so as to determine a start time and an end time of each segment of speech in the target audio data, i.e., a second time period corresponding to each segment of speech in the target audio data.
In another embodiment, the target audio data may be input into a pre-trained speaker recognition model to perform speaker segmentation on the target audio data, so as to obtain a second time period corresponding to each speaking segment in the target audio data. Therefore, the method can automatically segment the speaking segments of different speakers, is convenient and quick, and improves the sentence separating efficiency of subsequent speech recognition texts.
The following describes in detail a specific implementation of segmenting the speaker of the speech recognition text according to the first time period corresponding to each recognition character and the second time period corresponding to each speech segment in S104. Specifically, the method can be realized by the following steps (1) and (2):
(1) and determining the character of the conversion point of the speaker from the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment.
(2) And carrying out speaker segmentation on the voice recognition text by taking the speaker conversion point characters as segmentation basis.
Wherein the speaker conversion point character belongs to the previous clause.
Illustratively, the speech recognition text is: you have eaten that you have eaten but have not yet eaten, wherein the speaker converts the characters into "do" and "woollen", and therefore the resulting clause results are: "do you have a meal", "have eaten you woollen", "I have not yet done".
The following is a detailed description of a specific implementation manner of determining the speaker conversion point character from the speech recognition text according to the first time period corresponding to each recognition character and the second time period corresponding to each speaking segment in the step (2). In one embodiment, for each second period, the identifier of the speech recognition text, in which the corresponding first period includes the end time of the second period, may be determined as the speaker transition point character.
In another embodiment, the speaker conversion point character can be determined through the following steps (21) to (25):
(21) and inputting the voice recognition text into a pre-trained semantic model to obtain the probability that each recognition character in the voice recognition text belongs to a semantic sentence break point, wherein the higher the probability that the recognition character belongs to the semantic sentence break point is, the more likely the recognition character is the semantic sentence break point.
(22) And aiming at each second time interval, carrying out front-back expansion on the ending time or the starting time of the second time interval to obtain a speaker conversion interval corresponding to the second time interval.
In one embodiment, the ending time of each second time period is expanded back and forth respectively. Specifically, for each second time interval, the end time of the second time interval is extended forward by Nms and simultaneously extended backward by Mms, so as to obtain the speaker conversion interval [ end _ time-N, end _ time + M ] corresponding to the second time interval, where end _ time is the end time of the second time interval.
In another embodiment, the start time of each second time interval is expanded back and forth respectively. Specifically, for each second time interval, the start time of the second time interval is extended forward by Nms, and simultaneously extended backward by Mms, so as to obtain the speaker transition interval [ start _ time-N, start _ time + M ] corresponding to the second time interval, where start _ time is the start time of the second time interval.
It should be noted that M and N may be equal or unequal, and the disclosure is not particularly limited.
(23) And determining the characters, corresponding to the preset time and positioned in the speaker conversion interval corresponding to the second time interval, in each recognition character as conversion point candidate characters.
In the present disclosure, the preset time is one of a start time of the first period and an end time of the first period. In one embodiment, the character of each recognition character whose corresponding start time of the first time interval is within the speaker conversion interval corresponding to the second time interval can be determined as the conversion point candidate character.
In another embodiment, the character of each recognition character whose corresponding ending time of the first time interval is within the speaker conversion interval corresponding to the second time interval can be determined as the conversion point candidate character.
(24) And determining the pause duration of each conversion point candidate character corresponding to the second time interval.
In the present disclosure, the pause duration of the conversion point candidate character is equal to the time interval between the start time of the recognition character next to and adjacent to the conversion point candidate character in the above-mentioned speech recognition text and the end time of the conversion point candidate character.
(25) And determining the conversion point character of the speaker from the conversion point candidate characters corresponding to the second time interval according to the pause duration of each conversion point candidate character corresponding to the second time interval and the probability that the conversion point candidate character belongs to the semantic sentence break.
Specifically, a weighted sum of the pause duration of the transition point candidate character and the probability that the transition point candidate character belongs to the semantic stop may be determined as the probability that the transition point candidate character belongs to the speaker transition point for each transition point candidate character corresponding to the second time period; then, the conversion point candidate character with the highest probability of belonging to the conversion point of the speaker in the conversion point candidate characters corresponding to the second time interval is determined as the conversion point character of the speaker.
Fig. 2 is a flow diagram illustrating a method of clauseing according to another exemplary embodiment. As shown in fig. 2, the above method further includes the following S105.
In S105, for each clause in the clause result, the clause is segmented according to semantics to obtain a plurality of clauses.
Therefore, the speech recognition text can be accurately divided into sentences according to the speaker and semantic information.
Fig. 3 is a flow chart illustrating a method of clauseing according to another exemplary embodiment. As shown in fig. 3, the above method further includes the following S106.
In S106, a subtitle text corresponding to the target audio data is generated from the plurality of clauses.
Because each clause is obtained by accurately segmenting the voice recognition text according to the speaker and the semantic information, the conversion position of the speaker can be reasonably and effectively segmented, the situation that a single-screen caption simultaneously contains the speaking contents of different speakers is avoided, and the user experience is improved.
Fig. 4 is a block diagram illustrating a sentence segmentation apparatus in accordance with an exemplary embodiment. As shown in fig. 4, the apparatus 400 includes:
an obtaining module 401, configured to obtain target audio data;
an extracting module 402, configured to extract a speech recognition text corresponding to the target audio data acquired by the acquiring module 401 and a first time period corresponding to each recognition character in the speech recognition text in the target audio data;
a first segmentation module 403, configured to perform speaker segmentation on the target audio data acquired by the acquisition module 401 to obtain a second time period corresponding to each speaking segment in the target audio data;
a second segmentation module 404, configured to segment the speech recognition text by the speaker according to the first time period corresponding to each recognition character extracted by the extraction module 402 and the second time period corresponding to each speaking segment obtained by the first segmentation module 403, so as to obtain a sentence segmentation result.
In the technical scheme, target audio data are obtained; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; meanwhile, carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; then, according to the first time interval corresponding to each identification character and the second time interval corresponding to each speaking segment, carrying out speaker segmentation on the voice identification text to obtain a sentence segmentation result. Therefore, the time interval information of the speaker and the time interval corresponding to each character in the voice recognition text in the target audio data can be effectively utilized to segment the speaker for the voice recognition text, so that the reasonable and effective segmentation of the conversion part of the speaker is realized, the condition that a single sentence contains the speaking contents of a plurality of speakers is avoided, and the sentence segmentation effect is improved.
In one embodiment, the second segmentation module 403 is configured to perform speaker segmentation on the target audio data by receiving a manually input segmentation flag, so as to determine a start time and an end time of each segment of speech in the target audio data, i.e., a second time period corresponding to each segment of speech in the target audio data.
In another embodiment, the second segmentation module 403 includes:
a first determining submodule, configured to determine a speaker conversion point character from the speech recognition text according to the first time period corresponding to each recognition character and the second time period corresponding to each speaking segment;
and the segmentation submodule is used for carrying out speaker segmentation on the voice recognition text by taking the speaker conversion point characters as segmentation basis.
Therefore, the method can automatically segment the speaking segments of different speakers, is convenient and quick, and improves the sentence separating efficiency of subsequent speech recognition texts.
Optionally, the first determining sub-module includes:
the second determining submodule is used for inputting the voice recognition text into a pre-trained semantic model to obtain the probability that each recognition character in the voice recognition text belongs to a semantic sentence break point;
the expansion submodule is used for expanding the ending time or the starting time of the second time interval in front and back according to each second time interval to obtain a speaker conversion interval corresponding to the second time interval; a third determining submodule, configured to determine, as a candidate character of a conversion point, a character, in each of the recognition characters, whose corresponding preset time is located in a speaker conversion interval corresponding to the second time period, where the preset time is one of a start time of the first time period and an end time of the first time period; a fourth determining submodule, configured to determine a pause duration of each of the conversion point candidate characters corresponding to the second time period; and a fifth determining submodule, configured to determine a speaker conversion point character from the conversion point candidate characters corresponding to the second time period according to the pause duration of each conversion point candidate character corresponding to the second time period and the probability that the conversion point candidate character belongs to the semantic sentence break.
Optionally, the fifth determining sub-module includes:
a sixth determining sub-module, configured to determine, for each of the conversion point candidate characters corresponding to the second time period, a weighted sum of a pause duration of the conversion point candidate character and a probability that the conversion point candidate character belongs to a semantic sentence break as a probability that the conversion point candidate character belongs to a speaker conversion point;
and a seventh determining submodule, configured to determine, as the speaker transition point character, a transition point candidate character with the highest probability of belonging to the speaker transition point among the transition point candidate characters corresponding to the second time period.
Optionally, the first segmentation module 402 is configured to input the target audio data into a pre-trained speaker recognition model, so as to perform speaker segmentation on the target audio data, and obtain a second time period corresponding to each speaking segment in the target audio data.
Optionally, the apparatus 400 further comprises:
and the third segmentation module is used for segmenting each clause in the clause result according to semantics to obtain a plurality of clauses.
Optionally, the apparatus 400 further comprises:
and the generating module is used for generating a subtitle text corresponding to the target audio data according to the plurality of clauses.
The present disclosure also provides a computer-readable medium, on which a computer program is stored, which program, when executed by a processing device, implements the steps of the above-mentioned clause method provided by the present disclosure.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., a terminal device or a server) 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring target audio data; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; and carrying out speaker segmentation on the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment to obtain a sentence segmentation result.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases constitute a limitation of the module itself, and for example, the acquisition module may also be described as a "module that acquires target audio data".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In accordance with one or more embodiments of the present disclosure, example 1 provides a sentence segmentation method, comprising: acquiring target audio data; extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data; carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data; and carrying out speaker segmentation on the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment to obtain a sentence segmentation result.
Example 2 provides the method of example 1, wherein the segmenting the speech recognition text according to the first time period corresponding to each recognition character and the second time period corresponding to each speaking segment, includes: determining a speaker conversion point character from the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment; and carrying out speaker segmentation on the voice recognition text by taking the speaker conversion point characters as segmentation basis.
Example 3 provides the method of example 2, wherein determining speaker transition point characters from the speech recognition text according to the first time period corresponding to each of the recognition characters and the second time period corresponding to each of the utterance sections, comprises: inputting the voice recognition text into a pre-trained semantic model to obtain the probability that each recognition character in the voice recognition text belongs to a semantic sentence break point; for each second time interval, carrying out front-back expansion on the ending time or the starting time of the second time interval to obtain a speaker conversion interval corresponding to the second time interval; determining characters, which are in the speaker conversion interval corresponding to the second time interval and correspond to the preset time, in each recognition character as conversion point candidate characters, wherein the preset time is one of the starting time of the first time interval and the ending time of the first time interval; determining the pause duration of each conversion point candidate character corresponding to the second time interval; and determining the conversion point character of the speaker from the conversion point candidate characters corresponding to the second time interval according to the pause duration of each conversion point candidate character corresponding to the second time interval and the probability that the conversion point candidate character belongs to the semantic sentence break.
Example 4 provides the method of example 3, wherein determining the speaker transition point character from the transition point candidate characters corresponding to the second period according to the pause duration of each of the transition point candidate characters corresponding to the second period and the probability that the transition point candidate character belongs to the semantic break period comprises: determining the weighted sum of the pause duration of the conversion point candidate character and the probability that the conversion point candidate character belongs to the semantic sentence break point as the probability that the conversion point candidate character belongs to the speaker conversion point for each conversion point candidate character corresponding to the second time interval; and determining the conversion point candidate character with the highest probability of belonging to the conversion point of the speaker in the conversion point candidate characters corresponding to the second time interval as the conversion point character of the speaker.
Example 5 provides the method of example 1, where performing speaker segmentation on the target audio data to obtain a second time period corresponding to each speaking segment in the target audio data includes:
and inputting the target audio data into a pre-trained speaker recognition model to perform speaker segmentation on the target audio data to obtain a second time period corresponding to each speaking segment in the target audio data.
Example 6 provides the method of any one of examples 1-5, further comprising, in accordance with one or more embodiments of the present disclosure: and segmenting each clause in the clause result according to semantics to obtain a plurality of clauses.
Example 7 provides the method of example 6, further comprising, in accordance with one or more embodiments of the present disclosure: and generating a subtitle text corresponding to the target audio data according to the plurality of clauses.
Example 8 provides, in accordance with one or more embodiments of the present disclosure, a sentence splitting apparatus, comprising: the acquisition module is used for acquiring target audio data; the extraction module is used for extracting the voice recognition text corresponding to the target audio data acquired by the acquisition module and a first time period corresponding to each recognition character in the target audio data in the voice recognition text; the first segmentation module is used for carrying out speaker segmentation on the target audio data acquired by the acquisition module to obtain a second time interval corresponding to each speaking segment in the target audio data; and the second segmentation module is used for segmenting the speaker of the voice recognition text according to the first time interval corresponding to each recognition character extracted by the extraction module and the second time interval corresponding to each speaking segment obtained by the first segmentation module to obtain a sentence segmentation result.
Example 9 provides the apparatus of example 8, the second segmentation module comprising, in accordance with one or more embodiments of the present disclosure: a first determining submodule, configured to determine a speaker conversion point character from the speech recognition text according to the first time period corresponding to each recognition character and the second time period corresponding to each speaking segment; and the segmentation submodule is used for carrying out speaker segmentation on the voice recognition text by taking the speaker conversion point characters as segmentation basis.
Example 10 provides the apparatus of example 9, the first determination submodule comprising: the second determining submodule is used for inputting the voice recognition text into a pre-trained semantic model to obtain the probability that each recognition character in the voice recognition text belongs to a semantic sentence break point; the expansion submodule is used for expanding the ending time or the starting time of the second time interval in front and back according to each second time interval to obtain a speaker conversion interval corresponding to the second time interval; a third determining submodule, configured to determine, as a candidate character of a conversion point, a character, in each of the recognition characters, whose corresponding preset time is located in a speaker conversion interval corresponding to the second time period, where the preset time is one of a start time of the first time period and an end time of the first time period; a fourth determining submodule, configured to determine a pause duration of each of the conversion point candidate characters corresponding to the second time period; and a fifth determining submodule, configured to determine a speaker conversion point character from the conversion point candidate characters corresponding to the second time period according to the pause duration of each conversion point candidate character corresponding to the second time period and the probability that the conversion point candidate character belongs to the semantic sentence break.
Example 11 provides the apparatus of example 10, the fifth determination submodule comprising: a sixth determining sub-module, configured to determine, for each of the conversion point candidate characters corresponding to the second time period, a weighted sum of a pause duration of the conversion point candidate character and a probability that the conversion point candidate character belongs to a semantic sentence break as a probability that the conversion point candidate character belongs to a speaker conversion point; and a seventh determining submodule, configured to determine, as the speaker transition point character, a transition point candidate character with the highest probability of belonging to the speaker transition point among the transition point candidate characters corresponding to the second time period.
Example 12 provides the apparatus of example 8, and the first segmentation module is configured to input the target audio data into a pre-trained speaker recognition model to perform speaker segmentation on the target audio data, so as to obtain a second time period corresponding to each speaking segment in the target audio data.
Example 13 provides the apparatus of any one of examples 8-12, the apparatus further comprising: and the third segmentation module is used for segmenting each clause in the clause result according to semantics to obtain a plurality of clauses.
Example 14 provides the apparatus of example 13, in accordance with one or more embodiments of the present disclosure, further comprising: and the generating module is used for generating a subtitle text corresponding to the target audio data according to the plurality of clauses.
Example 15 provides a computer readable medium having stored thereon a computer program that, when executed by a processing apparatus, performs the steps of the method of any of examples 1-7, in accordance with one or more embodiments of the present disclosure.
Example 16 provides, in accordance with one or more embodiments of the present disclosure, an electronic device, comprising: a storage device having one or more computer programs stored thereon; one or more processing devices for executing the one or more computer programs in the storage device to implement the steps of the method of any of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method of clause segmentation, comprising:
acquiring target audio data;
extracting a voice recognition text corresponding to the target audio data and a first time interval corresponding to each recognition character in the voice recognition text in the target audio data;
carrying out speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data;
and carrying out speaker segmentation on the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment to obtain a sentence segmentation result.
2. The method according to claim 1, wherein said segmenting the speech recognition text according to the first time interval corresponding to each of the recognition characters and the second time interval corresponding to each of the speaking segments comprises:
determining a speaker conversion point character from the voice recognition text according to the first time interval corresponding to each recognition character and the second time interval corresponding to each speaking segment;
and carrying out speaker segmentation on the voice recognition text by taking the speaker conversion point characters as segmentation basis.
3. The method of claim 2, wherein said determining speaker transition point characters from said speech recognized text based on said first time period corresponding to each of said recognized characters and said second time period corresponding to each of said spoken segments comprises:
inputting the voice recognition text into a pre-trained semantic model to obtain the probability that each recognition character in the voice recognition text belongs to a semantic sentence break point;
for each second time interval, carrying out front-back expansion on the ending time or the starting time of the second time interval to obtain a speaker conversion interval corresponding to the second time interval; determining characters, which are in the speaker conversion interval corresponding to the second time interval and correspond to the preset time, in each recognition character as conversion point candidate characters, wherein the preset time is one of the starting time of the first time interval and the ending time of the first time interval; determining the pause duration of each conversion point candidate character corresponding to the second time interval; and determining the conversion point character of the speaker from the conversion point candidate characters corresponding to the second time interval according to the pause duration of each conversion point candidate character corresponding to the second time interval and the probability that the conversion point candidate character belongs to the semantic sentence break.
4. The method of claim 3, wherein determining the speaker transition point character from the transition point candidate characters corresponding to the second time period according to the pause duration of each of the transition point candidate characters corresponding to the second time period and the probability that the transition point candidate character belongs to the semantic break period comprises:
determining the weighted sum of the pause duration of the conversion point candidate character and the probability that the conversion point candidate character belongs to the semantic sentence break point as the probability that the conversion point candidate character belongs to the speaker conversion point for each conversion point candidate character corresponding to the second time interval;
and determining the conversion point candidate character with the highest probability of belonging to the conversion point of the speaker in the conversion point candidate characters corresponding to the second time interval as the conversion point character of the speaker.
5. The method according to claim 1, wherein the performing speaker segmentation on the target audio data to obtain a second time interval corresponding to each speaking segment in the target audio data comprises:
and inputting the target audio data into a pre-trained speaker recognition model to perform speaker segmentation on the target audio data to obtain a second time period corresponding to each speaking segment in the target audio data.
6. The method according to any one of claims 1-5, further comprising:
and segmenting each clause in the clause result according to semantics to obtain a plurality of clauses.
7. The method of claim 6, further comprising:
and generating a subtitle text corresponding to the target audio data according to the plurality of clauses.
8. A sentence segmentation apparatus, comprising:
the acquisition module is used for acquiring target audio data;
the extraction module is used for extracting the voice recognition text corresponding to the target audio data acquired by the acquisition module and a first time period corresponding to each recognition character in the target audio data in the voice recognition text;
the first segmentation module is used for carrying out speaker segmentation on the target audio data acquired by the acquisition module to obtain a second time interval corresponding to each speaking segment in the target audio data;
and the second segmentation module is used for segmenting the speaker of the voice recognition text according to the first time interval corresponding to each recognition character extracted by the extraction module and the second time interval corresponding to each speaking segment obtained by the first segmentation module to obtain a sentence segmentation result.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having one or more computer programs stored thereon;
one or more processing devices for executing the one or more computer programs in the storage device to implement the steps of the method of any one of claims 1-7.
CN202111327536.0A 2021-11-10 2021-11-10 Sentence dividing method and device, storage medium and electronic equipment Pending CN113889113A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111327536.0A CN113889113A (en) 2021-11-10 2021-11-10 Sentence dividing method and device, storage medium and electronic equipment
PCT/CN2022/130352 WO2023083142A1 (en) 2021-11-10 2022-11-07 Sentence segmentation method and apparatus, storage medium, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111327536.0A CN113889113A (en) 2021-11-10 2021-11-10 Sentence dividing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113889113A true CN113889113A (en) 2022-01-04

Family

ID=79017794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111327536.0A Pending CN113889113A (en) 2021-11-10 2021-11-10 Sentence dividing method and device, storage medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN113889113A (en)
WO (1) WO2023083142A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114554238A (en) * 2022-02-23 2022-05-27 北京有竹居网络技术有限公司 Live broadcast voice simultaneous transmission method, device, medium and electronic equipment
WO2023083142A1 (en) * 2021-11-10 2023-05-19 北京有竹居网络技术有限公司 Sentence segmentation method and apparatus, storage medium, and electronic device
CN117113974A (en) * 2023-04-26 2023-11-24 荣耀终端有限公司 Text segmentation method, device, chip, electronic equipment and medium
WO2023232073A1 (en) * 2022-05-31 2023-12-07 北京字跳网络技术有限公司 Subtitle generation method, apparatus, electronic device, storage medium and program

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107578770B (en) * 2017-08-31 2020-11-10 百度在线网络技术(北京)有限公司 Voice recognition method and device for network telephone, computer equipment and storage medium
US11120802B2 (en) * 2017-11-21 2021-09-14 International Business Machines Corporation Diarization driven by the ASR based segmentation
CN111916053B (en) * 2020-08-17 2022-05-20 北京字节跳动网络技术有限公司 Voice generation method, device, equipment and computer readable medium
CN112201275A (en) * 2020-10-09 2021-01-08 深圳前海微众银行股份有限公司 Voiceprint segmentation method, voiceprint segmentation device, voiceprint segmentation equipment and readable storage medium
CN113225612B (en) * 2021-04-14 2022-10-11 新东方教育科技集团有限公司 Subtitle generating method, device, computer readable storage medium and electronic equipment
CN113393845A (en) * 2021-06-11 2021-09-14 上海明略人工智能(集团)有限公司 Method and device for speaker recognition, electronic equipment and readable storage medium
CN113889113A (en) * 2021-11-10 2022-01-04 北京有竹居网络技术有限公司 Sentence dividing method and device, storage medium and electronic equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023083142A1 (en) * 2021-11-10 2023-05-19 北京有竹居网络技术有限公司 Sentence segmentation method and apparatus, storage medium, and electronic device
CN114554238A (en) * 2022-02-23 2022-05-27 北京有竹居网络技术有限公司 Live broadcast voice simultaneous transmission method, device, medium and electronic equipment
CN114554238B (en) * 2022-02-23 2023-08-11 北京有竹居网络技术有限公司 Live broadcast voice simultaneous transmission method, device, medium and electronic equipment
WO2023232073A1 (en) * 2022-05-31 2023-12-07 北京字跳网络技术有限公司 Subtitle generation method, apparatus, electronic device, storage medium and program
CN117113974A (en) * 2023-04-26 2023-11-24 荣耀终端有限公司 Text segmentation method, device, chip, electronic equipment and medium

Also Published As

Publication number Publication date
WO2023083142A1 (en) 2023-05-19

Similar Documents

Publication Publication Date Title
CN112115706B (en) Text processing method and device, electronic equipment and medium
CN113889113A (en) Sentence dividing method and device, storage medium and electronic equipment
US11917344B2 (en) Interactive information processing method, device and medium
CN111445902B (en) Data collection method, device, storage medium and electronic equipment
CN112037792B (en) Voice recognition method and device, electronic equipment and storage medium
CN111986655B (en) Audio content identification method, device, equipment and computer readable medium
CN114205665B (en) Information processing method, device, electronic equipment and storage medium
CN111753558B (en) Video translation method and device, storage medium and electronic equipment
WO2023029904A1 (en) Text content matching method and apparatus, electronic device, and storage medium
CN113378586B (en) Speech translation method, translation model training method, device, medium, and apparatus
CN111667810B (en) Method and device for acquiring polyphone corpus, readable medium and electronic equipment
CN112380365A (en) Multimedia subtitle interaction method, device, equipment and medium
CN110379406B (en) Voice comment conversion method, system, medium and electronic device
CN114445754A (en) Video processing method and device, readable medium and electronic equipment
CN112954453B (en) Video dubbing method and device, storage medium and electronic equipment
CN112242143B (en) Voice interaction method and device, terminal equipment and storage medium
CN115967833A (en) Video generation method, device and equipment meter storage medium
CN114554238A (en) Live broadcast voice simultaneous transmission method, device, medium and electronic equipment
CN111859902A (en) Text processing method, device, equipment and medium
CN112542157A (en) Voice processing method and device, electronic equipment and computer readable storage medium
CN112163433B (en) Key vocabulary matching method and device, electronic equipment and storage medium
CN114640826B (en) Data processing method, device, readable medium and electronic equipment
CN114697763B (en) Video processing method, device, electronic equipment and medium
US11792494B1 (en) Processing method and apparatus, electronic device and medium
CN113132789B (en) Multimedia interaction method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination