Audio playback method, device, electronic device and storage medium

By identifying and processing abnormal sound clips in smart terminals, the problem of users being disturbed by noise during entertainment is solved and the user experience of audio playback is improved.

CN114121050BActive Publication Date: 2024-09-03BEIJING UNISOUND INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111451000.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-09-03
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

Smart terminal users are often disturbed by abnormal sound clips when listening to music, watching videos or playing games, resulting in a poor experience.

Method used

By obtaining the audio to be played, determine whether it contains abnormal fragments, use the pre-established abnormal voiceprint recognition library to identify it, and reduce or replace the volume of the abnormal fragments to generate optimized audio.

Benefits of technology

It effectively removes abnormal sound interference and improves the user experience, especially the listening and experience effects when playing through headphones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114121050B
    Figure CN114121050B
Patent Text Reader

Abstract

The embodiment of the present application discloses an audio playback method, device, electronic device and storage medium. A specific implementation of the method includes: obtaining audio to be played; determining whether the audio to be played includes an abnormal segment; in response to determining that the audio to be played includes an abnormal segment, optimizing the abnormal segment included in the audio to be played to obtain optimized audio; playing the optimized audio. This implementation optimizes the abnormal segment in the audio to be played and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to an audio playback method, device, electronic device, and storage medium. Background Art

[0002] With the development of smart terminals, the entertainment functions of smart terminals are becoming more and more abundant. Users can use smart terminals to listen to music, watch videos or play games and other entertainment activities. However, users often receive some abnormal sound fragments, such as noise fragments, in the process, which interferes with the user and the experience is very bad. Summary of the invention

[0003] The embodiments of the present application provide an audio playback method, device, electronic device, and storage medium.

[0004] In a first aspect, some embodiments of the present application provide an audio playback method, the method comprising: obtaining audio to be played; determining whether the audio to be played includes abnormal segments; in response to determining that the audio to be played includes abnormal segments, optimizing the abnormal segments included in the audio to be played to obtain optimized audio; and playing the optimized audio.

[0005] In some embodiments, determining whether the audio to be played includes an abnormal segment includes: determining whether the audio to be played will be played through headphones; in response to determining that the audio to be played will be played through headphones, determining whether the audio to be played includes an abnormal segment.

[0006] In some embodiments, determining whether the audio to be played includes an abnormal segment includes: obtaining a voiceprint of the audio to be played; and determining whether the obtained voiceprint includes an abnormal voiceprint through a pre-established abnormal voiceprint recognition library.

[0007] In some embodiments, the abnormal voiceprint recognition library includes a recognition library established through the following steps: statistically storing voiceprints of common noises and preset abnormal sounds.

[0008] In some embodiments, optimizing the abnormal segment included in the audio to be played to obtain optimized audio includes: reducing the volume of the abnormal segment included in the audio to be played and / or replacing it with preset audio content.

[0009] In a second aspect, some embodiments of the present application provide an audio playback device, comprising: an acquisition unit, configured to acquire audio to be played; a determination unit, configured to determine whether the audio to be played includes abnormal segments; an optimization unit, configured to optimize the abnormal segments included in the audio to be played to obtain optimized audio in response to determining that the audio to be played includes abnormal segments; and a playback unit, configured to play the optimized audio.

[0010] In some embodiments, the determination unit includes: a first determination subunit, configured to determine whether the audio to be played will be played through headphones; a second determination subunit, configured to determine whether the audio to be played includes abnormal segments in response to determining that the audio to be played will be played through headphones.

[0011] In some embodiments, the determination unit includes: an acquisition subunit configured to acquire the voiceprint of the audio to be played; and an identification subunit configured to determine whether the acquired voiceprint includes an abnormal voiceprint through a pre-established abnormal voiceprint identification library.

[0012] In some embodiments, the device further comprises an abnormal voiceprint recognition library establishing unit, and the abnormal voiceprint recognition library establishing unit is configured to: perform statistical storage on the voiceprints of common noises and preset abnormal sounds.

[0013] In some embodiments, the optimization unit is further configured to: reduce the volume of abnormal segments included in the audio to be played and / or replace them with preset audio content.

[0014] In a third aspect, some embodiments of the present application provide a device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above in the first aspect.

[0015] In a fourth aspect, some embodiments of the present application provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described above in the first aspect.

[0016] The audio playback method, device, electronic device and storage medium provided in the embodiments of the present application obtain audio to be played; determine whether the audio to be played includes abnormal segments; in response to determining that the audio to be played includes abnormal segments, optimize the abnormal segments included in the audio to be played to obtain optimized audio; play the optimized audio, optimize the abnormal segments in the audio to be played, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0018] Figure 1 are some exemplary system architecture diagrams to which the present application may be applied;

[0019] Figure 2 is a flowchart of an embodiment of an audio playback method according to the present application;

[0020] Figure 3 is a structural schematic diagram of an embodiment of an audio playback device according to the present application;

[0021] Figure 4 It is a structural diagram of a computer system of a server or terminal suitable for implementing some embodiments of the present application. DETAILED DESCRIPTION

[0022] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0024] Figure 1 An exemplary system architecture 100 to which an embodiment of the audio playback method or audio playback device of the present application can be applied is shown.

[0025] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0026] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various client applications can be installed on terminal devices 101, 102, 103, such as music playing applications, video playing applications, e-commerce applications, game applications, etc.

[0027] The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices with audio playback functions, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When the terminal devices 101, 102, 103 are software, they may be installed in the electronic devices listed above. They may be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.

[0028] Server 105 can be a server that provides various services, such as a background server that provides support for applications installed on terminal devices 101, 102, and 103. Server 105 can obtain audio to be played; determine whether the audio to be played includes abnormal segments; in response to determining that the audio to be played includes abnormal segments, optimize the abnormal segments included in the audio to be played to obtain optimized audio; and play the optimized audio.

[0029] It should be noted that the audio playback method provided in the embodiment of the present application can be executed by the server 105 or by the terminal devices 101, 102, 103. Accordingly, the audio playback device can be set in the server 105 or in the terminal devices 101, 102, 103.

[0030] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, used to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0031] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0032] Continue to refer Figure 2 , shows a process 200 of an embodiment of an audio playback method according to the present application. The audio playback method comprises the following steps:

[0033] Step 201, obtaining the audio to be played.

[0034] In this embodiment, the audio playback method execution body (eg Figure 1 The server or terminal shown in the figure can obtain the audio to be played in response to receiving the audio play instruction or in response to a certain play setting. The audio to be played may include the audio to be played when the user is performing entertainment activities such as listening to music, watching videos or playing games.

[0035] Step 202: Determine whether the audio to be played includes an abnormal segment.

[0036] In this embodiment, the above-mentioned execution subject can determine whether the audio to be played obtained in step 201 includes abnormal segments, which are abnormal sound segments, and can include various discordant sound segments, such as sounds with too loud volume, scratching glass and other harsh or uncivilized sounds. Abnormal segments can be detected by a pre-set abnormal voiceprint recognition library or a pre-trained abnormal voiceprint recognition model. Since voiceprints also belong to the category of images, they can be trained with reference to the training methods of common image recognition models. In addition, since voiceprints can be regarded as a waveform, abnormal voiceprints can also be identified by setting upper and lower limits of the waveform.

[0037] In some optional implementations of this embodiment, determining whether the audio to be played includes an abnormal segment includes: determining whether the audio to be played will be played through headphones; in response to determining that the audio to be played will be played through headphones, determining whether the audio to be played includes an abnormal segment. In this implementation, the execution subject can determine whether the audio to be played will be played through headphones by detecting whether the terminal is connected to headphones and / or determining whether the user is wearing headphones through hardware devices such as headphones.

[0038] Compared with the case where audio is played through speakers, the impact of hearing abnormal fragments when the user wears headphones is more direct and may cause greater damage to the user's hearing or experience. Therefore, in this implementation, before determining whether the audio to be played includes abnormal fragments, it is first determined whether the audio to be played will be played through headphones. Only after it is determined that the audio to be played will it be determined whether the audio to be played includes abnormal fragments. This makes the detection of abnormal fragments more accurate, further improving the efficiency of audio playback.

[0039] In some optional implementations of the present embodiment, determining whether the audio to be played includes an abnormal segment includes: obtaining the voiceprint of the audio to be played; and determining whether the obtained voiceprint includes an abnormal voiceprint through a pre-established abnormal voiceprint recognition library. Voiceprint is a sound wave spectrum that carries speech information and is displayed by an electroacoustic instrument. In the present implementation, the abnormal voiceprint recognition library may store information that can determine the abnormal voiceprint, such as the abnormal voiceprint itself and / or the characteristics of the abnormal voiceprint, and the above-mentioned execution subject may determine whether there is a voiceprint segment in the audio voiceprint to be played that matches the information in the pre-established abnormal voiceprint recognition library. By pre-establishing an abnormal voiceprint recognition library, the present implementation can more comprehensively and individually determine whether the obtained voiceprint includes an abnormal voiceprint.

[0040] In some optional implementations of this embodiment, the abnormal voiceprint recognition library includes a recognition library established through the following steps: statistically storing the voiceprints of common noises and preset abnormal sounds. In this implementation, the voiceprints of common noises and preset abnormal sounds can be directly stored, or the common features of the voiceprints of common noises and preset abnormal sounds can be statistically stored to obtain the abnormal voiceprint recognition library. The preset abnormal sounds can include abnormal sounds set by the user and / or the application provider.

[0041] Step 203: In response to determining that the audio to be played includes an abnormal segment, optimizing the abnormal segment included in the audio to be played to obtain optimized audio.

[0042] In this embodiment, the execution subject can optimize the abnormal segment included in the audio to be played in response to determining in step 202 that the audio to be played includes an abnormal segment to obtain an optimized audio. The optimization process can include volume reduction and / or replacement with preset audio content, or more personalized optimization process can be performed according to the difference of abnormal segments or users, for example, the volume of abnormal segments with too loud volume is reduced, the tone of sharp and piercing abnormal segments is lowered, the abnormal segments that are repeated multiple times are deleted, and the abnormal segments with uncivilized language are replaced.

[0043] In some optional implementations of the present embodiment, the abnormal segment included in the audio to be played is optimized to obtain the optimized audio, including: reducing the volume of the abnormal segment included in the audio to be played and / or replacing it with preset audio content. The above-mentioned execution subject can reduce the volume to a range comfortable for the human ear, and the preset audio content can include common audio such as "drop" sound or can use audio content set by the user. This implementation method can quickly complete the optimization of the abnormal segment by reducing the volume and / or replacing it with preset audio content, further improving the efficiency of audio playback.

[0044] Step 204: play the optimized audio.

[0045] In this embodiment, the execution subject may play the optimized audio obtained by optimizing the abnormal segment included in the audio to be played in step 203.

[0046] The method provided by the above-mentioned embodiment of the present application obtains the audio to be played; determines whether the audio to be played includes abnormal segments; in response to determining that the audio to be played includes abnormal segments, optimizes the abnormal segments included in the audio to be played to obtain optimized audio; plays the optimized audio, optimizes the abnormal segments in the audio to be played, and improves the user experience.

[0047] Further references Figure 3As an implementation of the methods shown in the above figures, the present application provides an embodiment of an audio playback device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0048] like Figure 3 As shown, the audio playback device 300 of this embodiment includes: an acquisition unit 301, a first determination unit 3021, a second determination unit 3022, and a playback unit 304. The acquisition unit is configured to acquire the audio to be played; the determination unit is configured to determine whether the audio to be played includes an abnormal segment; the optimization unit is configured to optimize the abnormal segment included in the audio to be played to obtain an optimized audio in response to determining that the audio to be played includes an abnormal segment; and the playback unit is configured to play the optimized audio.

[0049] In this embodiment, the specific processing of the acquisition unit 301, the determination unit 302, the optimization unit 303, and the playback unit 304 of the audio playback device 300 can refer to Figure 2 This corresponds to step 201, step 202, step 203 and step 204 in the embodiment.

[0050] In some optional implementations of this embodiment, the determination unit includes: a first determination subunit, configured to determine whether the audio to be played will be played through headphones; a second determination subunit, configured to determine whether the audio to be played includes abnormal segments in response to determining that the audio to be played will be played through headphones.

[0051] In some optional implementations of this embodiment, the determination unit includes: an acquisition subunit configured to acquire the voiceprint of the audio to be played; and an identification subunit configured to determine whether the acquired voiceprint includes an abnormal voiceprint through a pre-established abnormal voiceprint identification library.

[0052] In some optional implementations of this embodiment, the device further includes an abnormal voiceprint recognition library establishment unit, and the abnormal voiceprint recognition library establishment unit is configured to: perform statistical storage on the voiceprints of common noises and preset abnormal sounds.

[0053] In some optional implementations of this embodiment, the optimization unit is further configured to: reduce the volume of abnormal segments included in the audio to be played and / or replace them with preset audio content.

[0054] The device provided by the above-mentioned embodiment of the present application obtains the audio to be played; determines whether the audio to be played includes abnormal segments; in response to determining that the audio to be played includes abnormal segments, optimizes the abnormal segments included in the audio to be played to obtain optimized audio; plays the optimized audio, optimizes the abnormal segments in the audio to be played, and improves the user experience.

[0055] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 suitable for implementing a server or terminal of an embodiment of the present application. Figure 4 The server or terminal shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0056] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0057] The following components can be connected to the I / O interface 405: an input section 406 including such as a keyboard, a mouse, etc.; an output section 407 including such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.

[0058] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium can be, for example, - but not limited to - a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0059] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0060] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0061] The units involved in the embodiments described in the present application may be implemented by software or by hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a determination unit, an optimization unit, and a playback unit. The names of these units do not constitute limitations on the units themselves in some cases, for example, the acquisition unit may also be described as "configured to acquire an audio unit to be played".

[0062] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device: obtains the audio to be played; determines whether the audio to be played includes an abnormal segment; in response to determining that the audio to be played includes an abnormal segment, optimizes the abnormal segment included in the audio to be played to obtain optimized audio; and plays the optimized audio.

[0063] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. An audio playback method, comprising: Get the audio to be played; Determining whether the audio to be played includes an abnormal segment; In response to determining that the audio to be played includes an abnormal segment, optimizing the abnormal segment included in the audio to be played to obtain optimized audio; Playing the optimized audio; Wherein, determining whether the audio to be played includes an abnormal segment includes: Determine whether the audio to be played will be played through headphones; In response to determining that the audio to be played will be played through headphones, identifying abnormal voiceprints by setting upper and lower limits of the waveform to determine whether the audio to be played includes an abnormal segment; or Obtaining the voiceprint of the audio to be played; It is determined whether the acquired voiceprints include abnormal voiceprints through a pre-established abnormal voiceprint recognition library.

2. The method according to claim 1, wherein: The abnormal voiceprint recognition library includes a recognition library established through the following steps: The voiceprints of common noises and preset abnormal sounds are statistically stored.

3. The method according to claim 1 or 2, wherein: The step of optimizing the abnormal segment included in the audio to be played to obtain optimized audio includes: The volume of the abnormal segment included in the audio to be played is reduced and / or replaced with preset audio content.

4. An audio playback device, comprising: An acquisition unit, configured to acquire audio to be played; a determination unit, configured to determine whether the audio to be played includes an abnormal segment; an optimization unit, configured to, in response to determining that the audio to be played includes an abnormal segment, optimize the abnormal segment included in the audio to be played to obtain an optimized audio; A playing unit, configured to play the optimized audio; Wherein, the determining unit includes: A first determining subunit is configured to determine whether the audio to be played will be played through headphones; The second determining subunit is configured to, in response to determining that the audio to be played will be played through headphones, identify abnormal voiceprints by setting upper and lower limits of the waveform to determine whether the audio to be played includes an abnormal segment; or An acquisition subunit, configured to acquire the voiceprint of the audio to be played; The recognition subunit is configured to determine whether the acquired voiceprints include abnormal voiceprints through a pre-established abnormal voiceprint recognition library.

5. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 3.

6. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.