Voice broadcasting method and device, electronic equipment, storage medium and program product
By splitting long text into multiple text segments and streaming audio streams, the problem of excessive time spent converting and issuing complete audio files in traditional voice broadcasts is solved, improving the user experience.
Patent Information
- Application Number
- CN202411845646.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-07
AI Technical Summary
In the voice broadcasting system, during the TTS conversion and broadcasting of long text, the time for converting and issuing complete audio files is too long, resulting in a reduced user experience.
By splitting the text information into multiple text segments, and performing voice conversion to generate audio streams, the audio stream is used to stream the audio stream to the voice broadcasting device, and the report is broadcast segment by segment.
It reduces the time from receiving the TTS text to starting the broadcasting device for the voice broadcasting device, improves the response time of the first audio broadcasting, and improves the user experience.
Smart Images

Figure CN119580702A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of computer technology and artificial intelligence technology, and more specifically, to a voice broadcasting method, device, electronic device, storage medium and program product. Background Art
[0002] With the development of voice technology, voice interaction has been realized in more and more fields. Text-to-speech is a technology that converts text into voice for use in voice-assisted technology. The text-to-speech method can be widely used in different scenarios, such as reading various text messages such as short messages and emails, and voice broadcasting of navigation information in navigation systems.
[0003] In the process of realizing the concept disclosed in the present invention, the inventors found that there are at least the following problems in the related technology: after the entire TTS text is converted into broadcast voice, the complete audio file is sent to the voice broadcast device, and the voice broadcast device starts to broadcast the voice. However, when the TTS text is too long, the time for converting the broadcast audio file is too long, resulting in a long time from receiving the TTS text to the voice broadcast device starting to broadcast the audio file, thereby reducing the user experience. Summary of the invention
[0004] In view of this, the present disclosure provides a voice broadcast method, device, electronic device, storage medium and program product.
[0005] One aspect of the present disclosure provides a voice broadcast method, which is applied to a gateway device, including: sending a text-to-speech conversion request to a voice server, wherein the text-to-speech conversion request includes text information; receiving an i-th audio stream generated by the voice server, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on an i-th text segment of M text segments of the text information, wherein the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M; in response to the i-th audio stream being the first audio stream, sending an audio broadcast start instruction to a voice broadcast device, wherein the audio broadcast start instruction includes text information that needs to be audio broadcasted; in response to the voice broadcast device receiving the audio broadcast start instruction, sending the first audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream.
[0006] According to an embodiment of the present disclosure, the method further includes: in response to the i-th audio stream not being the first audio stream, sending the i-th audio stream to a voice broadcasting device, so that the voice broadcasting device broadcasts the i-th audio stream.
[0007] According to an embodiment of the present disclosure, the method also includes: in response to the start broadcast of the i-th audio stream, cyclically executing the sending of the i+1-th audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the i+1-th audio stream, until the voice broadcast device broadcasts the M-th audio stream, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; in response to broadcasting the M-th audio stream, sending an audio broadcast end instruction to the voice broadcast device, so that the voice broadcast device performs an audio broadcast end operation.
[0008] According to an embodiment of the present disclosure, the i-th audio stream is obtained by performing text-to-speech conversion on the i-th text segment of M text segments of text information by the voice server, including: based on a preset text splitting rule, using the voice server to split the text information to obtain M text segments; performing text-to-speech conversion on the i-th text segment of the M text segments to obtain the i-th audio stream corresponding to the i-th text segment.
[0009] According to an embodiment of the present disclosure, sending a first audio stream to a voice broadcast device includes: based on a long connection established between a gateway device and the voice broadcast device, using the long connection, sending the first audio stream to the voice broadcast device.
[0010] According to an embodiment of the present disclosure, a long connection established between a gateway device and a voice broadcast device includes: receiving a long connection establishment request sent by the voice broadcast device, wherein the long connection establishment request includes a first device identifier and first device authentication information of the voice broadcast device; in response to the first device identifier and the first device authentication information matching the second device identifier and the second device authentication information stored in the gateway device, establishing a long connection between the gateway device and the voice broadcast device.
[0011] Another aspect of the present disclosure provides a voice broadcast method, which is applied to a voice broadcast device, including: receiving an audio broadcast start instruction sent by a gateway device, the audio broadcast start instruction including text information that needs to be audio broadcast; according to the audio broadcast start instruction, receiving an i-th audio stream sent by the gateway device, and broadcasting the i-th audio stream, wherein the i-th audio stream is a first audio stream generated after a voice server performs text-to-speech conversion on an i-th text segment of M text segments of text information, where M is a positive integer ≥2, and 1≤i≤M.
[0012] According to an embodiment of the present disclosure, the method also includes: in response to the start broadcast of the i-th audio stream sent by the gateway device, looping to receive the i+1-th audio stream sent by the gateway device, and broadcasting the i+1-th audio stream until the M-th audio stream is broadcast, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; in response to broadcasting the M-th audio stream, receiving an audio broadcast end instruction sent by the gateway device, and executing an audio broadcast end operation.
[0013] Another aspect of the present disclosure provides a voice broadcast device, which is applied to a gateway device, including: a request sending module, which is used to send a text-to-speech conversion request to a voice server, wherein the text-to-speech conversion request includes text information; an audio stream first receiving module, which is used to receive an i-th audio stream generated by the voice server, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on an i-th text segment of M text segments of the text information, wherein the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M; an audio broadcast start instruction sending module, which is used to send an audio broadcast start instruction to a voice broadcast device in response to the i-th audio stream being the first audio stream, wherein the audio broadcast start instruction includes text information that needs to be audio broadcast; and a first audio stream sending module, which is used to send the first audio stream to the voice broadcast device in response to the voice broadcast device receiving the audio broadcast start instruction, so that the voice broadcast device broadcasts the first audio stream.
[0014] Another aspect of the present disclosure provides a voice broadcast device, which is applied to a voice broadcast device, including: an audio broadcast start instruction receiving module, which is used to receive an audio broadcast start instruction sent by a gateway device, and the audio broadcast start instruction includes text information that needs to be audio broadcast; an audio stream second receiving module, which is used to receive the i-th audio stream sent by the gateway device according to the audio broadcast start instruction, and broadcast the i-th audio stream, wherein the i-th audio stream is the first audio stream generated after the voice server performs text-to-speech conversion on the i-th text segment of M text segments of the text information, where M is a positive integer ≥2, and 1≤i≤M.
[0015] Another aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0016] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0017] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and the instructions are used to implement the above method when executed.
[0018] According to an embodiment of the present disclosure, a text-to-speech conversion request is sent to a voice server, the i-th audio stream generated by the voice server is received, and in response to the i-th audio stream being the first audio stream, an audio broadcast start instruction is sent to a voice broadcast device, and the first audio stream is sent to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream. Since the broadcast instruction is sent to the voice broadcast device and the first audio stream is sent to the voice broadcast device when the received audio stream generated by the voice server is the first audio stream, so that the voice broadcast device can first receive the first audio stream for broadcasting, the technical means of sending the audio stream in segments in a streaming manner is implemented, at least partially overcoming the technical problem that the time taken from receiving the converted text to the device starting to broadcast the complete audio file in traditional voice broadcast is too long, and the response time of the first audio broadcast is reduced, thereby achieving the technical effect of improving the response time of the first audio broadcast and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 An exemplary system architecture to which the voice broadcast method and device according to an embodiment of the present disclosure can be applied is schematically shown;
[0021] Figure 2 The flowchart of the voice broadcast method according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 3 A flowchart of a voice broadcast method according to another embodiment of the present disclosure is schematically shown;
[0023] Figure 4 A schematic diagram schematically shows a voice broadcast method according to an embodiment of the present disclosure;
[0024] Figure 5 A block diagram of a voice broadcasting device according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 6 A block diagram schematically shows a voice broadcasting device according to another embodiment of the present disclosure; and
[0026] Figure 7 A block diagram of an electronic device suitable for implementing a voice broadcasting method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0027] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0028] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0029] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0030] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0031] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information and network security.
[0032] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0033] An embodiment of the present disclosure provides a voice broadcast method, which is applied to a gateway device, including: sending a text-to-speech conversion request to a voice server, wherein the text-to-speech conversion request includes text information; receiving an i-th audio stream generated by the voice server, wherein the i-th audio stream is obtained by performing text-to-speech conversion on an i-th text segment of M text segments of the text information by the voice server, wherein the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M; in response to the i-th audio stream being the first audio stream, sending an audio broadcast start instruction to a voice broadcast device, wherein the audio broadcast start instruction includes text information that needs to be audio broadcasted; in response to the voice broadcast device receiving the audio broadcast start instruction, sending the first audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream.
[0034] Figure 1 The exemplary system architecture to which the voice broadcast method and device according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0035] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0036] The user may use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0039] It should be noted that the voice broadcast method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the voice broadcast device provided in the embodiment of the present disclosure can generally be set in the server 105. The voice broadcast method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Correspondingly, the voice broadcast device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Alternatively, the voice broadcast method provided in the embodiment of the present disclosure can also be executed by the first terminal device 101, the second terminal device 102 or the third terminal device 103, or can also be executed by other terminal devices that are different from the first terminal device 101, the second terminal device 102 or the third terminal device 103. Accordingly, the voice broadcast device provided in the embodiment of the present disclosure may also be arranged in the first terminal device 101, the second terminal device 102 or the third terminal device 103, or in other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.
[0040] 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.
[0041] Figure 2 The flowchart of the voice broadcast method according to an embodiment of the present disclosure is schematically shown.
[0042] like Figure 2 As shown, the method 200 can be applied to a gateway device, including operations S210 to S240.
[0043] In operation S210, a text-to-speech conversion request is sent to a voice server, wherein the text-to-speech conversion request includes text information.
[0044] According to an embodiment of the present disclosure, the voice service end may be a server for processing text-to-speech conversion, and the text-to-speech conversion request is a request for converting text into speech.
[0045] According to an embodiment of the present disclosure, the text information may be information for conversion into voice, for example, may be a short message, email content, navigation information input into a navigation system, and the like.
[0046] According to an embodiment of the present disclosure, after receiving the text-to-speech conversion request, the voice service end performs text-to-speech conversion on the text information included in the text-to-speech conversion request.
[0047] In operation S220, an i-th audio stream generated by the voice server is received, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on the i-th text segment of M text segments of the text information, the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M.
[0048] According to an embodiment of the present disclosure, the voice server can perform a splitting operation on the text information by calling a text splitting component, and can split the text information into M text segments.
[0049] According to an embodiment of the present disclosure, the voice service end performs text-to-speech conversion on the i-th text segment among the M text segments, and sends the converted i-th audio stream to the gateway device.
[0050] In operation S230, in response to the i-th audio stream being the first audio stream, an audio broadcast start instruction is sent to the voice broadcast device, wherein the audio broadcast start instruction includes text information that needs to be audio broadcasted.
[0051] According to an embodiment of the present disclosure, when a gateway device receives the i-th audio stream, it can match the identification information of the i-th audio stream with the identification of the first segment of text information stored in the gateway device. If the match is consistent, the i-th audio stream can be determined as the first segment of the audio stream.
[0052] According to an embodiment of the present disclosure, the text information stored in the gateway device has a text start identifier and a text end identifier, so that the voice server can accurately split the text information and identify the text start and end information during the text-to-speech conversion process.
[0053] According to an embodiment of the present disclosure, the audio broadcast start instruction may be the first part of the audio instruction, and the audio broadcast start instruction may be an instruction for enabling the voice broadcast device to start the audio broadcast task. The voice broadcast device is used to broadcast the audio stream sent by the gateway device.
[0054] According to an embodiment of the present disclosure, when it is determined that the i-th audio stream is the first audio stream, the first part of the audio instruction "audio broadcast start instruction" is sent to the voice broadcast device. After receiving the audio broadcast start instruction, the voice broadcast device starts the audio broadcast task.
[0055] According to an embodiment of the present disclosure, the audio broadcast start instruction includes text information that needs to be broadcasted, that is, after receiving the audio broadcast start instruction, the voice broadcast device receives the text information corresponding to the audio that needs to be broadcasted. The audio broadcast start instruction may include the following parts, as shown in Table 1:
[0056] Table 1
[0057] TTS audio broadcast command content: After receiving the first TTS audio, it is sent to the device, including the following content:
[0058]
[0059] In operation S240, in response to the voice broadcast device receiving the audio broadcast start instruction, a first audio stream is sent to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream.
[0060] According to an embodiment of the present disclosure, after the voice broadcast device receives the audio broadcast start instruction and starts the audio broadcast task, the gateway device sends the i-th audio stream as the first audio stream to the voice broadcast device, and the voice broadcast device broadcasts the first audio stream.
[0061] According to an embodiment of the present disclosure, a text-to-speech conversion request is sent to a voice server, the i-th audio stream generated by the voice server is received, and in response to the i-th audio stream being the first audio stream, an audio broadcast start instruction is sent to a voice broadcast device, and the first audio stream is sent to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream. Since the broadcast instruction is sent to the voice broadcast device and the first audio stream is sent to the voice broadcast device when the received audio stream generated by the voice server is the first audio stream, so that the voice broadcast device can first receive the first audio stream for broadcasting, the technical means of sending the audio stream in segments in a streaming manner is implemented, at least partially overcoming the technical problem that the time taken from receiving the converted text to the device starting to broadcast the complete audio file in traditional voice broadcast is too long, and the response time of the first audio broadcast is reduced, thereby achieving the technical effect of improving the response time of the first audio broadcast and improving the user experience.
[0062] According to an embodiment of the present disclosure, the method may further include: in response to the i-th audio stream not being the first audio stream, sending the i-th audio stream to a voice broadcasting device, so that the voice broadcasting device broadcasts the i-th audio stream.
[0063] According to an embodiment of the present disclosure, when the gateway device determines that the i-th audio stream sent by the voice server is not the first audio stream, it means that the gateway device has received the first audio stream and sent an audio broadcast start instruction to the voice broadcast device. The voice broadcast device has started the audio playback task. At this time, the received i-th audio stream is directly sent to the voice broadcast device, so that the voice broadcast device broadcasts the i-th audio stream.
[0064] According to an embodiment of the present disclosure, the method also includes: in response to the start broadcast of the i-th audio stream, cyclically executing the sending of the i+1-th audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the i+1-th audio stream, until the voice broadcast device broadcasts the M-th audio stream, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; in response to broadcasting the M-th audio stream, sending an audio broadcast end instruction to the voice broadcast device, so that the voice broadcast device performs an audio broadcast end operation.
[0065] According to an embodiment of the present disclosure, when the i-th audio stream is the first audio stream, when the voice broadcast device starts to broadcast the first audio stream, the gateway device end has received the second audio stream converted and generated by the voice server end, and sends the second audio stream to the voice broadcast device so that the voice broadcast device starts to broadcast the second audio stream; the execution is cyclically executed in sequence, the gateway device end continues to send the i-th audio stream that has been received and generated by the voice server end to the voice broadcast device so that the voice broadcast device starts to broadcast the i-th audio stream, and sends the i+1-th audio stream to the voice broadcast device so that the voice broadcast device broadcasts the i+1-th audio stream, until the M-th audio stream that has been received and generated by the voice server end is sent to the voice broadcast device so that the voice broadcast device starts to broadcast the M-th audio stream.
[0066] According to an embodiment of the present disclosure, the operation of cyclically executing the audio stream broadcast is that when the voice broadcast device starts to broadcast the first audio segment, the gateway device sends the second part "audio" of the audio instruction to the voice broadcast device, so that the voice broadcast device receives the audio stream in segments and cyclically executes the segmented playback. The content of the audio may include the following table 2.
[0067] Table 2
[0068] Audio, send all audio streams in a loop
[0069]
[0070] According to an embodiment of the present disclosure, when the i-th audio stream is not the first audio stream and the voice broadcast device starts broadcasting the i-1-th audio stream, the gateway device has received the i-th audio stream converted and generated by the voice server, and sends the i-th audio stream to the voice broadcast device so that the voice broadcast device starts broadcasting the i-th audio stream; the process is executed in a loop until the voice broadcast device starts broadcasting the M-1-th audio stream, at which point the gateway device has received the M-th audio stream converted and generated by the voice server, and sends the M-th audio stream to the voice broadcast device so that the voice broadcast device starts broadcasting the M-th audio stream.
[0071] According to an embodiment of the present disclosure, when the gateway device receives the Mth audio stream, it can determine that the Mth audio stream is the last audio stream based on the identification information of the Mth audio stream. After sending the Mth audio stream to the voice broadcast device, an audio broadcast end instruction is sent to the voice device. After the voice broadcast completes the Mth audio stream, the audio broadcast ends the operation and closes the audio broadcast task.
[0072] According to an embodiment of the present disclosure, the audio broadcast end instruction is the third part of the audio instruction. After the gateway device sends the last audio stream to the voice broadcast device, the third part of the audio instruction "audio broadcast end instruction" is sent to the voice broadcast device so that the voice broadcast device ends the audio broadcast task after broadcasting the last audio stream. The content of the audio broadcast end instruction may include the following table 3.
[0073] Table 3
[0074] The end part of the TTS audio broadcast instruction. When all audio is sent, the instruction end mark content is sent
[0075]
[0076] According to an embodiment of the present disclosure, another implementation method for the voice broadcast device to close the audio broadcast task may be that the voice broadcast device may close the audio broadcast task if it does not receive a new audio stream sent by the gateway device within a preset time.
[0077] According to the embodiments of the present disclosure, by streaming the super-large audio file in segments to the voice broadcast device, the response time of the first audio stream broadcast can be improved. Since the audio file broadcast itself takes time, the subsequent audio stream has been sent each time the audio stream is broadcast, which is imperceptible to the user. The experience is that of a complete super-large audio file, thereby improving the user experience.
[0078] According to an embodiment of the present disclosure, the i-th audio stream is obtained by performing text-to-speech conversion on the i-th text segment of M text segments of text information by the voice server, including: based on a preset text splitting rule, using the voice server to split the text information to obtain M text segments; performing speech conversion on the i-th text segment of the M text segments to obtain the i-th audio stream corresponding to the i-th text segment.
[0079] According to an embodiment of the present disclosure, a text splitting rule is preset, for example, the first three characters of the text information are set as the first text segment, and the text information is divided into a plurality of M text segments with a preset number of characters as one text segment; the punctuation marks of the text information can also be used as separators, and the text information before a punctuation mark is a text segment, etc. This embodiment does not limit the splitting rule.
[0080] According to the embodiments of the present disclosure, the text information can be split into M text segments according to the above splitting rules. When the i-th text segment is the first text segment, the voice server performs text-to-speech conversion on the first text segment to generate a first audio stream, and sends the first audio stream to the gateway device, and the gateway device sends the first audio stream to the voice broadcast device; at the same time, the voice server performs text-to-speech conversion on the second text segment to generate a second audio stream, and sends the second audio stream to the gateway device. , the gateway device sends the second audio stream to the voice broadcast device; execute in sequence, the voice server performs text-to-speech conversion on the ith text segment to generate the ith audio stream, and sends the ith audio stream to the gateway device, and the gateway device sends the ith audio stream to the voice broadcast device; until the voice server performs text-to-speech conversion on the Mth text segment to generate the Mth audio stream, and sends the Mth audio stream to the gateway device, the gateway device sends the Mth audio stream to the voice broadcast device.
[0081] According to an embodiment of the present disclosure, sending a first audio stream to a voice broadcast device includes: based on a long connection established between a gateway device and the voice broadcast device, using the long connection, sending the first audio stream to the voice broadcast device.
[0082] According to an embodiment of the present disclosure, the voice broadcast device can communicate with the gateway device through the communication hardware carried by it, and pre-create a data connection as a command channel for receiving commands from the gateway device.
[0083] According to an embodiment of the present disclosure, the above-mentioned data connection may be a long connection of HTTP2, or a long connection based on the TCP protocol, etc.
[0084] According to an embodiment of the present disclosure, based on the established long connection, the first audio stream received by the gateway device and subsequent audio streams can be sent to the voice broadcast device through the long connection.
[0085] According to an embodiment of the present disclosure, a long connection established between a gateway device and a voice broadcast device includes: receiving a long connection establishment request sent by the voice broadcast device, wherein the long connection establishment request includes a first device identifier and first device authentication information of the voice broadcast device; in response to the first device identifier and the first device authentication information matching the second device identifier and the second device authentication information stored in the gateway device, establishing a long connection between the gateway device and the voice broadcast device.
[0086] According to an embodiment of the present disclosure, a long connection establishment request can be sent to a gateway device through a voice broadcast device. The establishment request may include device information of the voice broadcast device. The device information may include authentication information, ID information, device mac address, device version information, IP address information, etc.
[0087] According to the embodiments of the present disclosure, the gateway device side can construct the device information of the voice broadcast device, and when receiving the long connection establishment request sent by the voice broadcast device, the authentication information and ID information in the device information carried in the request will be matched with the authentication information and ID information of the voice broadcast device stored in the gateway device. If the match is consistent, it means that the long connection between the voice broadcast device and the gateway device is successfully established, otherwise, the establishment fails.
[0088] According to another embodiment of the present disclosure, a short connection may be established between the voice broadcast device and the gateway, and data connection between the voice broadcast device and the gateway device may be realized, which is not specifically limited in the present disclosure.
[0089] Figure 3 The following schematically shows a flow chart of a voice broadcasting method according to another embodiment of the present disclosure.
[0090] like Figure 3 As shown, the method 300 is applied to a voice broadcasting device, including operations S310-S320.
[0091] In operation S310, an audio broadcast start instruction sent by a gateway device is received, where the audio broadcast start instruction includes text information that needs to be audio broadcast.
[0092] In operation S320, according to the audio broadcast start instruction, the i-th audio stream sent by the gateway device is received, and the i-th audio stream is broadcast, wherein the i-th audio stream is the first audio stream generated after the voice server performs text-to-speech conversion on the i-th text segment of M text segments of the text information, M is a positive integer ≥2, 1≤i≤M.
[0093] According to an embodiment of the present disclosure, the gateway device receives the first audio stream sent by the voice server, and sends an audio broadcast start instruction to the voice broadcast device, and the voice broadcast device starts the audio broadcast task.
[0094] According to an embodiment of the present disclosure, after the voice broadcast device starts the audio broadcast task, it receives the first audio stream sent by the gateway device and plays the first audio stream, so as to improve the response time of the first audio and enhance the user experience.
[0095] According to an embodiment of the present disclosure, the method also includes: in response to the start broadcast of the i-th audio stream sent by the gateway device, looping to receive the i+1-th audio stream sent by the gateway device, and broadcasting the i+1-th audio stream until the M-th audio stream is broadcast, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; in response to broadcasting the M-th audio stream, receiving an audio broadcast end instruction sent by the gateway device, and executing an audio broadcast end operation.
[0096] According to an embodiment of the present disclosure, when the voice broadcast device starts to broadcast the i-th audio stream, the gateway device sends the i+1-th audio received by the voice server to the voice broadcast device for broadcast; sends the i+2-th audio to the voice broadcast device for broadcast; executes in a loop, sending the audio segments in a streaming manner until the M-th audio is sent to the voice broadcast device for broadcast, and at the same time, receives the audio broadcast end instruction sent by the gateway device, so that the voice broadcast device executes the audio broadcast end operation.
[0097] According to the embodiments of the present disclosure, the text-to-speech conversion audio is sent to the voice broadcast device in segments in a streaming manner to solve the technical problem that the traditional method requires the complete audio to be sent to the voice broadcast device together, resulting in a long time from receiving text information to converting it into audio and sending the complete audio to the device to start broadcasting, and a slow response time.
[0098] Figure 4 A schematic diagram of a voice broadcast method according to an embodiment of the present disclosure is schematically shown.
[0099] like Figure 4As shown, in the schematic diagram 400, before voice broadcasting, it is necessary to establish a long connection between the gateway device 402 and the voice broadcast device 401, and the gateway device 402 sends a text-to-speech conversion request to the voice server 403, and the text-to-speech conversion request includes text information; the voice server 403 splits the text information to generate M text segments, and performs text-to-speech conversion on the i-th text segment in the M text segments to obtain the i-th audio stream. The i-th audio stream is sent to the gateway device 402, and in response to the i-th audio stream being the first audio stream, the long connection established between the gateway device 402 and the voice broadcast device 401 is used to execute the instruction issuance and data connection between the gateway device 402 and the voice broadcast device 401: the gateway device 402 sends an audio broadcast start instruction to the voice broadcast device 401, and the voice broadcast device 401 receives the audio broadcast start instruction and starts the audio broadcast task. The gateway device 402 sends the first audio stream to the voice broadcast device 401, and the voice broadcast device 401 starts to broadcast the first audio stream; the gateway device 402 sends the i+1th audio stream sent by the voice server 403 to the voice broadcast device 401, and starts to broadcast the i+1th audio stream; ...; the gateway device 402 sends the Mth audio stream sent by the voice server 403 to the voice broadcast device 401, and starts to broadcast the Mth audio stream. At the same time, the gateway device 402 sends an audio broadcast end instruction to the voice broadcast device 401, so that the voice broadcast device closes the audio broadcast task and ends the audio broadcast.
[0100] Figure 5 The block diagram of a voice broadcasting device according to an embodiment of the present disclosure is schematically shown.
[0101] like Figure 5 As shown, the device 500 may include: a request sending module 510, an audio stream first receiving module 520, an audio broadcast start instruction sending module 530 and a first audio stream sending module 540.
[0102] The request sending module 510 is used to send a text-to-speech conversion request to the voice server, wherein the text-to-speech conversion request includes text information.
[0103] The first audio stream receiving module 520 is used to receive the i-th audio stream generated by the voice server, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on the i-th text segment of M text segments of the text information, and the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M.
[0104] The audio broadcast start instruction sending module 530 is used to send an audio broadcast start instruction to the voice broadcast device in response to the i-th audio stream being the first audio stream, wherein the audio broadcast start instruction includes text information that needs to be audio broadcasted.
[0105] The first audio stream sending module 540 is used to send the first audio stream to the voice broadcast device in response to the voice broadcast device receiving the audio broadcast start instruction, so that the voice broadcast device broadcasts the first audio stream.
[0106] According to an embodiment of the present disclosure, the apparatus 500 may further include: an audio stream first sending module.
[0107] The first audio stream sending module is used to send the i-th audio stream to the voice broadcasting device in response to the i-th audio stream not being the first audio stream, so that the voice broadcasting device broadcasts the i-th audio stream.
[0108] According to an embodiment of the present disclosure, the device 500 may further include: an audio stream second sending module and an audio broadcast end instruction sending module. The audio stream second sending module is used to respond to the start broadcast of the i-th audio stream, and cyclically execute the sending of the i+1-th audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the i+1-th audio stream, until the voice broadcast device broadcasts the M-th audio stream, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information.
[0109] The audio broadcast end instruction sending module is used to send an audio broadcast end instruction to the voice broadcast device in response to broadcasting the Mth audio stream, so that the voice broadcast device executes the audio broadcast end operation.
[0110] According to an embodiment of the present disclosure, the audio stream first receiving module 520 may include: a splitting processing submodule and a text-to-speech conversion submodule.
[0111] The splitting processing submodule is used to split the text information based on the preset text splitting rules using the voice server to obtain M text segments;
[0112] The text-to-speech conversion submodule is used to perform text-to-speech conversion on the i-th text segment among the M text segments to obtain the i-th audio stream corresponding to the i-th text segment.
[0113] According to an embodiment of the present disclosure, the first audio stream sending module 540 may include: a first audio stream sending submodule.
[0114] The first audio stream sending submodule is used to send the first audio stream to the voice broadcast device based on the long connection established between the gateway device and the voice broadcast device using the long connection.
[0115] According to an embodiment of the present disclosure, the first audio stream sending submodule may include: a request receiving unit and a long connection establishing unit.
[0116] The request receiving unit is used to receive a long connection establishment request sent by a voice broadcast device, wherein the long connection establishment request includes a first device identification and first device authentication information of the voice broadcast device.
[0117] The long connection establishing unit is used to establish a long connection between the gateway device and the voice broadcast device in response to the first device identification and the first device authentication information matching the second device identification and the second device authentication information stored in the gateway device.
[0118] Figure 6 A block diagram of a voice broadcasting device according to another embodiment of the present disclosure is schematically shown.
[0119] like Figure 6 As shown, the device 600 may include: an audio broadcast start instruction receiving module 610 and an audio stream second receiving module 620 .
[0120] The audio broadcast start instruction receiving module is used to receive the audio broadcast start instruction sent by the gateway device, and the audio broadcast start instruction includes text information that needs to be audio broadcast.
[0121] The second audio stream receiving module is used to receive the i-th audio stream sent by the gateway device according to the audio broadcast start instruction, and broadcast the i-th audio stream, wherein the i-th audio stream is the first audio stream generated after the voice server performs text-to-speech conversion on the i-th text segment of M text segments of text information, M is a positive integer ≥2, 1≤i≤M.
[0122] According to an embodiment of the present disclosure, the device 600 may further include: an audio stream third receiving module and an audio broadcast end instruction receiving module.
[0123] The third audio stream receiving module is used to respond to the start broadcast of the i-th audio stream sent by the gateway device, loop to receive the i+1-th audio stream sent by the gateway device, and broadcast the i+1-th audio stream until the M-th audio stream is broadcast, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information.
[0124] The audio broadcast end instruction receiving module is used to respond to the broadcast of the Mth audio stream, receive the audio broadcast end instruction sent by the gateway device, and execute the audio broadcast end operation.
[0125] According to the embodiments of the present invention, any one or more of the modules, sub-modules and units, or at least part of the functions of any one of them, can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, sub-modules and units can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, sub-modules and units can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, sub-modules and units can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0126] For example, any of the request sending module 510, the first audio stream receiving module 520, the audio broadcast start instruction sending module 530 and the first audio stream sending module 540 or the audio broadcast start instruction receiving module 610 and the second audio stream receiving module 620 can be combined in one module / unit / subunit for implementation, or any one of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the request sending module 510, the first audio stream receiving module 520, the audio broadcast start instruction sending module 530 and the first audio stream sending module 540, or the audio broadcast start instruction receiving module 610 and the audio stream second receiving module 620 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the request sending module 510, the first audio stream receiving module 520, the audio broadcast start instruction sending module 530 and the first audio stream sending module 540, or the audio broadcast start instruction receiving module 610 and the audio stream second receiving module 620 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0127] It should be noted that the voice broadcast device part in the embodiment of the present disclosure corresponds to the voice broadcast method part in the embodiment of the present disclosure. The description of the voice broadcast device part specifically refers to the voice broadcast method part, which will not be repeated here.
[0128] Figure 7 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0129] like Figure 7As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0130] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0131] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0132] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure 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 storage medium, and the computer program contains 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 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0133] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0134] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.
[0135] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .
[0136] The embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the voice broadcast method provided by the embodiments of the present disclosure.
[0137] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0138] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0139] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two 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 box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, 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. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0141] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A voice broadcast method, applied to a gateway device, comprising: Sending a text-to-speech conversion request to a voice server, wherein the text-to-speech conversion request includes text information; Receive an i-th audio stream generated by a voice server, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on an i-th text segment of M text segments of the text information, wherein the M text segments are obtained by splitting the text information, where M is a positive integer ≥ 2, and 1≤i≤M; In response to the i-th audio stream being the first audio stream, sending an audio broadcast start instruction to the voice broadcast device, wherein the audio broadcast start instruction includes the text information that needs to be audio broadcasted; In response to the voice broadcast device receiving the audio broadcast start instruction, the first audio stream is sent to the voice broadcast device, so that the voice broadcast device broadcasts the first audio stream.
2. The method according to claim 1, further comprising: In response to the i-th audio stream not being the first audio stream, the i-th audio stream is sent to the voice broadcasting device, so that the voice broadcasting device broadcasts the i-th audio stream.
3. The method according to claim 1 or 2, further comprising: In response to the start broadcast of the i-th audio stream, cyclically executing sending the i+1-th audio stream to the voice broadcast device, so that the voice broadcast device broadcasts the i+1-th audio stream, until the voice broadcast device broadcasts the M-th audio stream, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; In response to broadcasting the Mth audio stream, an audio broadcast end instruction is sent to the voice broadcast device, so that the voice broadcast device performs an audio broadcast end operation.
4. The method according to claim 1, wherein: The i-th audio stream is obtained by performing text-to-speech conversion on the i-th text segment of the M text segments of the text information by the voice server, and includes: Based on a preset text segmentation rule, the voice server is used to segment the text information to obtain M text segments; Perform text-to-speech conversion on the i-th text segment among the M text segments to obtain the i-th audio stream corresponding to the i-th text segment.
5. The method according to claim 1, wherein: The sending the first audio stream to the voice broadcasting device comprises: Based on the long connection established between the gateway device and the voice broadcast device, the first audio stream is sent to the voice broadcast device using the long connection.
6. The method according to claim 5, wherein: The long connection established between the gateway device and the voice broadcast device includes: Receiving a long connection establishment request sent by the voice broadcast device, wherein the long connection establishment request includes a first device identifier and first device authentication information of the voice broadcast device; In response to the first device identification and the first device authentication information matching the second device identification and the second device authentication information stored in the gateway device, a long connection is established between the gateway device and the voice broadcast device.
7. A voice broadcast method, applied to a voice broadcast device, comprising: Receiving an audio broadcast start instruction sent by a gateway device, wherein the audio broadcast start instruction includes text information that needs to be audio broadcast; According to the audio broadcast start instruction, the i-th audio stream sent by the gateway device is received, and the i-th audio stream is broadcast, wherein the i-th audio stream is the first audio stream generated after the voice server performs text-to-speech conversion on the i-th text segment of the M text segments of the text information, M is a positive integer ≥2, 1≤i≤M.
8. The method according to claim 1, further comprising: In response to the start broadcast of the i-th audio stream sent by the gateway device, cyclically execute receiving the i+1-th audio stream sent by the gateway device, and broadcasting the i+1-th audio stream until the M-th audio stream is broadcasted, wherein the i+1-th audio stream is obtained by the voice server performing text-to-speech conversion on the i+1-th text segment among the M text segments of the text information, and the M-th audio stream is obtained by the voice server performing text-to-speech conversion on the M-th text segment among the M text segments of the text information; In response to broadcasting the Mth audio stream, an audio broadcast end instruction sent by the gateway device is received, and an audio broadcast end operation is performed.
9. A voice broadcasting device, applied to a gateway device, comprising: A request sending module, used for sending a text-to-speech conversion request to a voice server, wherein the text-to-speech conversion request includes text information; The first audio stream receiving module is used to receive the i-th audio stream generated by the voice server, wherein the i-th audio stream is obtained by the voice server performing text-to-speech conversion on the i-th text segment of M text segments of the text information, wherein the M text segments are obtained by splitting the text information, M is a positive integer ≥2, and 1≤i≤M; An audio broadcast start instruction sending module, used for sending an audio broadcast start instruction to the voice broadcast device in response to the i-th audio stream being the first audio stream, wherein the audio broadcast start instruction includes the text information that needs to be audio broadcasted; The first audio stream sending module is used to send the first audio stream to the voice broadcast device in response to the voice broadcast device receiving the audio broadcast start instruction, so that the voice broadcast device broadcasts the first audio stream.
10. A voice broadcasting device, applied to a voice broadcasting device, comprising: An audio broadcast start instruction receiving module, used to receive an audio broadcast start instruction sent by a gateway device, wherein the audio broadcast start instruction includes text information that needs to be audio broadcast; The second audio stream receiving module is used to receive the i-th audio stream sent by the gateway device according to the audio broadcast start instruction, and broadcast the i-th audio stream, wherein the i-th audio stream is the first audio stream generated after the voice server performs text-to-speech conversion on the i-th text segment of the M text segments of the text information, M is a positive integer ≥2, 1≤i≤M.
11. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
12. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 8.
13. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Cited By
Text segmentation voice streaming processing method, system and device, medium and program product
CN121565136A