Speech synthesis method and apparatus, medium, electronic device, and program product

By constructing an abstract syntax tree and using syntax rule files, LaTeX formulas are converted into text in the target language and then into speech, solving the readability problem of formula playback and realizing speech playback in the target language.

WO2026056542A1PCT designated stage Publication Date: 2026-03-19BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively convert formulas represented by mathematical symbols into speech in the target language, especially when the formulas are complex, resulting in poor readability and hindering user comprehension.

Method used

By obtaining LaTeX-formatted formulas from the source text, an abstract syntax tree is constructed. Using syntax rule files and conversion configuration files, the formulas are converted into spoken text in the target language and finally into speech.

Benefits of technology

It enables the accurate conversion of complex formulas into voice broadcasts in the target language, improving users' understanding and readability of the formulas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025110581_19032026_PF_FP_ABST
    Figure CN2025110581_19032026_PF_FP_ABST
Patent Text Reader

Abstract

A speech synthesis method and apparatus, a medium, an electronic device, and a program product. The method comprises: obtaining a formula from a source text (110); converting the formula into a target text in a broadcast form and belonging to a target language (120); and converting the target text into a speech in the target language (130), thereby providing a foundation for broadcasting the formula in a speech in the target language.
Need to check novelty before this filing date? Find Prior Art

Description

Speech synthesis method, device, medium, electronic device, and program product

[0001] Cross-reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202411296709.0, filed September 14, 2024, the disclosure of which is incorporated herein in its entirety as part of the present application. TECHNICAL FIELD

[0003] The present disclosure relates to a speech synthesis method, device, medium, electronic device, and program product. BACKGROUND

[0004] Speech synthesis technology, also known as text-to-speech (TTS) technology, mainly involves technology for converting text information into speech, which can meet the needs of users for voice broadcasting of text information, so that users can listen to relevant information through voice without directly reading the text information. SUMMARY

[0005] This summary is provided to introduce a selection of concepts, which are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

[0006] In a first aspect, the present disclosure provides a speech synthesis method, the method comprising:

[0007] obtaining a formula from a source text;

[0008] converting the formula into a target text in a target language and in a broadcast form;

[0009] converting the target text into speech in the target language form.

[0010] In a second aspect, the present disclosure provides a speech synthesis device, the device comprising:

[0011] an obtaining module configured to obtain a formula from a source text;

[0012] a converting module configured to convert the formula into a target text in a target language and in a broadcast form;

[0013] a speech module configured to convert the target text into speech in the target language form.

[0014] In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of the first aspect.

[0015] In a fourth aspect, the present disclosure provides an electronic device comprising:

[0016] a storage device having stored thereon a computer program;

[0017] a processing device configured to execute the computer program in the storage device to implement the steps of the method of the first aspect.

[0018] In a fifth aspect, the present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of the first aspect.

[0019] Other features and advantages of the present disclosure will be further described in the following detailed description. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and other features and advantages of the embodiments of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0021] FIG. 1 is a flowchart illustrating a voice synthesis method according to an exemplary embodiment of the present disclosure.

[0022] FIG. 2 is another flowchart illustrating a voice synthesis method according to an exemplary embodiment of the present disclosure.

[0023] FIG. 3 is a block diagram illustrating a voice synthesis device according to an exemplary embodiment of the present disclosure.

[0024] FIG. 4 is a structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings, in which some embodiments of the present disclosure are shown. This disclosure may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and fully convey the scope of the disclosure to those skilled in the art.

[0026] It should be understood that each step recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this respect.

[0027] The term "comprising" and variations thereof as used herein are open-ended, that is, "comprising but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related terms have analogous meanings.

[0028] It should be noted that the terms "first", "second", and the like in the present disclosure are merely used to distinguish different devices, modules or units, and do not imply the order or interdependence of the functions performed by these devices, modules or units.

[0029] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.

[0030] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0031] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained in a proper manner according to relevant laws and regulations.

[0032] For example, in response to receiving the active request of the user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will require obtaining and using the personal information of the user. Thus, the user can voluntarily choose whether to provide the personal information to the software or hardware such as electronic device, application program, server or storage medium, etc. performing the operation of the technical solutions of the present disclosure according to the prompt information.

[0033] As an optional but not limited implementation manner, in response to receiving the active request of the user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in the form of text in the pop-up window. In addition, the pop-up window may, for example, carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the electronic device.

[0034] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure, and other methods that meet relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0035] At the same time, it can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws and regulations and relevant provisions.

[0036] In some embodiments, the speech synthesis technology can be applied to a teaching scene, which usually involves formulas. Considering that formulas represented only by mathematical symbols are better rendered in the front end, for example, formulas in the LaTex format, generally, formulas represented only by mathematical symbols are displayed in the front end, and therefore, how to broadcast such formulas is a technical problem to be solved at present.

[0037] In some embodiments, for the convenience of broadcasting formulas, some embodiments directly use non-LaTex format text corresponding to the formulas for display. Here, the text can be understood as a text in the form of broadcast. On this basis, converting the text in the form of broadcast into speech realizes the broadcast of the formula.

[0038] For example, taking the content rendered by the LaTex format text as a 2 +b 2 =c 2 In some embodiments, a square plus b square equals c square is displayed. Obviously, the readability of a 2 +b 2 =c 2 is better than a square plus b square equals c square.

[0039] Therefore, when displaying formulas in the form of text in the form of broadcast, especially in the scene where the formula elements are more and more complex, the readability is not high, and the probability of accurate display is low, which is not conducive to the user's understanding of the formula. Therefore, considering that formulas represented only by mathematical symbols, such as LaTex format, are easier to read in the front end, the LaTex format text is used in the front end to display the corresponding formula, and then the content displayed in this way cannot be directly converted into speech, and therefore, how to support the broadcast of the LaTex format formula is a technical problem to be solved at present.

[0040] Therefore, the embodiments of the present disclosure provide a speech synthesis method, device, medium, electronic equipment and program product, which realize the broadcast of formulas in the form of speech in a target language.

[0041] The embodiments of the present disclosure are further explained and described below in conjunction with the drawings.

[0042] FIG. 1 is a flowchart illustrating a speech synthesis method according to an example embodiment of the present disclosure, which can be applied in an electronic device and can be performed by a speech synthesis apparatus, which can be implemented by software and / or hardware and can be configured in the electronic device. Referring to FIG. 1, the speech synthesis method can include the following steps:

[0043] In step 110, a formula is obtained from a source text.

[0044] In this embodiment, the formula is a formula represented by mathematical symbols. As an example, the formula can be a formula in LaTeX format, and the present disclosure will be explained and described below taking the formula in LaTeX format as an example.

[0045] It should be understood that the source text includes content describing the formula based on the LaTeX format. For example, the formula can be obtained by identifying a formula marker in the source text and extracting the text between the formula markers in the source text to obtain the formula. It should be noted that when describing the formula based on the LaTeX format, a complete formula is contained within the formula markers, for example, the formula marker can be $, so two $ can be identified and the text between the two $ in the source text can be extracted to obtain the formula.

[0046] It should be understood that the source text in this embodiment is not the content displayed in the front end. As an example, the source text is a 2 +b 2 =c 2 , then a 2 +b 2 =c 2 is the formula, and the display content obtained by rendering the source text in the front end is: a 2 +b 2 =c 2 . Further, the display content in the front end can be the content displayed by the application of the dialogue model loaded in the front end, where the dialogue model can be a large language model (LLM) that can provide excellent performance in natural language tasks.

[0047] In step 120, the formula is converted into a target text in a broadcast form and belonging to a target language.

[0048] From the above content, it can be known that the display form corresponding to the broadcast form can be called the reading form, and the broadcast form can be understood as being composed of natural language, and the reading form is the content obtained by rendering the LaTeX format text in the front end. Taking the formula “a 2 +b 2 =c 2 ” as an example, the reading form can be “a 2 +b 2 =c 2 .", and the form of the report is "a square plus b square equals c square".

[0049] In this embodiment, the target language can be Chinese, English, etc.

[0050] Step 130, converting the target text into speech in the form of the target language.

[0051] The conversion of the target text into speech in the form of the target language can be achieved by a speech synthesis technique, which can include text analysis and sound synthesis. Text analysis involves converting the input text into an internal representation for speech synthesis, which can include text normalization, part-of-speech tagging, semantic parsing, etc. Sound synthesis is the conversion of these internal representations into sound waveforms, ultimately outputting human-audible speech. In this embodiment, a pre-trained speech synthesis model can be used to convert the target text into speech in the form of the target language.

[0052] In the above manner, the formula rendered in mathematical symbols only is converted into target text in the form of a report and belonging to the target language, and then the target text is converted into speech in the form of the target language, thereby providing a basis for the formula to be reported in the form of speech in the target language.

[0053] In some embodiments, the above step of converting the formula into target text in the form of a report and belonging to the target language can be implemented in the following manner: determining an abstract syntax tree corresponding to the formula according to a syntax rule file, wherein each node in the abstract syntax tree is used to represent at least one formula element in the formula; traversing each node in the abstract syntax tree, converting the formula element in the corresponding node into text in the form of a report and belonging to the corresponding target language; combining the texts of all formula elements in the formula to obtain the target text in which the formula is converted into the form of a report and belongs to the target language.

[0054] The formula elements can be arithmetic operators, variables, superscripts, subscripts, and logical operators in the formula, and the elements here can also be understood as the mathematical symbols mentioned above.

[0055] The syntax rule file is obtained based on a preset syntax rule that describes the format of the syntax to be parsed, and both the syntax rule and the syntax rule file can be configured offline.

[0056] For example, a grammar parser generator can be used to generate an abstract syntax tree corresponding to the formula based on the preset syntax rule. The process of generating the abstract syntax tree by the grammar parser generator can be: converting the syntax rule into a syntax rule file in the corresponding language using the grammar parser generator, compiling the syntax rule file to obtain a parser, running the parser and processing the formula to generate the corresponding abstract syntax tree.

[0057] In the embodiment, the abstract syntax tree can include nodes of different levels, each node being used to represent at least one formula element in the formula.

[0058] FIG. 2 is another flowchart of a speech synthesis method according to an example embodiment of the present disclosure. Referring to FIG. 2, a syntax rule file is constructed offline based on syntax rules, the syntax rule file is compiled to obtain a parser, the formula 1+2x3 is input to the parser to obtain an abstract syntax tree of the formula 1+2x3, and the corresponding result is obtained by traversing the abstract syntax tree, where the result refers to the formula elements in the formula being converted into a broadcast form and corresponding text of a target language.

[0059] It should be understood that the combination of the above text should be combined according to the operation logic of each element in the formula. Continuing the example of the formula shown in FIG. 2, taking Chinese as the target language, the target text corresponding to the formula is "1 plus 2 times 3".

[0060] In the above manner, the syntax rule file is used to implement the construction of the abstract syntax tree corresponding to the formula, and each formula element in each node of the abstract syntax tree is traversed to convert the formula into a broadcast form and corresponding text of a target language.

[0061] In some embodiments, the step of traversing each node in the abstract syntax tree and converting the formula element in the corresponding node into a broadcast form and corresponding text of a target language can be implemented in the following manner: traversing each node in the abstract syntax tree, and converting the formula element in the corresponding node into a broadcast form and corresponding text of a target language according to a conversion configuration file corresponding to the target language and the node type of each node; wherein the conversion configuration file includes a corresponding relationship between each node type, each formula element, and corresponding broadcast form text, and the node type is used to distinguish different broadcast form texts of the same formula element.

[0062] The node type is used to distinguish different broadcast form texts of two same formula elements. For example, taking the formula -1-3 as an example, there are two same formula elements in the formula, but the meanings expressed by the two formula elements are different, and thus the broadcast forms are also different. Taking Chinese as the target language, for the first "-" in the formula, the broadcast form and corresponding text of the target language is "negative", and for the second "-" in the formula, the broadcast form and corresponding text of the target language is "minus". Therefore, the node type can be set for the node to correctly convert the formula into the broadcast form text.

[0063] Continuing to refer to the example shown in FIG. 2, FIG. 2 shows the conversion profile of two languages. In the conversion profile of each language, a plurality of mapping relationships are included, each of which includes a formula element, a text corresponding to a play form and belonging to a corresponding language, and a corresponding node type.

[0064] It should be understood that when converting the formula element in the formula into the text corresponding to the play form and belonging to the target language, the conversion profile corresponding to the target language needs to be loaded to take effect, so as to convert the formula element in the formula into the text corresponding to the play form and belonging to the target language.

[0065] Among them, the target language can be determined in any of the following ways: determined by the context of the formula, or specified by the user.

[0066] As can be known from the above, the source text is not the text rendered in the front end, and on this basis, the context in the embodiment can include the context of the text displayed in the front end when the formula is rendered in the source text, or when the text displayed in the front end here is the answer text given by the dialogue model for the input text, the context in the embodiment can also include the input text. For example, the target language can be determined according to the language used by the context. As an example, when the input text is "Please give the formula of the Pythagorean theorem", since the input text is expressed in Chinese, the target language can be determined as Chinese.

[0067] In the embodiment, the user in the user specification can be a user of different types, for example, the user is a development end user who develops the dialogue model, or the user can also be a business end user who uses the dialogue model, so as to meet the individualized needs of different types of users for the target language used when the formula is played.

[0068] Among them, taking the user as a business end user who uses the dialogue model as an example, the user specification can be determined from the semantic information obtained from the input text, or based on the first configuration information of the user to the dialogue model. For example, when the target language is determined by the semantic information, taking the input text "Formula of the Pythagorean theorem, please interpret it in English" as an example, according to the semantic information, the user prefers to use English, so the target language can be determined as English. When the target language is determined by the first configuration information configured by the user, if the first configuration information indicates Chinese, the target language can be determined as Chinese.

[0069] Among them, taking the user as a development end user who develops the dialogue model as an example, the user specification can be determined by the second configuration information of the dialogue model. When the target language is determined by the second configuration information configured by the user, if the second configuration information indicates English, the target language can be determined as English.

[0070] In the embodiment, when there are multiple ways to determine the target language, the priority between the multiple ways to determine the target language can be determined, and the target language is determined by using the determination way with high priority. When the target language cannot be determined by the determination way with high priority, the target language is determined by using the determination way with lower priority until the target language is determined.

[0071] In the above manner, the conversion configuration file of different languages is set, so that the ability of expanding languages can be quickly realized in a low-cost manner. In addition, the node type is set to distinguish different broadcast form texts of two same formula elements, so as to improve the conversion accuracy of formula to text, and further improve the accuracy of audio corresponding to the formula.

[0072] In some embodiments, the above method can further include the following steps: in the case that the target language is not determined according to the context of the formula, and the target language is not specified by the user, determining a preset default language as the target language.

[0073] The preset default language can be a language supported by the dialogue model for understanding and recognition.

[0074] It should be understood that in some dialogue scenarios, there can be multiple languages in the language adopted by the semantics and the text, so the target language cannot be accurately determined based on the language adopted by the semantics and the text. In addition, there can be a case that the user does not configure the configuration information for specifying the target language.

[0075] Therefore, in the case that the target language is not determined according to the context of the formula, and the target language is not specified by the user, the preset default language is determined as the target language, which provides a basis for realizing the broadcast of the formula.

[0076] Through the above technical solution, first, the formula in the source text is converted into target text in broadcast form and belonging to the target language, and then the target text is converted into speech in the target language, thereby providing a basis for the formula to be broadcast in the form of speech in the target language.

[0077] Based on the same concept, the disclosure also provides a speech synthesis device. FIG. 3 is a block diagram of a speech synthesis device according to an example embodiment of the disclosure. Referring to FIG. 3, the speech synthesis device 300 can include:

[0078] The acquisition module 301 is configured to acquire a formula from a source text.

[0079] The conversion module 302 is configured to convert the formula into target text in broadcast form and belonging to a target language.

[0080] The speech module 303 is configured to convert the target text into speech in the target language.

[0081] Optionally, the formula is a LaTex formula.

[0082] Optionally, the conversion module 302 comprises:

[0083] A determination sub-module configured to determine an abstract syntax tree corresponding to the formula according to a syntax rule file, wherein each node in the abstract syntax tree is used to represent at least one formula element in the formula;

[0084] A conversion sub-module configured to traverse each node in the abstract syntax tree, and convert the formula element in the corresponding node into a text in a target language in a broadcast form;

[0085] A combination sub-module configured to combine the texts of all the formula elements in the formula to obtain a target text of the formula converted into the target language in the broadcast form.

[0086] Optionally, the conversion sub-module is further configured to:

[0087] traverse each node in the abstract syntax tree, and convert the formula element in the corresponding node into a text in a target language in a broadcast form according to a conversion configuration file corresponding to the target language and a node type of each node

[0088] wherein the conversion configuration file comprises a corresponding relationship among each node type, each formula element and a corresponding broadcast form text, and the node type is used to distinguish different broadcast form texts of the same formula element.

[0089] Optionally, the target language is determined by any one of the following ways:

[0090] by context of the formula;

[0091] by user specification.

[0092] Optionally, the voice synthesis module 300 further comprises:

[0093] A determination module configured to determine a preset default language as the target language in a case that the target language is not determined according to the context of the formula and the target language is not specified by the user.

[0094] Optionally, the obtaining module 301 comprises:

[0095] An identification sub-module configured to identify a formula marker in the source text;

[0096] An extraction sub-module configured to extract a text between the formula markers in the source text to obtain a formula.

[0097] The embodiments of each module in the speech synthesis device 300 can refer to the above-mentioned related embodiments, and the embodiments will not be repeated here.

[0098] Based on the same concept, the embodiments of the present disclosure further provide a computer readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-mentioned speech synthesis method.

[0099] Based on the same concept, the embodiments of the present disclosure further provide a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned speech synthesis method.

[0100] Based on the same concept, the embodiments of the present disclosure further provide an electronic device comprising:

[0101] a storage device having a computer program stored thereon;

[0102] a processing device configured to execute the computer program in the storage device to implement the steps of the above-mentioned speech synthesis method.

[0103] Reference is made to FIG. 4, which shows a structural schematic diagram of an electronic device 400 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle terminal (e.g., vehicle navigation terminal), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in FIG. 4 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0104] As shown in FIG. 4, the electronic device 400 can include a processing device (e.g., central processor, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 402 or loaded into a random access memory (RAM) 403 from a storage device 408. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0105] In general, the following devices can be connected to the I / O interface 405: input devices 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, and the like; storage devices 408 including, for example, a magnetic tape, a hard disk, and the like; and communication devices 409. The communication devices 409 can allow the electronic device 400 to communicate wirelessly or wired with other devices to exchange data. While FIG. 4 illustrates the electronic device 400 with various devices, it is understood that all of the illustrated devices are not required to be implemented or possessed. More or less devices can alternatively be implemented or possessed.

[0106] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 409, or installed from the storage devices 408, or installed from the ROM 402. When the computer program is executed by the processing devices 401, the above-described functions defined in the methods of the embodiments of the present disclosure are performed.

[0107] It is noted that the aforementioned computer-readable medium of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example and without limitation, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a computer-readable program code transmitted by a computer-readable storage medium or carried by a carrier wave in a baseband or as part of a carrier wave. Such a propagated computer-readable signal medium can take various forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that can be used to carry or store a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), or the like, or any suitable combination of the foregoing.

[0108] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communications of any form or medium (e.g., a communications network). Examples of communications networks include local area networks ("LAN"), wide area networks ("WAN"), internetworks (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future developed networks.

[0109] The aforementioned computer-readable medium can be included in the aforementioned electronic device; or can exist separately from the electronic device without being incorporated into the electronic device.

[0110] The computer readable medium carries one or more programs when the one or more programs are executed by the electronic device, the electronic device is caused to: acquire a formula from a source text; convert the formula into a target text in a broadcast form and in a target language; and convert the target text into speech in the target language.

[0111] Computer program code for carrying out operations of the present disclosure can be written in any one or more of a variety of programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or the like. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0112] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specific logical functions specified for the block. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in some cases, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0113] The modules involved in the embodiments of the present disclosure can be implemented in the manner of software or in the manner of hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0114] The functionality described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, non- transitory machine-readable media can include RAM, ROM, programmable ROM (EPROM, EEPROM or flash memory), or any other storage device(s) through which program instructions can be stored and executed by a processing unit. The above described functions can be implemented as software modules or software functions using object-oriented design methodology, or using any other suitable programming technique.

[0115] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0116] The foregoing description merely exemplifies the preferred embodiments of the disclosure and the principles of the technology involved. It is believed that those skilled in the art can accomplish the disclosure with the enclosed claims without any creative work. The scope of the disclosure should not be limited by the technical features of the specific embodiments described above, but should include all the technical solutions falling within the concept of the disclosure.

[0117] Further, although operations are depicted in a particular, chronological sequence, this should not be understood as requiring such order unless specifically specified. In some environments, multitasking and parallel processing can be advantageous. Likewise, the specific sequence of operations illustrated in the above discussion can not be required, unless specifically indicated otherwise. Some features described in the context of separate embodiments can also be implemented together in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable subcombination. It is therefore contemplated to this disclosure that the components and / or features from one embodiment can be used in combination with the components and / or features of another embodiment. Likewise, it is contemplated to this disclosure that the components and / or features from one embodiment can be used and replaced by the components and / or features of another embodiment and the precise mode of use and operation can depend upon the arrangement of the components and / or features making up the particular implementation.

[0118] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With respect to the devices in the above-described embodiments, in which various modules perform operations, the specific manner in which the operations are performed by the various modules has been described in detail in the embodiments relating to the method. Here, no detailed explanation will be given.

Claims

1. A method for speech synthesis, comprising: obtaining a formula from a source text; converting the formula into a target text in a broadcast form and in a target language; converting the target text into speech in the target language.

2. The method of claim 1, wherein, The formula is a LaTex formula.

3. The method of claim 1 or 2, wherein, The converting the formula into a target text in a broadcast form and in a target language comprises: determining an abstract syntax tree corresponding to the formula according to a grammar rule file, wherein each node in the abstract syntax tree represents at least one formula element in the formula; traversing each node in the abstract syntax tree to convert the formula element in the corresponding node into a text in a broadcast form and in a target language; combining the texts of all the formula elements in the formula to obtain the target text in a broadcast form and in a target language.

4. The method of claim 3, wherein, The traversing each node in the abstract syntax tree to convert the formula element in the corresponding node into a text in a broadcast form and in a target language comprises: traversing each node in the abstract syntax tree to convert the formula element in the corresponding node into a text in a broadcast form and in the target language according to a conversion configuration file corresponding to the target language and a node type of each node; wherein the conversion configuration file comprises a corresponding relationship among each node type, each formula element and a corresponding broadcast form text, and the node type is used to distinguish different broadcast form texts of the same formula element.

5. The method of any one of claims 1-4, wherein, The target language is determined in any of the following ways: by context of the formula; by user specification. 6.The method of claim 5, further comprising: in a case where the target language is not determined by context of the formula and the target language is not specified by the user, determining a preset default language as the target language.

7. The method of any one of claims 1-6, wherein, The obtaining the formula from the source text comprises: recognizing a formula marker in the source text; extracting a text between the formula markers in the source text to obtain the formula. 8.A speech synthesis apparatus, comprising: an obtaining module configured to obtain a formula from a source text; a converting module configured to convert the formula into a target text in a broadcast form and in a target language; a speech module configured to convert the target text into speech in the target language.

9. A computer readable medium having stored thereon a computer program, wherein, The computer program is executed by the processing apparatus to implement the steps of the method of any of claims 1-7. 10.An electronic device, comprising: a storage device having a computer program stored thereon; a processing device configured to execute the computer program in the storage device to implement the steps of the method of any of claims 1-7.

11. A computer program product comprising a computer program, wherein, The computer program is executed by the processor to implement the steps of the method of any of claims 1-7.

Citation Information

Patent Citations

  • Voice recognition method, voice recognition device, electronic equipment and storage medium

    CN110473551A

  • Speech synthesis method and device

    CN111916052A

  • Method and system for automatically generating formalized protocol from natural language to PPTL

    CN113255295A

  • Cross-language speech synthesis method and device, electronic equipment and storage medium

    CN116825084A

  • Method and system for converting LaTex formula into natural language

    CN116992824A