Audio playback method, device and equipment

By cached and played pre-synthesised audio files on the client side in sequence, and controlling the playback time according to the playback delay parameters, the problem of speech synthesis lag caused by network abnormalities is solved, and the smoothness of audio playback is improved, especially in scenarios such as reading and listening to books is improved.

CN113963680BActive Publication Date: 2025-08-26MIGU CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111216144.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-19
Publication Date
2025-08-26
Estimated Expiration
2041-10-19

AI Technical Summary

Technical Problem

Existing speech synthesis methods are prone to lag when the network is unstable, affecting the smoothness of audio playback.

Method used

By sending an audio pre-synthesis request to the server, receiving the pre-synthesised audio files, and playing the cached audio files in sequence within the timing time according to the playback delay parameters until the timing time ends, ensuring the smoothness of audio playback.

Benefits of technology

In the abnormal network situation, the smoothness of client audio playback is improved through the cache and timed playback mechanism, and the problem of lag is solved, especially in long-term voice synthesis scenarios to improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113963680B_ABST
    Figure CN113963680B_ABST
Patent Text Reader

Abstract

The present invention discloses an audio playback method, apparatus, and device. The method comprises: sending an audio presynthesis request to a server; receiving at least one presynthesized audio file issued by the server in response to the audio presynthesis request; and playing the at least one correctly cached audio file sequentially, one by one, within a corresponding timed duration according to a playback delay parameter until the timed duration expires. The timed duration corresponding to the playback delay parameter is determined based on the estimated playback duration of the presynthesized audio. Through the above-described approach, the present invention can improve the smoothness of audio playback on the client side.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of audio processing technology, and in particular to an audio playback method, device and equipment. Background Art

[0002] Speech synthesis can convert any text message into standard, fluent speech in real time, effectively giving a machine an artificial mouth. It involves multiple disciplines, including acoustics, linguistics, digital signal processing, and computer science. It is a cutting-edge technology in Chinese information processing, primarily addressing the problem of converting text into audible sound—in other words, enabling machines to speak like humans.

[0003] The commonly held concept of "making machines speak like humans" is fundamentally different from traditional audio playback devices (systems). Traditional audio playback devices (systems), such as tape recorders, achieve this by pre-recording and then playing back audio. This approach has significant limitations in terms of content, storage, transmission, convenience, and timeliness. Computer-aided speech synthesis, on the other hand, can convert any text into highly natural speech at any time, truly enabling machines to "speak like humans."

[0004] Current speech synthesis methods, such as the implementation process of TTS (Text To Speech), have at least the following problems: when the network is unstable, playback may be stuck. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention are proposed to provide an audio playback method, apparatus, and device that overcome the above problems or at least partially solve the above problems.

[0006] According to one aspect of an embodiment of the present invention, there is provided an audio playback method, which is applied to a client, and the method includes:

[0007] Send an audio pre-synthesis request to the server;

[0008] receiving at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request;

[0009] According to the playback delay parameter, the at least one correct audio file that has been cached is played one by one in sequence within the corresponding timing duration until the timing duration ends. The timing duration corresponding to the playback delay parameter is determined based on the estimated playback duration of the pre-synthesized audio.

[0010] According to another aspect of an embodiment of the present invention, there is provided an audio playback device, applied to a client, the device comprising:

[0011] a transceiver module configured to send an audio presynthesis request to a server; and receive at least one audio file of presynthesized audio sent by the server according to the audio presynthesis request;

[0012] The processing module is configured to play the at least one correctly cached audio file in sequence one by one within a corresponding timing duration according to a playback delay parameter until the timing duration expires, where the timing duration corresponding to the playback delay parameter is determined based on an estimated playback duration of the pre-synthesized audio.

[0013] According to another aspect of an embodiment of the present invention, there is provided a computing device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0014] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned audio playing method.

[0015] According to another aspect of the embodiments of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to perform operations corresponding to the above-mentioned audio playback method.

[0016] According to the solution provided by the above-mentioned embodiment of the present invention, the audio playback method is applied to the client, by sending an audio pre-synthesis request to the server; receiving at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request; according to the playback delay parameter, within the corresponding timing duration, the correct at least one audio file that has been cached is played one by one in sequence until the timing duration ends. The timing duration corresponding to the playback delay parameter is determined according to the estimated playback duration of the pre-synthesized audio. In this way, an audio file with a jamming abnormality can be played within the timing duration corresponding to the playback delay parameter. The cached audio file with the jamming abnormality can be played, thereby improving the smoothness of the audio playback on the client, thereby solving the jamming problem of speech synthesis under network abnormalities and improving the smoothness of audio playback on the client.

[0017] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the embodiments of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the embodiments of the present invention. The same reference numerals are used throughout the accompanying drawings to denote the same components. In the accompanying drawings:

[0019] Figure 1 A flow chart of an audio playback method provided by an embodiment of the present invention is shown;

[0020] Figure 2 A flowchart of an audio playback method provided by another embodiment of the present invention is shown;

[0021] Figure 3 A schematic structural diagram of an audio playback device provided by an embodiment of the present invention is shown;

[0022] Figure 4 A schematic structural diagram of a computing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0023] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0024] The following embodiments of the present invention address the problem in the prior art of speech synthesis methods that the smoothness of audio playback cannot be guaranteed when a network anomaly occurs. An audio playback method is proposed. When an audio file is played abnormally, the cached audio file is played according to a playback delay parameter within a timed duration corresponding to the playback delay parameter, thereby ensuring smooth audio playback without any lag.

[0025] Figure 1 FIG. 1 is a flow chart of an audio playback method provided by an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0026] Step 11, sending an audio pre-synthesis request to the server;

[0027] Step 12: Receive at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request; here, the pre-synthesized audio is audio data requested by an audio pre-synthesis request. For example, if the audio data requested by the audio pre-synthesis request is a paragraph of an e-book, if the audio data requested by the audio pre-synthesis request is a paragraph, the audio file is a sentence in the paragraph;

[0028] Step 13: Play the at least one correct audio file that has been cached one by one in sequence within a corresponding timing duration according to the playback delay parameter until the timing duration ends. The timing duration corresponding to the playback delay parameter is determined based on the estimated playback duration of the pre-synthesized audio.

[0029] This embodiment sends an audio pre-synthesis request to a server; receives at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request; and plays the at least one correct audio file that has been cached one by one in sequence within a corresponding timing duration according to a playback delay parameter until the timing duration ends, thereby improving the smoothness of client audio playback.

[0030] In an optional embodiment of the present invention, after step 12, the audio playback method may further include:

[0031] Step 121: Store the at least one audio file in a cache in the order in which it is received.

[0032] In a specific implementation example, the client sends an audio pre-synthesis request carrying text to the server for the first time. For example, the current synthesis capability standard is a maximum of 500 characters per request.

[0033] After receiving the first synthesis request from the client, the server synthesizes the text into multiple audio files based on the sentences / paragraphs in the text, and sends the multiple audio files to the client in sequence.

[0034] The client receives multiple synthesized audio files in sequence and stores them in the local client cache in sequence.

[0035] The client calculates the duration (in milliseconds) required to play all the audio files in an audio presynthesis request based on the received cache data of the multiple audio files and the playback speed of the player set by the client.

[0036] In an optional embodiment of the present invention, step 13 may include:

[0037] Step 131, obtaining the playback delay parameter according to the estimated playback duration of the pre-synthesized audio;

[0038] In a specific implementation, the start time of playing the pre-synthesized audio is determined based on the reception time of the first audio file in the cache, and the total playing time of the at least one audio file is estimated based on the playing speed of the player to obtain the end time of playing the pre-synthesized audio.

[0039] Obtaining an estimated playback duration of the pre-synthesized audio according to the start playback time and the end playback time of the pre-synthesized audio, and using the estimated playback duration of the pre-synthesized audio as the duration corresponding to the playback delay parameter;

[0040] Step 132: Play the at least one buffered audio file one by one in sequence within a timing duration corresponding to the playback delay parameter.

[0041] In a specific implementation, the method waits for the timing duration corresponding to the playback delay parameter, and continues to play the at least one correct audio file that has been cached until the duration corresponding to the playback delay parameter ends.

[0042] In this embodiment, when the client locates the first received audio file, it begins playing the audio file. Simultaneously, a delay parameter timer is started, whose timing duration corresponds to the playback delay parameter. When a playback anomaly occurs, the message asynchronous processing mechanism is initiated. Here, the timing duration of the delay parameter timer is equal to the total playback duration of all audio files in a single audio presynthesis request at the current playback rate. At the same time, field information such as the sequence number, playback start time, playback end time, and playback duration of each presynthesized audio segment is provided externally.

[0043] When a network anomaly causes a playback anomaly, it may cause multiple pre-synthesized audios received based on multiple pre-synthesis requests to exist in the client cache. At this time, the client starts the message asynchronous processing mechanism to process the pre-synthesized audio in the cache, which mainly includes: when a network anomaly prompt is received or an error code is generated, the exception information / error code is not processed, and the information is only cached in the cache, which is preferably a memory cache. At the same time, the current pre-synthesized audio continues to be played until the delay parameter timer expires, and the error code, network anomaly information and information related to the progress of this playback are reported. The client selects a correct pre-synthesized audio in the cache for playback based on the text, audio sequence number, audio duration and other information of the pre-synthesized audio that has been played and the delay parameter related data. At the same time, all other pre-synthesized audios in the cache are released.

[0044] The above-mentioned network anomaly judgment can use the existing SDK (software toolkit) anomaly detection distribution mechanism detection, network anomaly prompts, error code generation and other aspects to discover network anomalies.

[0045] Each pre-synthesized audio must be played until the delay parameter timer expires. When a network exception occurs, the client starts the message asynchronous processing mechanism and only caches the exception / error information. Each pre-synthesized audio needs to remain in the playing state before the delay parameter timer expires.

[0046] In an optional embodiment of the present invention, when the duration corresponding to the playback delay parameter ends, the method may further include:

[0047] Step 14, obtaining the playback progress, playback exception information and error code of the pre-synthesized audio;

[0048] Step 15: Report the playing progress, playing exception information and error code of the pre-synthesized audio to the server.

[0049] In this embodiment, after each pre-synthesized audio is played and the delay parameter timer expires, an error code and data related to the current playback progress are reported. Simultaneously, based on the text, audio sequence number, audio duration, and other information of the pre-synthesized audio that has been played, as well as the playback start time, playback end time, and playback duration data, the client selects a correct pre-synthesized audio from the memory buffer for playback. After the pre-synthesized audio begins playing, the client deletes all remaining pre-synthesized audio in the memory and, based on the text content of the currently playing pre-synthesized audio, initiates the next pre-synthesis request again until no network anomalies are reported. After the current pre-synthesized audio is played, the client closes the message asynchronous processing mechanism and resumes the normal synthesis process.

[0050] In an optional embodiment of the present invention, the audio playback method may further include:

[0051] Step 16: Release the cached erroneous audio file so that the memory can continue to cache the audio file of the next audio pre-synthesis request.

[0052] In an optional embodiment of the present invention, in the audio playing method, after releasing the cached erroneous audio file, the method may further include:

[0053] Step 17: determining a starting position of a next audio presynthesis request according to the playback progress of the presynthesized audio;

[0054] Step 18: Initiate a next audio pre-synthesis request to the server according to the starting position of the next audio pre-synthesis request;

[0055] Step 19: Receive at least one audio file of the next pre-synthesized audio sent by the server according to the next audio pre-synthesis request.

[0056] In this embodiment, the client determines the starting position of the next pre-synthesis request based on the text content corresponding to the currently played pre-synthesized audio, and initiates the next audio pre-synthesis request until there are no network anomalies and the message asynchronous processing mechanism is closed.

[0057] The following combination Figure 2 The specific implementation process of the method shown in the process description is as follows:

[0058] The server sends the pre-synthesized audio according to the client's pre-synthesis request;

[0059] When the client starts playing the first audio file received, it immediately sends an audio synthesis request to the server again to pre-synthesize the next pre-synthesized audio. After the server completes the synthesis, it sends the multiple audio files synthesized in this request to the client in sequence. After receiving them, the client caches them in the client memory in sequence.

[0060] Under normal circumstances, after the client receives the first audio file, it is played and the timer is started. When the duration corresponding to the delay parameter is counted out, the entire pre-synthesized audio is played and the next pre-synthesized audio is played.

[0061] When an exception occurs, the client must wait until the delay parameter of this exception is timed out (continue playing the buffered audio file) before reporting the error code and playback progress information.

[0062] When reporting the error code, the client selects the correct next pre-synthesized audio segment from the cached data for playback based on the request text, audio sequence number, playback progress information, and delay parameters.

[0063] All erroneous buffers are released according to the correct delay parameter of the next audio segment, and the next audio segment pre-synthesis operation is carried out according to the text-to-speech TTS synthesis mechanism.

[0064] The above-described embodiments of the present invention address the issue of audio playback lag during speech synthesis playback under network anomalies, thereby improving the smoothness of audio playback on the client side. The solutions described in these embodiments can significantly enhance user experience, particularly in scenarios where speech synthesis capabilities are used for extended periods, such as reading, listening to books, or consuming news.

[0065] Figure 3 FIG. 3 shows a schematic diagram of the structure of the audio playback device 30 provided in an embodiment of the present invention. Figure 3 As shown, the device 30 is applied to the client and includes:

[0066] The transceiver module 31 is configured to send an audio pre-synthesis request to a server; and receive at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request.

[0067] The processing module 32 is used to play the at least one correct audio file that has been cached one by one in sequence within a corresponding timing duration according to the playback delay parameter until the timing duration ends. The timing duration corresponding to the playback delay parameter is determined based on the estimated playback duration of the pre-synthesized audio.

[0068] Optionally, the transceiver module 31 is further configured to store the at least one audio file in a cache in a receiving order.

[0069] Optionally, playing the at least one buffered audio file sequentially one by one within a corresponding timing duration according to the playback delay parameter includes:

[0070] Obtaining the playback delay parameter according to the estimated playback duration of the pre-synthesized audio;

[0071] According to the playback delay parameter, the at least one buffered audio file is played one by one in sequence within the corresponding timing duration.

[0072] Optionally, obtaining the playback delay parameter based on the estimated playback duration of the pre-synthesized audio includes: using the reception time of the first audio file cached in the cache as the start playback time of the pre-synthesized audio, estimating the total playback duration of the at least one audio file based on the playback speed of the player, and obtaining the end playback time of the pre-synthesized audio;

[0073] An estimated playback duration of the presynthesized audio is obtained according to the start playback time and the end playback time of the presynthesized audio, and the estimated playback duration of the presynthesized audio is used as the playback delay parameter.

[0074] Optionally, when the timing duration corresponding to the playback delay parameter ends, the processing module 32 is further used to: obtain the playback progress, playback exception information and error code of the pre-synthesized audio; and report the playback progress, playback exception information and error code of the pre-synthesized audio to the server.

[0075] Optionally, the processing module 32 is further configured to release the cached erroneous audio file.

[0076] Optionally, the transceiver module 31 is further configured to: determine a starting position of a next audio pre-synthesis request according to the playback progress of the pre-synthesized audio;

[0077] Initiating a next audio pre-synthesis request to the server according to a starting position of the next audio pre-synthesis request;

[0078] Receive at least one audio file of the next pre-synthesized audio sent by the server according to the next audio pre-synthesis request.

[0079] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0080] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the audio playback method in any of the above method embodiments.

[0081] Figure 4 The schematic diagram of the structure of the computing device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

[0082] like Figure 4 As shown, the computing device may include: a processor, a communication interface, a memory, and a communication bus.

[0083] The processor, communication interface, and memory communicate with each other via a communication bus. The communication interface is used to communicate with other devices, such as client devices or other server network elements. The processor is used to execute programs, specifically, the steps described in the aforementioned embodiment of the audio playback method for a computing device.

[0084] Specifically, the program may include program codes including computer operation instructions.

[0085] The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0086] Memory is used to store programs. The memory may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk storage.

[0087] The program can be specifically used to cause the processor to execute the audio playback method in any of the above-mentioned method embodiments. The specific implementation of each step in the program can refer to the corresponding descriptions in the corresponding steps and units in the above-mentioned audio playback method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the devices and modules described above can refer to the corresponding process descriptions in the above-mentioned method embodiments, and will not be repeated here.

[0088] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the embodiment of the present invention is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the embodiment of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the embodiment of the present invention.

[0089] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0090] Similarly, it should be understood that in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed approach should not be interpreted as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all of the features of the individual embodiments disclosed above. Accordingly, the claims that follow the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0091] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0092] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0093] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing an embodiment of the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0094] It should be noted that the above embodiments illustrate rather than limit the embodiments of the invention, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. An audio playback method, characterized in that: Applied to a client, the method includes: Send an audio pre-synthesis request to the server; receiving at least one audio file of pre-synthesized audio sent by the server according to the audio pre-synthesis request; Playing the at least one correctly cached audio file one by one in sequence within a corresponding timed duration according to a playback delay parameter until the timed duration expires, where the timed duration corresponding to the playback delay parameter is determined based on an estimated playback duration of the pre-synthesized audio; When playback is abnormal, the client initiates the message asynchronous processing mechanism to process the pre-synthesized audio in the cache, including: When a network anomaly prompt is received or an error code is generated, the information is cached in the cache; at the same time, the current pre-synthesized audio is continued to be played until the playback delay parameter timing duration ends, and the playback progress, playback anomaly information and error code of the pre-synthesized audio are reported to the server; Also, a correct pre-synthesized audio file is selected from the cache for playback, and the cached incorrect audio file is released; The method also includes: determining a starting position of a next audio presynthesis request based on the playback progress of the presynthesized audio; initiating a next audio presynthesis request to the server based on the starting position of the next audio presynthesis request; and receiving at least one audio file of the next presynthesized audio sent by the server based on the next audio presynthesis request.

2. The audio playback method according to claim 1, wherein: After receiving at least one audio file of the pre-synthesized audio sent by the server according to the audio pre-synthesis request, the method further includes: The at least one audio file is stored in a buffer in a receiving order.

3. The audio playback method according to claim 1, wherein: Playing the at least one correct audio file that has been cached one by one in sequence within a corresponding timing duration according to the playback delay parameter includes: Obtaining the playback delay parameter according to the estimated playback duration of the pre-synthesized audio; The at least one correct audio file that has been cached is played one by one in sequence within the timing duration corresponding to the playback delay parameter.

4. The audio playback method according to claim 3, characterized in that: Obtaining the playback delay parameter according to the estimated playback duration of the pre-synthesized audio includes: The first audio file in the buffer is received as the start time of playing the pre-synthesized audio file, and the total playing time of the at least one audio file is estimated according to the playing speed of the player to obtain the end time of playing the pre-synthesized audio file. An estimated playback duration of the presynthesized audio is obtained according to the start playback time and the end playback time of the presynthesized audio, and the estimated playback duration of the presynthesized audio is used as the playback delay parameter.

5. An audio playback device, characterized in that: Applied to a client, the device includes: a transceiver module configured to send an audio presynthesis request to a server; and receive at least one audio file of presynthesized audio sent by the server according to the audio presynthesis request; a processing module configured to play the at least one correctly cached audio file sequentially one by one within a corresponding timed duration according to a playback delay parameter until the timed duration expires, wherein the timed duration corresponding to the playback delay parameter is determined based on an estimated playback duration of the pre-synthesized audio; The processing module is further configured to: when the playback is abnormal, start the message asynchronous processing mechanism to process the pre-synthesized audio in the cache, specifically including: When a network anomaly prompt is received or an error code is generated, the information is cached in the cache; at the same time, the current pre-synthesized audio is continued to be played until the playback delay parameter timing duration ends, and the playback progress, playback anomaly information and error code of the pre-synthesized audio are reported to the server; Also, a correct pre-synthesized audio file is selected from the cache for playback, and the cached incorrect audio file is released; The device is also used to: determine the starting position of the next audio pre-synthesis request according to the playback progress of the pre-synthesized audio; initiate the next audio pre-synthesis request to the server according to the starting position of the next audio pre-synthesis request; and receive at least one audio file of the next pre-synthesized audio sent by the server according to the next audio pre-synthesis request.

6. A computing device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the audio playback method according to any one of claims 1 to 4.

7. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute an operation corresponding to the audio playback method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Audio conversion method and device and audio playing method and device

    CN112765397A