Method and device for processing prohibited words in audio, electronic equipment and computer readable storage medium

By decoding and separating the audio data, and combining the prohibited word processing model to directly identify and process the prohibited word, the problem of untimely blocking of prohibited words in the prior art is solved, and efficient prohibited word processing and live broadcast in audio are achieved.

CN120340467APending Publication Date: 2025-07-18SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510584950.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the blocking of banned words is not timely, resulting in the live broadcast being unsmooth or the playback of banned words.

Method used

By obtaining audio data, decode it into the original audio format, separated into multiple audio clips, and using the prohibited word processing model to directly identify and process the prohibited word to obtain the target audio clip.

Benefits of technology

It realizes efficient processing of banned words in the audio, ensures the real-time and fluency of live broadcasts, and avoids the playback of banned words.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120340467A_ABST
    Figure CN120340467A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and a device for processing prohibited words in audio, electronic equipment and a computer readable storage medium. The method comprises the following steps: acquiring audio data; decoding the audio data to obtain audio data in an original audio format; separating the audio data in the original audio format to obtain a plurality of audio clips; and on the basis of a forbidden word processing model, processing forbidden words in the audio clip to obtain a target audio clip. According to the scheme, the prohibited words in the audio can be directly and efficiently processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of audio processing, and in particular, to a method, device, electronic device, and computer-readable storage medium for processing prohibited words in audio. Background Art

[0002] In live scenarios such as live interview programs and real-time news broadcasts, live personnel may utter prohibited words, and it is necessary to block the prohibited words. In the related art, the blocking process of prohibited words is to first convert the speech into text, and then identify whether there are prohibited words in the text. However, this method may result in untimely blocking of prohibited words, thereby causing the live broadcast to be unsmooth or playing out the prohibited words. Summary of the Invention

[0003] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for processing prohibited words in audio, which can directly and efficiently process the prohibited words in the audio.

[0004] In a first aspect, the embodiments of the present application provide a method for processing prohibited words in audio, including:

[0005] Obtain audio data;

[0006] Decode the audio data to obtain audio data in the original audio format;

[0007] Separate the audio data in the original audio format to obtain a plurality of audio segments; and

[0008] Based on a prohibited word processing model, process the prohibited words in the audio segments to obtain target audio segments.

[0009] In one of the embodiments, the method further includes:

[0010] Obtain video data;

[0011] Decode the video data to obtain the original video data;

[0012] Synchronize the original video data and the audio data in the original audio format to obtain synchronization information;

[0013] After obtaining the target audio segments, the method further includes:

[0014] Synchronously play the audio data and the video data according to the target audio segments, the original video data, and the synchronization information.

[0015] In one of the embodiments, the separating the audio data in the original audio format to obtain a plurality of audio segments includes:

[0016] Identify pauses in the audio data of the original audio format;

[0017] Using the pauses as separation points, separate the audio data of the original audio format to obtain multiple audio segments.

[0018] In one embodiment, separating the audio data of the original audio format to obtain multiple audio segments includes:

[0019] Obtain a preset duration;

[0020] Separate the audio data of the original audio format according to the preset duration to obtain multiple audio segments.

[0021] In one embodiment, processing the prohibited words in the audio segment based on the prohibited word processing model to obtain a target audio segment includes:

[0022] Based on the prohibited word processing model, identify the prohibited words in the audio segment;

[0023] Perform silence processing on the prohibited words in the audio segment to obtain the target audio segment.

[0024] In one embodiment, processing the prohibited words in the audio segment based on the prohibited word processing model to obtain a target audio segment includes:

[0025] Based on the prohibited word processing model, identify the prohibited words in the audio segment;

[0026] Obtain the replacement words corresponding to the prohibited words;

[0027] Replace the prohibited words in the audio segment with the replacement words corresponding to the prohibited words to obtain the target audio segment.

[0028] In one embodiment, the prohibited word processing model is deployed locally; the prohibited word processing model supports cloud updates.

[0029] In a second aspect, an embodiment of the present application provides a device for processing prohibited words in audio, including:

[0030] An audio acquisition module for acquiring audio data;

[0031] An audio decoding module for decoding the audio data to obtain audio data in the original audio format;

[0032] An audio segmentation module for separating the audio data in the original audio format to obtain multiple audio segments; and

[0033] A prohibited word processing module, configured to process the prohibited words in the audio clip based on a prohibited word processing model to obtain a target audio clip.

[0034] In one embodiment, the apparatus further includes:

[0035] A video acquisition module, configured to acquire video data;

[0036] A video decoding module, configured to decode the video data to obtain original video data;

[0037] A synchronization processing module, configured to perform synchronization processing on the original video data and the audio data in the original audio format to obtain synchronization information;

[0038] After obtaining the target audio clip, the apparatus further includes:

[0039] A synchronous playback module, configured to synchronously play the audio data and the video data according to the target audio clip, the original video data, and the synchronization information.

[0040] In one embodiment, the audio segmentation module includes:

[0041] A pause recognition unit, configured to recognize pauses in the audio data in the original audio format;

[0042] A first segmentation unit, configured to segment the audio data in the original audio format with the pauses as separation points to obtain a plurality of the audio clips.

[0043] In one embodiment, the audio segmentation module includes:

[0044] A duration acquisition unit, configured to acquire a preset duration;

[0045] A second segmentation unit, configured to segment the audio data in the original audio format according to the preset duration to obtain a plurality of the audio clips.

[0046] In one embodiment, the prohibited word processing module includes:

[0047] A first prohibited word recognition unit, configured to recognize the prohibited words in the audio clip based on a prohibited word processing model;

[0048] A mute processing unit, configured to perform mute processing on the prohibited words in the audio clip to obtain the target audio clip.

[0049] In one embodiment, the prohibited word processing module includes:

[0050] A second prohibited word recognition unit, configured to recognize prohibited words in the audio segment based on a prohibited word processing model;

[0051] A replacement word acquisition unit, configured to acquire replacement words corresponding to the prohibited words;

[0052] A replacement unit, configured to replace the prohibited words in the audio segment with the replacement words corresponding to the prohibited words to obtain the target audio segment.

[0053] In one embodiment, the prohibited word processing model is deployed locally; the prohibited word processing model supports cloud updates.

[0054] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above-mentioned method for processing prohibited words in audio are implemented.

[0055] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method for processing prohibited words in audio are implemented.

[0056] In a fifth aspect, an embodiment of the present application further provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementation manners of the embodiments of the present application.

[0057] In summary, in the embodiments of the present application, audio data can be acquired; the audio data is decoded to obtain audio data in an original audio format; the audio data in the original audio format is segmented to obtain a plurality of audio segments; based on a prohibited word processing model, the prohibited words in the audio segments are processed to obtain a target audio segment. In this way, the audio data can be directly processed, the prohibited words in the audio can be directly recognized, and then the prohibited words can be processed to obtain a target audio segment that does not contain prohibited words, without first converting the audio data into text, which can greatly improve the efficiency of processing prohibited words, thereby realizing the efficient processing of prohibited words in audio; for a live broadcast scenario, the real-time performance of the live broadcast can be ensured. Description of the Drawings

[0058] To more clearly illustrate the technical solutions in this application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0059] Figure 1 It is a schematic diagram of the steps of a method for processing prohibited words in audio provided by an embodiment of this application;

[0060] Figure 2 It is a schematic diagram of the architecture of a method for processing prohibited words in audio provided by an embodiment of this application;

[0061] Figure 3 It is a schematic diagram of the structure of a device for processing prohibited words in audio provided by an embodiment of this application;

[0062] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of this application. Detailed implementation manners

[0063] The following will clearly and completely describe the technical solutions in this application in conjunction with the accompanying drawings in this application. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0064] In one embodiment, as Figure 1 shown, a method for processing prohibited words in audio is provided. Although the logical order is shown in the schematic diagram of the steps, in some cases, the steps shown or described can be executed in an order different from that shown in the accompanying drawings. Specifically, this method for processing prohibited words in audio can be applied to a terminal, where the terminal can include, but is not limited to, one or more of a smart TV, a smart phone, a tablet computer, a portable computer, a desktop computer, and a vehicle-mounted computer.

[0065] The embodiments of this application can be applied to live scenarios such as live interview programs and real-time news broadcasts to achieve efficient processing of prohibited words in the audio of the live scenario and ensure the real-time nature and smoothness of the live broadcast; it can also be applied to non-live scenarios to efficiently process prohibited words in the audio of non-live scenarios.

[0066] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.

[0067] According to Figure 1The method for processing prohibited words in the audio shown, this method at least includes steps S110 to S140, which are introduced in detail as follows:

[0068] In step S110, audio data is acquired.

[0069] The audio data can be any audio data. The audio data can be live audio data or non-live audio data. The audio data can be independent audio data. For example, the audio data can be a song, a radio drama, or a podcast, etc. The audio data can also be audio data that matches video data. For example, in a live interview program, video data containing the images of the interviewees and audio data of the conversations of the interviewees will be output simultaneously, and the audio data matches the video data.

[0070] In a live scenario, the audio data can be obtained through a coaxial cable, a satellite antenna, or the Internet, etc.; in a non-live scenario, the audio data can also be obtained through a coaxial cable, a satellite antenna, or the Internet, etc., and can also be read from a local or other storage device.

[0071] In step S120, the audio data is decoded to obtain audio data in the original audio format.

[0072] The format of the audio data can be any audio format, such as WAV, FLAC, ALAC, MP3, AAC, WMA, AIFF, or OGG, etc.

[0073] By using an audio decoder to decode the audio data, audio data in the original audio format can be obtained. The original audio format can be Pulse Code Modulation (PCM) format. The PCM format is a coding method that converts analog signals into digital signals, which can faithfully record and restore the details and dynamic range of the original analog signals. Almost all audio processing devices and software support the input and output of the PCM format. It is the common language in the audio field and can interact well with other formats and devices in all aspects such as audio acquisition, processing, storage, transmission, and playback.

[0074] In step S130, the audio data in the original audio format is segmented to obtain multiple audio segments.

[0075] In order to improve the efficiency of processing prohibited words, the audio data in the original audio format can be divided into multiple audio segments, so that the subsequent prohibited word processing model can quickly complete the processing of each audio segment.

[0076] In one embodiment, the audio data in the original audio format can be segmented into multiple audio segments according to the pauses in the audio data, and the format of each audio segment remains the original audio format.

[0077] In another embodiment, the audio data in the original audio format can be separated according to a preset duration to obtain multiple audio segments, and the format of each audio segment remains the original audio format.

[0078] In step S140, based on the prohibited word processing model, the prohibited words in the audio segment are processed to obtain the target audio segment.

[0079] The prohibited word processing model can be a model that has pre-learned the audio signals of prohibited words. Therefore, the prohibited word processing model can identify the audio signals of prohibited words in the audio segment. The prohibited words can be set according to actual needs. For example, the prohibited words can be non-compliant words or words with personal attacks, etc.

[0080] A speech library of the audio signals of prohibited words can be pre-constructed, and the audio signals of prohibited words are stored in the speech library. The audio signals of prohibited words in the speech library support operations such as addition, deletion, and modification. The speech signals of prohibited words can be pre-collected or the speech signals of prohibited words generated by a machine based on the prohibited word text.

[0081] The prohibited word processing model can be deployed locally on the terminal. Each audio segment is input into the prohibited word processing model, and the prohibited word processing module can identify the audio signals of prohibited words in the audio segment, thereby processing the prohibited words to eliminate the audio signals of prohibited words in the audio segment and obtaining the target audio segment. The target audio segment is an audio segment that does not contain prohibited words.

[0082] In one embodiment, the processing of prohibited words can be to mute the audio signals of prohibited words in the audio segment.

[0083] In another embodiment, the processing of prohibited words can be to replace the audio signals of prohibited words in the audio segment with other audio signals.

[0084] It can be understood that when the audio segment itself does not contain the audio signals of prohibited words, the audio segment is the same as the corresponding target audio segment. When the audio segment contains the audio signals of prohibited words, the target audio segment is obtained by processing the audio signals of prohibited words in the audio segment.

[0085] After obtaining the target audio segments, the multiple target audio segments are combined in the order of their appearance in the audio data, and the target audio data of the audio signal without prohibited words can be obtained. The format of the target audio data can be the original audio format. Optionally, the target audio data can be converted into other audio formats to adapt to different audio players for playing the target audio data.

[0086] By adopting the technical solution of the embodiment of the present application, the audio data can be directly processed, the prohibited words in the audio can be directly recognized, and then the prohibited words can be processed to obtain the target audio segments without prohibited words. There is no need to first convert the audio data into text, which can greatly improve the efficiency of processing prohibited words, thereby realizing the efficient processing of prohibited words in the audio; for the live broadcast scenario, the real-time nature of the live broadcast can be ensured.

[0087] On the basis of the above technical solution, as an embodiment, Figure 2 is a schematic structural diagram of a method for processing prohibited words in audio provided by an embodiment of the present application. As shown in Figure 2 In the figure, the method for processing prohibited words in audio may further include: obtaining video data; decoding the video data to obtain the original video data; performing synchronization processing on the original video data and the audio data in the original audio format to obtain synchronization information. After obtaining the target audio segments, the method may further include: synchronously playing the audio data and the video data according to the target audio segments, the original video data, and the synchronization information.

[0088] When the audio data is audio data matching the video data, video data may also be obtained. The video data may be live video data or non-live video data. The video data may be any video data matching the audio data. For example, the video data may be a game live video or a TV drama.

[0089] In the live broadcast scenario, the video data may be obtained through a cable TV line, a satellite antenna, the Internet, etc.; in the non-live broadcast scenario, the video data may also be obtained through a cable TV line, a satellite antenna, the Internet, etc., and may also be read from a local or other storage device.

[0090] The format of the video data may be any video format, such as AVI, WMV, MP4, 3GP, MOV, MXF, FLV, MKV, or AVCHD, etc.

[0091] The video data can be decoded by a video decoder to obtain the original video data. A video is a dynamic picture formed by rapidly playing a series of consecutive images. Therefore, the original video data can be the original video frame sequence, and the image format of the video frame sequence obtained after decoding can be in formats such as RGB or YUV. The embodiments of the present application do not limit this.

[0092] Since the video data is data that matches the audio data, there is synchronization information between the video data and the audio data. The synchronization information is used to determine the video data and audio data to be played at the same playback moment. Before segmenting the audio data in the original audio format, the original video data and the audio data in the original audio format can be synchronized using an audio-visual synchronization algorithm to obtain the synchronization information between the original video data and the audio data in the original audio format. It can be understood that this synchronization information is also the synchronization information between the audio data and the video data.

[0093] Optionally, the audio-visual synchronization algorithm can be a timestamp-based synchronization algorithm; during the encoding process of the audio-visual data, a timestamp is added to each audio and video frame to indicate the time when the frame should be played, and at the playback end, the playback order and time of the audio and video are controlled based on these timestamps to ensure that they are played at the correct time points.

[0094] After obtaining the synchronization information, the audio data in the original audio format can be segmented to obtain multiple audio segments; and based on a prohibited word processing model, the prohibited words in the audio segments are processed to obtain target audio segments. After processing the prohibited words, the target audio segments are processed to obtain target audio data that does not contain prohibited words. It can be to combine the multiple target audio segments in the order in which they appear in the audio data to obtain the target audio data.

[0095] Based on the target audio segments, the original video data, and the synchronization information, the audio data and the video data can be played synchronously. The audio data played synchronously can be the target audio data that does not contain prohibited words.

[0096] The original video data is obtained by decoding the video data. Therefore, the video data played synchronously can directly be the initially acquired video data. Optionally, in order to adapt to different video players, the original video data can also be converted into video data in other video formats, and the target audio data and the video data converted into other video formats are played synchronously.

[0097] Optionally, before synchronously playing the audio data and the video data, the audio data and the video data may be correspondingly processed according to the playing parameters of the terminal. The playing parameters may include playing size, resolution, and / or volume size, etc. According to the playing parameters of the terminal, the picture size of the video data may be scaled, the picture quality of the video may be adjusted, etc., and finally the video data is played through the screen of the terminal. According to the playing parameters of the terminal, the sound quality and / or power amplifier of the audio data may be adjusted, and finally the audio data is output through the audio output device. The audio output device may be a speaker or a headphone, etc.

[0098] By adopting the technical solution of the embodiment of the present application, first determining the synchronization information between the audio data and the video data, and then performing segmentation and prohibited word processing on the audio data in the original audio format, it is possible to avoid the technical problem that the difficulty of determining the synchronization information increases due to the change of characteristics such as the duration and rhythm of the audio during the audio processing process; according to the synchronization information, audio-visual synchronization can be ensured, bringing a good audio-visual experience to the audience.

[0099] On the basis of the above technical solution, as an embodiment, the separating the audio data in the original audio format to obtain a plurality of audio segments may include: identifying pauses in the audio data in the original audio format; using the pauses as separation points to separate the audio data in the original audio format to obtain a plurality of the audio segments.

[0100] Audio data often has pauses, and the pauses in the audio data in the original audio format can be identified. An audio signal with a volume lower than the volume threshold or an audio signal with a volume of 0 in the audio data in the original audio format can be regarded as a pause in the audio data in the original audio format. The volume threshold can be set according to actual needs.

[0101] Optionally, it may be an audio signal with a volume lower than the volume threshold or an audio signal with a volume of 0 in the audio data in the original audio format, and when the duration of the audio signal with a volume lower than the volume threshold / volume of 0 exceeds the duration threshold, then the audio signal is regarded as a pause in the audio data in the original audio format. The duration threshold can be set according to actual needs.

[0102] For example, an audio signal with a volume of 0 and a duration exceeding 0.1 second in the audio data in the original audio format can be determined as a pause in the audio data in the original audio format.

[0103] Optionally, after dividing the audio data in the original audio format into a plurality of audio segments according to the pauses, it may be detected whether the duration of each audio segment exceeds a preset duration. If the duration of the audio segment exceeds the preset duration, then the audio segment may be divided into a plurality of audio segments that are equal and do not exceed the preset duration.

[0104] By adopting the technical solution of the embodiment of the present application, the audio data in the original audio format can be segmented according to the pauses in the audio data in the original audio format. Since the pauses in the audio data in the original audio format are often the natural intervals between voices, after the audio is segmented according to the pauses, the environmental noise or other interference signals that may exist during the pauses can be effectively removed. Since the model has a better processing effect on shorter and relatively independent speech segments, after the audio data is segmented according to the pauses, the obtained audio segments are more in line with the processing characteristics of the model. The model can more accurately analyze the speech features of each audio segment, match it with the speech library, and thus improve the accuracy of recognition.

[0105] Based on the above technical solution, as an embodiment, the separating the audio data in the original audio format to obtain multiple audio segments may include: obtaining a preset duration; separating the audio data in the original audio format according to the preset duration to obtain multiple audio segments.

[0106] The preset duration can be set according to actual needs, and the preset duration is the duration that is convenient for the prohibited word processing model to process.

[0107] In one embodiment, when the duration of the audio data in the original audio format exceeds the preset duration, the audio data in the original audio format can be segmented into multiple audio segments with the preset duration. For example, if the preset duration is 0.5 seconds, an audio data with a length of 5.3 seconds can be segmented into ten 0.5 - second audio segments and one 0.3 - second audio segment.

[0108] In another embodiment, when the duration of the audio data in the original audio format exceeds the preset duration, the audio data in the original audio format can be evenly divided so that the duration of each audio segment does not exceed the preset duration. For example, if the preset duration is 0.5 seconds, an audio data with a length of 5.3 seconds can be evenly divided into 11 audio segments with a duration of 0.48 seconds.

[0109] By adopting the technical solution of the embodiment of the present application, the audio data in the original audio format is segmented into multiple audio segments not exceeding the preset duration. Then, when the subsequent prohibited word processing model processes the audio segments, the processing efficiency can be improved.

[0110] Based on the above technical solution, as an embodiment, the processing the prohibited words in the audio segment based on the prohibited word processing model to obtain the target audio segment may include: identifying the prohibited words in the audio segment based on the prohibited word processing model; performing a mute process on the prohibited words in the audio segment to obtain the target audio segment.

[0111] The prohibited word processing model can be a model that has pre-learned the audio signals of prohibited words. Therefore, the prohibited word processing model can identify the audio signals of prohibited words in the audio segment.

[0112] After identifying the audio signals of prohibited words in the audio segment, the audio signals of prohibited words in the audio segment can be muted. Specifically, the volume of the audio signals of prohibited words in the audio segment can be adjusted to 0 to achieve muting.

[0113] By adopting the technical solution of the embodiment of the present application, by muting the audio signals of prohibited words in the audio segment, the prohibited words in the output audio data can be avoided, thereby avoiding the adverse effects caused by the prohibited words to the listeners.

[0114] On the basis of the above technical solution, as an embodiment, processing the prohibited words in the audio segment based on the prohibited word processing model to obtain a target audio segment may include: identifying the prohibited words in the audio segment based on the prohibited word processing model; obtaining the replacement words corresponding to the prohibited words; and replacing the prohibited words in the audio segment with the replacement words corresponding to the prohibited words to obtain the target audio segment.

[0115] The prohibited word processing model can be a model that has pre-learned the audio signals of prohibited words. Therefore, the prohibited word processing model can identify the audio signals of prohibited words in the audio segment.

[0116] According to the length of the audio signals of prohibited words in the identified audio segment, the audio signals of replacement words of the same length can be obtained. The audio signals of replacement words can be fixed audio signals. For example, they can be continuous "beep" sounds, and the length of the "beep" sound is the same as the length of the audio signals of prohibited words.

[0117] Delete the audio signals of prohibited words from the audio segment, and add the obtained audio signals of replacement words of the same length to the position where the audio signals of prohibited words in the audio segment originally were, to obtain the target audio segment.

[0118] Optionally, the replacement words corresponding to the prohibited words can be words that are semantically similar to the prohibited words but are not prohibited words. The audio signals of the replacement words corresponding to some or all of the prohibited words can be determined in advance, and the audio signals of the prohibited words and the audio signals of the replacement words corresponding to the prohibited words are stored in correspondence. When the audio signals of prohibited words in the identified audio segment are recognized, the audio signals of the replacement words corresponding to the audio signals of the prohibited words are obtained, and the audio signals of prohibited words in the audio segment are replaced.

[0119] By adopting the technical solution of the embodiment of the present application, using the audio signal of the replacement word with the same length to replace the audio signal of the prohibited word in the audio segment, it is possible to block the prohibited word in the audio segment while ensuring that the length of the audio segment remains unchanged, thereby avoiding the adverse impact caused by the prohibited word to the listener.

[0120] On the basis of the above technical solution, as an embodiment, the prohibited word processing model is deployed locally; the prohibited word processing model supports cloud update.

[0121] The prohibited word processing model can be trained on the cloud server or locally on the terminal. The training of the prohibited word processing model can be obtained through supervised training according to the audio segment samples of the audio signal samples containing prohibited words. The specific training method of the prohibited word processing model can refer to the related technology.

[0122] The trained prohibited word processing model can be deployed locally on the terminal. In this way, after the terminal receives the audio data, it can directly use the local prohibited word processing model to process the prohibited words in the audio data; compared with deploying the prohibited word processing model in the server, it can avoid the problem that the prohibited word processing is not timely due to network fluctuations.

[0123] The cloud can collect and integrate a large amount of the latest data in real time, so as to iterate and update the prohibited word processing model, and send the updated prohibited word processing model to the terminal to update the prohibited word processing model in the terminal.

[0124] By adopting the technical solution of the embodiment of the present application and deploying the prohibited word processing model locally on the terminal, it is possible to improve the efficiency of processing the audio data received by the terminal, ensure real-time performance, and avoid the problem that the prohibited word has been broadcast before the prohibited word is processed; by updating the prohibited word processing model deployed locally on the terminal through the cloud, the prohibited word processing model can continuously adapt to the new environment and changes; through cloud update, the training and most of the processing work of the prohibited word processing model are carried out on the powerful computing resources of the cloud, and the terminal only needs to be responsible for receiving and applying the updated prohibited word processing model, which can greatly reduce the local demand for computing resources and reduce costs.

[0125] To facilitate better implementation of the prohibited word processing method in the audio of the present application, the present application also provides a prohibited word processing device in the audio based on the above prohibited word processing method in the audio. The meanings of the nouns are the same as those in the above prohibited word processing method in the audio, and the specific implementation details can refer to the description in the method embodiment.

[0126] Please refer to Figure 3 , Figure 4It is a schematic structural diagram of a prohibited word processing device in the audio provided by an embodiment of the present application. The prohibited word processing device in the audio can be applied to a terminal. The prohibited word processing device in the audio includes:

[0127] An audio acquisition module 301, configured to acquire audio data;

[0128] An audio decoding module 302, configured to decode the audio data to obtain audio data in an original audio format;

[0129] An audio segmentation module 303, configured to segment the audio data in the original audio format to obtain a plurality of audio segments; and

[0130] A prohibited word processing module 304, configured to process prohibited words in the audio segments based on a prohibited word processing model to obtain target audio segments.

[0131] In one embodiment, the device further includes:

[0132] A video acquisition module, configured to acquire video data;

[0133] A video decoding module, configured to decode the video data to obtain original video data;

[0134] A synchronization processing module, configured to perform synchronization processing on the original video data and the audio data in the original audio format to obtain synchronization information;

[0135] After obtaining the target audio segments, the device further includes:

[0136] A synchronous playback module, configured to synchronously play the audio data and the video data according to the target audio segments, the original video data, and the synchronization information.

[0137] In one embodiment, the audio segmentation module 303 includes:

[0138] A pause recognition unit, configured to recognize pauses in the audio data in the original audio format;

[0139] A first segmentation unit, configured to segment the audio data in the original audio format with the pauses as segmentation points to obtain a plurality of the audio segments.

[0140] In one embodiment, the audio segmentation module 303 includes:

[0141] A duration acquisition unit, configured to acquire a preset duration;

[0142] A second segmentation unit, configured to segment the audio data in the original audio format according to the preset duration, so as to obtain a plurality of the audio segments.

[0143] In one embodiment, the prohibited word processing module 304 includes:

[0144] A first prohibited word recognition unit, configured to recognize prohibited words in the audio segment based on a prohibited word processing model;

[0145] A mute processing unit, configured to perform mute processing on the prohibited words in the audio segment to obtain the target audio segment.

[0146] In one embodiment, the prohibited word processing module 304 includes:

[0147] A second prohibited word recognition unit, configured to recognize prohibited words in the audio segment based on a prohibited word processing model;

[0148] A replacement word acquisition unit, configured to acquire a replacement word corresponding to the prohibited word;

[0149] A replacement unit, configured to replace the prohibited word in the audio segment with the replacement word corresponding to the prohibited word to obtain the target audio segment.

[0150] In one embodiment, the prohibited word processing model is deployed locally; the prohibited word processing model supports cloud update.

[0151] By adopting the technical solution of the embodiment of the present application, audio data can be directly processed, prohibited words in the audio can be directly recognized, so as to process the prohibited words to obtain a target audio segment that does not contain prohibited words. There is no need to first convert the audio data into text, which can greatly improve the efficiency of processing prohibited words, thereby realizing the efficient processing of prohibited words in the audio; for the live broadcast scenario, the real-time performance of the live broadcast can be guaranteed.

[0152] For the specific definition of the prohibited word processing device in the audio, reference can be made to the definition of the prohibited word processing method in the foregoing text, which will not be elaborated herein. Each module in the above-mentioned prohibited word processing device in the audio can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor in the computer device in hardware form or independent of the processor, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0153] In addition, the present application further provides an electronic device, as Figure 4 shown, which shows a schematic structural diagram of the electronic device involved in the present application. Specifically:

[0154] The electronic device may include components such as a processor 401 with one or more processing cores and a memory 402 of one or more computer-readable storage media. Those skilled in the art can understand that Figure 4 the structure of the electronic device shown in

[0155] does not limit the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:

[0156] The processor 401 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 402, and by invoking data stored in the memory 402, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 401.

[0157] In one embodiment, the electronic device further includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.

[0158] In one embodiment, the electronic device may further include an input unit 404, which may be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0159] Although not shown, the electronic device may further include a display unit and the like, which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, so as to implement the steps in any of the prohibited word processing methods in audio provided by this application embodiment.

[0160] Those skilled in the art can understand that Figure 4 the structure shown in

[0161] In one embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the method described in any embodiment of this application is implemented.

[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of this application is implemented.

[0163] In some embodiments, a computer program product is further proposed, including a computer program or instruction. When the computer program or instruction is executed by a processor, the method described in any embodiment of this application is implemented.

[0164] For the specific implementation of the above operations, reference may be made to the previous embodiments, which will not be elaborated here.

[0165] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0166] Therefore, this application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any of the prohibited word processing methods provided by this application.

[0167] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated herein.

[0168] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0169] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the methods for processing prohibited words in audio provided by this application, the beneficial effects achievable by any of the methods for processing prohibited words in audio provided by this application can be realized. For details, refer to the previous embodiments and will not be elaborated herein.

[0170] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0171] The above has introduced in detail a method, apparatus, electronic device and computer-readable storage medium for processing prohibited words in audio provided by this application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A method for processing prohibited words in audio, characterized in that, Including: Obtain audio data; Decode the audio data to obtain audio data in the original audio format; Separate the audio data in the original audio format to obtain multiple audio segments; And Based on a prohibited word processing model, process the prohibited words in the audio segments to obtain target audio segments.

2. The method according to claim 1, characterized in that, The method further includes: Obtain video data; Decode the video data to obtain original video data; Synchronize the original video data and the audio data in the original audio format to obtain synchronization information; After obtaining the target audio segments, the method further includes: According to the target audio segments, the original video data, and the synchronization information, synchronously play the audio data and the video data.

3. The method according to claim 1, characterized in that, The separating the audio data in the original audio format to obtain multiple audio segments includes: Identify pauses in the audio data in the original audio format; Using the pauses as separation points, separate the audio data in the original audio format to obtain multiple audio segments.

4. The method according to claim 1, wherein The separating the audio data in the original audio format to obtain multiple audio segments includes: Obtain a preset duration; According to the preset duration, separate the audio data in the original audio format to obtain multiple audio segments.

5. The method according to claim 1, wherein The processing the prohibited words in the audio segments based on a prohibited word processing model to obtain target audio segments includes: Based on a prohibited word processing model, identify the prohibited words in the audio segments; Mute the prohibited words in the audio segments to obtain the target audio segments.

6. The method according to claim 1, wherein The processing the prohibited words in the audio segments based on a prohibited word processing model to obtain target audio segments includes: Based on a prohibited word processing model, identify the prohibited words in the audio segments; Obtain replacement words corresponding to the prohibited words; Replace the prohibited words in the audio segments with the replacement words corresponding to the prohibited words to obtain the target audio segments.

7. According to the method described in any one of claims 1 to 6, characterized in that, The prohibited word processing model is deployed locally; the prohibited word processing model supports cloud updates.

8. An apparatus for processing prohibited words in audio, characterized in that Including: An audio acquisition module for obtaining audio data; An audio decoding module for decoding the audio data to obtain audio data in the original audio format; An audio segmentation module for separating the audio data in the original audio format to obtain multiple audio segments; And A prohibited word processing module for processing the prohibited words in the audio segments based on a prohibited word processing model to obtain target audio segments.

9. An electronic device, characterized in that, Including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the steps in the method for processing prohibited words in audio as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, and when the computer program is executed by a processor, the steps in the method for processing prohibited words in audio as described in any one of claims 1 to 7 are implemented.