Name identification method, device and equipment and computer medium
By analyzing the speech text and context in the audio and video content and identifying the speaker's name, the problem of low efficiency in determining the speaker's name in the existing technology is solved, and more efficient and accurate audio and video processing is achieved.
Patent Information
- Application Number
- CN202411391148.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the identification of the spokesperson's name is low and it is impossible to identify the spokesperson's name by analyzing the contents of the audio and video files.
By obtaining the speech text, including the target speaker identification and at least one speech paragraph, the name recognition result is determined for each speech paragraph based on its relationship with the context paragraph, and the speaker corresponding to the target speaker identification is determined based on the recognition result of at least one speech paragraph. Name.
It improves the efficiency of determining the speaker's name, realizes the speaker's real name recognition based on audio and video text content, and enhances the accuracy and efficiency of audio and video processing.
Smart Images

Figure CN119357327A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of text recognition, and in particular, relates to a method, device, equipment and computer medium for name recognition. Background Art
[0002] Audio and video content plays an increasingly important role in modern society. With the development of technology, the production and dissemination speed of audio and video content is also increasing. Identifying the name of the speaker in audio and video scenes has become an important technical task. In related technologies, the speaker's name is generally determined manually, and the efficiency of determining the speaker's name is relatively low. Summary of the invention
[0003] The embodiment of the present application provides an implementation scheme different from the related art to solve the technical problem of low efficiency in determining the speaker's name in the related art.
[0004] In a first aspect, the present application provides a method for name recognition, comprising:
[0005] Acquire a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph;
[0006] For each of the speech paragraphs, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph;
[0007] The speaker name corresponding to the target speaker identifier is determined according to at least one name recognition result corresponding to the at least one speech paragraph.
[0008] In a second aspect, the present application provides a name recognition device, comprising:
[0009] An acquisition unit, configured to acquire a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph;
[0010] A determination unit, configured to determine, for each of the speech paragraphs, a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph;
[0011] The determining unit is further configured to determine the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph.
[0012] In a third aspect, the present application provides an electronic device, including:
[0013] Processor; and
[0014] A memory, configured to store executable instructions of the processor;
[0015] The processor is configured to execute the first aspect or any method in any possible implementation manner of the first aspect by executing the executable instructions.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the first aspect, or any method in any possible implementation manner of the first aspect.
[0017] The present application provides a name recognition scheme, including: obtaining a speech text, the speech text including a target speaker identifier, the speech text including at least one speech paragraph; for each speech paragraph, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph; determining a speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph, thereby improving the efficiency of determining the speaker name. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0019] Figure 1 A structural diagram of a name recognition system provided in one embodiment of the present application;
[0020] Figure 2a A flowchart of a method for name recognition provided in one embodiment of the present application;
[0021] Figure 2b A flowchart of a method for name recognition provided by another embodiment of the present application;
[0022] Figure 3 A schematic diagram of the structure of a name recognition device provided in one embodiment of the present application;
[0023] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, but cannot be understood as limiting the present application.
[0025] The terms "first" and "second" etc. in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0026] First, some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0027] Named Entity Recognition (NER), also known as "proper name recognition", refers to the identification of entities with specific meanings in text, mainly including names of people, places, institutions, proper nouns, etc.
[0028] SFT (Supervised Fine-Tuning) is the supervised fine-tuning of large language models. It is a model that uses supervised learning to fine-tune pre-trained language models. The goal of SFT is to enable pre-trained language models (such as GPT-3, BERT, etc.) to better complete specific tasks. The working principle is to use the pre-trained language model as a basis and then use supervised learning to adjust the parameters of the model. Supervised learning refers to using labeled data to train the model. In the SFT process, the label is usually the correct answer to the target task.
[0029] Audio and video content plays an increasingly important role in modern society. With the development of technology, the production and dissemination speed of audio and video content is also increasing. Identifying the name of the speaker in audio and video scenes has become an important technical task. In related technologies, the speaker's name is generally determined manually, and the efficiency of determining the speaker's name is relatively low.
[0030] Currently, there is no technology in the industry that can identify the speaker's name based on text content. Existing speaker recognition technology usually only recognizes the speaker's voice or facial features, and cannot identify the speaker's name by analyzing the content of audio and video files. This limits the potential application of such technology in audio and video content processing to a certain extent, and also hinders the further use of audio and video attributes. Therefore, developing a speaker name recognition solution based on audio and video content can effectively solve the above problems, meet the needs of audio and video content processing, and has important practical application value.
[0031] In this application, speaker name recognition based on audio and video content can be achieved by analyzing and processing the content in the audio and video, thus opening up new possibilities for the further use of audio and video. Unlike traditional speaker recognition technology based on sound or facial features, speaker name recognition based on audio and video content uses rich text information in the audio and video to extract more information about the speaker, thereby improving the accuracy of recognition. This technology is applicable to a large number of audio and video scenarios, including but not limited to news reports, movies and TV series, online live broadcasts, meeting minutes, etc. Speaker name recognition based on audio and video content can help complete many downstream tasks, such as summarizing, tagging, and setting to-do items for audio and video properties, improving the usability value of audio and video.
[0032] The technical problem to be solved by this application is: how to realize the real name recognition of the speaker based on the audio and video text content in the audio and video scenario. Its purpose is to improve the accuracy and efficiency of audio and video content processing, and improve the completion quality of related tasks and audio and video content summaries, to-do items, etc., so as to promote the development of audio and video information processing technology and meet the growing demand of society and industry for audio and video information processing technology.
[0033] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0034] Figure 1 A structural diagram of a name recognition system provided for an exemplary embodiment of the present application, the system includes: a terminal 10 and a server 20.
[0035] The solution of the present application is applicable to a large number of audio and video scenarios, including but not limited to news reports, movies and TV series, online live broadcasts, meeting minutes, etc., in which multiple people can speak.
[0036] The aforementioned terminal 10 may be a device for recording audio information in a scene. After acquiring the audio information, the terminal 10 may send the audio information to the server 20, so that the server 20 performs speech recognition on the audio information to obtain the speech text to be analyzed. The speech text to be analyzed includes multiple groups of speech texts, each group of speech texts being at least one speech paragraph of a speaker's speech corresponding to a speaker identifier in the speech text to be analyzed.
[0037] Optionally, the speech text to be analyzed involved in this application may include multiple speaker identifiers, and speech paragraphs corresponding to each speaker identifier. Each speech paragraph in the speech text to be analyzed includes the speaker identifier and the speech content. Some paragraphs in the speech text to be analyzed may be as follows:
[0038] Speaker 2: I have a question. Our current ambient light is not quite suitable for the picture style. In fact, we can adjust the ambient light now, right Xiao Ming?
[0039] Speaker 1: Yes, the deadline has not yet arrived, so the ambient light can be adjusted.
[0040] Among them, the aforementioned speaker 1 and speaker 2 are two speaker identifiers. After being identified by the name recognition method in this application, it can be identified that the name corresponding to speaker 1 is Xiao Ming.
[0041] Optionally, after the server 20 determines the speech text to be analyzed, it can feed back the speech text to be analyzed to the terminal 10, so that the terminal 10 executes: obtaining the target speaker identifier of the corresponding name to be confirmed in the speech text to be analyzed; obtaining the speech text where the target speaker identifier is located from the speech text to be analyzed, the speech text including the target speaker identifier, and the speech text including at least one speech paragraph; for each of the speech paragraphs, determining the name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph; determining the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph.
[0042] After determining the names corresponding to the speaker identifiers, the terminal 10 may display the names corresponding to the speaker identifiers.
[0043] Optionally, the server 20 may also directly execute: obtaining the target speaker identifier of the person's name to be confirmed in the speech text to be analyzed; obtaining the speech text where the target speaker identifier is located from the speech text to be analyzed, the speech text including the target speaker identifier, and the speech text including at least one speech paragraph; for each speech paragraph, determining the person's name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph; determining the speaker's name corresponding to the target speaker identifier according to at least one person's name recognition result corresponding to the at least one speech paragraph.
[0044] After determining the names corresponding to the speaker identifiers, the server 20 may feed back the names corresponding to the speaker identifiers to the terminal 10 , so that the terminal 10 displays the names corresponding to the speaker identifiers.
[0045] It is understandable that in the specific implementation of this application, it involves user personal information, such as names and other related data. When the embodiments in this application are applied to specific products or technologies, user permission, consent or authorization is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0046] Figure 2a A flowchart of a method for name recognition provided by an exemplary embodiment of the present application is provided. The method can be applied to any electronic device. Optionally, the electronic device can be the aforementioned terminal 10 or server 20. The method at least includes the following steps S201-S203:
[0047] S201, obtaining a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph;
[0048] Each speech segment includes a target speaker identifier.
[0049] The target speaker identifier is the speaker identifier of the speaker whose corresponding name is to be determined.
[0050] Optionally, the speaker identification is an identification used to distinguish different speakers, and the identification may be Arabic numerals, English letters, etc. For example, the speaker identification may be: speaker 1, speaker m.
[0051] The speech text is a text composed of speech paragraphs containing the target speaker identifier in the speech text to be analyzed.
[0052] Each speech paragraph includes a speaker ID and speech content. For example, in “Speaker 1: Yes, the deadline has not yet arrived, and the ambient light can be adjusted.”, “Speaker 1” is the speaker ID, and “Yes, the deadline has not yet arrived, and the ambient light can be adjusted.” is the speech content corresponding to the speaker ID.
[0053] The speech text to be analyzed may refer to the speech text obtained by performing text recognition on audio information or video information carrying audio information through audio-to-text technology. Optionally, the audio information or video information may be audio information or video information in scenes such as news reports, movies and TV series, online live broadcasts, and meeting minutes.
[0054] S202, for each of the speech paragraphs, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph;
[0055] In some optional embodiments of the present application, in S202, determining the name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph includes the following S2021-S2022:
[0056] S2021, marking the speech paragraph and the context paragraph of the speech paragraph to see whether they contain name information, and obtaining the marked paragraph corresponding to the speech paragraph;
[0057] Specifically, marking whether the speech paragraph and the context paragraphs of the speech paragraph contain name information to obtain the marked paragraph corresponding to the speech paragraph means: marking whether the speech paragraph contains name information, and marking whether each paragraph in the context paragraphs of the speech paragraph contains name information.
[0058] Optionally, NER technology may be used to identify whether a paragraph contains name information.
[0059] Optionally, it is also possible to identify whether the paragraph contains name information by obtaining a preset name list and matching the paragraph with each name in the speaker name list.
[0060] In some optional embodiments of the present application, the method further includes: for each of the speech paragraphs, obtaining a first preset number of first paragraphs that are closest to the speech paragraph and are located before the speech paragraph, and / or obtaining a second preset number of second paragraphs that are closest to the speech paragraph and are located after the speech paragraph, to obtain the context paragraph of the speech paragraph.
[0061] Optionally, the first preset number and the second preset number may be the same or different.
[0062] Optionally, the first preset number is 3 and the second preset number is 2.
[0063] It should be noted that when the speech paragraph is the first paragraph in the speech text to be analyzed, the previous paragraph of the speech paragraph is empty, and when the speech paragraph is the last paragraph in the speech text to be analyzed, the following paragraph of the speech paragraph is empty.
[0064] S2022: In response to the annotated paragraph including name information, input the annotated paragraph into a preset large language model to obtain a name recognition result corresponding to the speech paragraph.
[0065] Specifically, the marked paragraphs including the name information means that the marked paragraphs include the paragraphs marked as including the name information.
[0066] The large language model is obtained by training multiple groups of sample data, and is used to output a name recognition result corresponding to a speech paragraph determined based on the annotated paragraph after inputting the annotated paragraph.
[0067] Optionally, the aforementioned large language model may be a large language model processed by SFT.
[0068] S203: Determine the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph.
[0069] In some optional embodiments of the present application, in S203, determining the speaker name corresponding to the target speaker identifier according to the at least one name recognition result corresponding to the at least one speech paragraph includes the following S2031-S2032:
[0070] S2031, obtaining the name recognition result with the largest number of occurrences among at least one name recognition result corresponding to the at least one speech paragraph;
[0071] S2032: Determine the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences.
[0072] In some optional embodiments of the present application, in S2032, determining the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences includes the following S321-S322:
[0073] S321, in response to the existence of a list of speaker names, for each speaker name in the list of speaker names, determining a matching degree between the name recognition result with the largest number of occurrences and the speaker name, and obtaining a matching degree corresponding to each speaker name;
[0074] Optionally, when a list of speaker names is stored in the electronic device, it is considered that the list of speaker names exists.
[0075] In some optional embodiments of the present application, the aforementioned matching degree may refer to similarity.
[0076] S322: Use the speaker name with the highest matching degree in the list of speaker names as the name corresponding to the target speaker identifier.
[0077] Optionally, before matching the name recognition result with the most occurrences with the speaker's name, both need to be converted into English or pinyin.
[0078] Optionally, a fuzzy matching method may be used to match the pending name recognition result with each speaker name in the speaker name list.
[0079] In some optional embodiments of the present application, in S2032, determining the name corresponding to the target speaker identifier based on the name recognition result that appears most times also includes: in response to the absence of a speaker name list, using the name recognition result that appears most times as the name corresponding to the target speaker identifier.
[0080] In some optional embodiments of the present application, after determining the name corresponding to the target speaker identifier according to the at least one name recognition result, the method further includes the following S1-S2:
[0081] S01, determining the next speaker identifier of the target speaker identifier among multiple speaker identifiers according to the speaking order;
[0082] S02: taking the next speaker identifier as a new target speaker identifier, and returning to the step of obtaining the target speaker identifier until the name corresponding to each speaker identifier in the multiple speaker identifiers is determined.
[0083] In some optional embodiments of the present application, multiple speaker identifiers may be arranged in the order in which the speakers corresponding to the speaker identifiers first spoke, and the aforementioned speaking order refers to the order in which the speakers corresponding to the speaker identifiers first spoke.
[0084] After determining the name corresponding to each speaker identification in the plurality of speaker identifications, the method further includes updating the speech text to be analyzed to obtain a final text.
[0085] Optionally, updating the speech text to be analyzed to obtain a final text includes: executing the following steps S001-S002 for each speaker identifier among the multiple speaker identifiers, thereby obtaining the final text.
[0086] S001, obtaining the name corresponding to the speaker identification;
[0087] S002: Replace the speaker identification in the speech to be analyzed with the name of the person.
[0088] It should be noted that after the speech text to be analyzed is updated and the final text is obtained, the final text can be displayed.
[0089] In some optional embodiments, after the speech text to be analyzed is obtained, the speech text to be analyzed is not displayed, but can be directly updated to obtain the final text, and only the final text is displayed.
[0090] In some optional embodiments of the present application, before the aforementioned S201, the above method further includes:
[0091] In response to the speech text to be analyzed being generated, an input box for a list of speakers' names is displayed;
[0092] In response to the speaker name list input in the speaker name list input box, the speaker name list is saved.
[0093] Optionally, the aforementioned list of spokesperson names may be input manually or by selecting from a drop-down menu, and this application does not impose any restrictions on this.
[0094] In order to further illustrate the solution of this application, the following Figure 2b To further illustrate the solution of the present application, in some embodiments, the name recognition method of the present application may include the following steps S1-S7:
[0095] S1. Select a speaker identifier m.
[0096] S2. Filter out paragraphs related to the speaker identifier m from the speech text to be analyzed, and these paragraphs constitute the speech text. The speech text to be analyzed is a paragraph formed by multiple speakers speaking alternately.
[0097] S3, for each speech paragraph in the speech text, using NER name entity recognition technology, marking whether the speech paragraph and the context paragraph of the speech paragraph contain name information, and obtaining the marked paragraph corresponding to the speech paragraph;
[0098] S4. In response to the annotated paragraph including name information, the annotated paragraph is input into a preset large language model to obtain a name recognition result corresponding to the speech paragraph, and then obtain multiple name recognition results corresponding to the speaker identifier m.
[0099] in, Figure 2b The segments 1, 2, ..., and n in the figure are n annotated paragraphs, and the names 1, 2, ..., and n are n name recognition results corresponding to the speaker identifier m obtained by inputting the segments 1, 2, ..., and n into the preset large language model respectively.
[0100] S5. Voting to select the pending name recognition result with the largest number of occurrences from the multiple name recognition results obtained.
[0101] S6. Determine whether there is a list of speaker names. If yes, execute S61; if no, execute S62.
[0102] S61, converting each name in the speaker name list into pinyin, converting the pending name recognition result into pinyin, and performing fuzzy matching on the pinyin results of the two to obtain the real name corresponding to the speaker identifier m.
[0103] Optionally, when the names of the speakers in the list are in English, there is no need to convert them into pinyin.
[0104] S62: Use the undetermined name recognition result as the real name corresponding to the speaker identifier m.
[0105] S7: Output the real name corresponding to the speaker identifier m, wherein the real name refers to the aforementioned name.
[0106] in, Figure 2b The specific implementation of each step in can be found in the above content and will not be repeated here.
[0107] The present application is about a speaker real name recognition scheme based on audio and video text content, which is a very important technology in audio and video scenarios. It can quickly and accurately identify the real name of the speaker in a large amount of audio and video content. This recognition method can greatly improve the efficiency and accuracy of audio and video processing, thereby providing users with better services. The solution can also be widely used in a variety of downstream tasks such as audio and video content summary and to-do tasks. By identifying the real name of the speaker, the audio and video content can be classified, labeled and summarized more accurately, and the to-do tasks can be constructed more conveniently, thereby improving the work efficiency of the user. Moreover, there is currently no technology for speaker real name recognition based on text content in the industry. This application fills this technical gap, brings new changes to the field of audio and video recognition, and will also promote the progress of the entire industry.
[0108] The present application provides a name recognition scheme, including: obtaining a speech text, the speech text including a target speaker identifier, the speech text including at least one speech paragraph; for each speech paragraph, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph; determining a speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph, thereby improving the efficiency of determining the speaker name.
[0109] Figure 3 A schematic diagram of the structure of a name recognition device provided by an exemplary embodiment of the present application;
[0110] The device comprises:
[0111] An acquisition unit 31 is used to acquire a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph;
[0112] A determination unit 32, configured to determine, for each of the speech paragraphs, a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph;
[0113] The determining unit 32 is further configured to determine the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph.
[0114] In some optional embodiments of the present application, when the aforementioned device is used to determine the name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph, it is specifically used to:
[0115] Marking the speech paragraph and the context paragraph of the speech paragraph to see whether they contain name information, and obtaining the marked paragraph corresponding to the speech paragraph;
[0116] In response to the annotated paragraph including name information, the annotated paragraph is input into a preset large language model to obtain a name recognition result corresponding to the speech paragraph.
[0117] In some optional embodiments of the present application, the device is also used for:
[0118] For each of the speech paragraphs, obtain a first preset number of first paragraphs that are closest to the speech paragraph and are located before the speech paragraph, and / or obtain a second preset number of second paragraphs that are closest to the speech paragraph and are located after the speech paragraph, to obtain the context paragraphs of the speech paragraph.
[0119] In some optional embodiments of the present application, when the aforementioned device is used to determine the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph, it is specifically used to:
[0120] Obtaining the name recognition result with the largest number of occurrences among the at least one name recognition result corresponding to the at least one speech paragraph;
[0121] The name corresponding to the target speaker identifier is determined according to the name recognition result with the largest number of occurrences.
[0122] In some optional embodiments of the present application, when the aforementioned device is used to determine the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences, it is specifically used to:
[0123] In response to the existence of a list of speaker names, for each speaker name in the list of speaker names, determining a matching degree between the name recognition result with the most occurrences and the speaker name, and obtaining a matching degree corresponding to each speaker name;
[0124] The speaker name with the highest matching degree in the list of speaker names is used as the name corresponding to the target speaker identifier.
[0125] In some optional embodiments of the present application, when the aforementioned device is used to determine the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences, it is specifically used to:
[0126] In response to the absence of a speaker name list, the name recognition result with the largest number of occurrences is used as the name corresponding to the target speaker identifier.
[0127] In some optional embodiments of the present application, after determining the name corresponding to the target speaker identifier according to the at least one name recognition result, the aforementioned device is further configured to:
[0128] Determine, according to the speaking order, the next speaker identifier of the target speaker identifier among the multiple speaker identifiers;
[0129] The next speaker identifier is used as a new target speaker identifier, and the step of obtaining the target speaker identifier is returned to be executed until the name corresponding to each speaker identifier in the multiple speaker identifiers is determined.
[0130] The present application provides a name recognition scheme, including: obtaining a speech text, the speech text including a target speaker identifier, the speech text including at least one speech paragraph; for each speech paragraph, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph; determining a speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph, thereby improving the efficiency of determining the speaker name.
[0131] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, no further description is given here. Specifically, the device may perform the above method embodiment, and the above and other operations and / or functions of each module in the device are the corresponding processes in each method in the above method embodiment, respectively, and no further description is given here for the sake of brevity.
[0132] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0133] Figure 4 is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may include:
[0134] The memory 401 and the processor 402, the memory 401 is used to store the computer program and transmit the program code to the processor 402. In other words, the processor 402 can call and run the computer program from the memory 401 to implement the method in the embodiment of the present application.
[0135] For example, the processor 402 may be configured to execute the above method embodiments according to instructions in the computer program.
[0136] In some embodiments of the present application, the processor 402 may include but is not limited to:
[0137] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0138] In some embodiments of the present application, the memory 401 includes but is not limited to:
[0139] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0140] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 401 and executed by the processor 402 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0141] like Figure 4 As shown, the electronic device may also include:
[0142] The transceiver 403 may be connected to the processor 402 or the memory 401 .
[0143] The processor 402 may control the transceiver 403 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 403 may include a transmitter and a receiver. The transceiver 403 may further include an antenna, and the number of antennas may be one or more.
[0144] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0145] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0146] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0147] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0148] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0149] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0150] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for name recognition, characterized in that: include: Acquire a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph; For each of the speech paragraphs, determining a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph; The speaker name corresponding to the target speaker identifier is determined according to at least one name recognition result corresponding to the at least one speech paragraph.
2. The method according to claim 1, characterized in that The determining of the name recognition result corresponding to the speech paragraph according to the speech paragraph and the context paragraph of the speech paragraph includes: Marking the speech paragraph and the context paragraph of the speech paragraph to see whether they contain name information, and obtaining the marked paragraph corresponding to the speech paragraph; In response to the annotated paragraph including name information, the annotated paragraph is input into a preset large language model to obtain a name recognition result corresponding to the speech paragraph.
3. The method according to claim 1, characterized in that The method further comprises: For each of the speech paragraphs, obtain a first preset number of first paragraphs that are closest to the speech paragraph and are located before the speech paragraph, and / or obtain a second preset number of second paragraphs that are closest to the speech paragraph and are located after the speech paragraph, to obtain the context paragraphs of the speech paragraph.
4. The method according to claim 1, characterized in that: The determining the speaker name corresponding to the target speaker identifier according to the at least one name recognition result corresponding to the at least one speech paragraph includes: Obtaining the name recognition result with the largest number of occurrences among the at least one name recognition result corresponding to the at least one speech paragraph; The name corresponding to the target speaker identifier is determined according to the name recognition result with the largest number of occurrences.
5. The method according to claim 4, characterized in that The determining the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences includes: In response to the existence of a list of speaker names, for each speaker name in the list of speaker names, determining a matching degree between the name recognition result with the most occurrences and the speaker name, and obtaining a matching degree corresponding to each speaker name; The speaker name with the highest matching degree in the list of speaker names is used as the name corresponding to the target speaker identifier.
6. The method according to claim 5, characterized in that The step of determining the name corresponding to the target speaker identifier according to the name recognition result with the largest number of occurrences also includes: In response to the absence of a speaker name list, the name recognition result with the largest number of occurrences is used as the name corresponding to the target speaker identifier.
7. The method according to claim 1, characterized in that After determining the name corresponding to the target speaker identifier according to the at least one name recognition result, the method further includes: Determine, according to the speaking order, the next speaker identifier of the target speaker identifier among the multiple speaker identifiers; The next speaker identifier is used as a new target speaker identifier, and the step of obtaining the target speaker identifier is returned to be executed until the name corresponding to each speaker identifier in the multiple speaker identifiers is determined.
8. A name recognition device, characterized in that: include: An acquisition unit, configured to acquire a speech text, wherein the speech text includes a target speaker identifier, and the speech text includes at least one speech paragraph; A determination unit, configured to determine, for each of the speech paragraphs, a name recognition result corresponding to the speech paragraph according to the speech paragraph and a context paragraph of the speech paragraph; The determining unit is further configured to determine the speaker name corresponding to the target speaker identifier according to at least one name recognition result corresponding to the at least one speech paragraph.
9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.