Voice generation method and device based on artificial intelligence, computer equipment and medium

Through the artificial intelligence-based speech generation method, combined with semantic analysis, environmental sound effect prediction, emotion recognition and speech synthesis processing, the problem of lack of realistic speech in the existing speech synthesis system is solved, and a more natural and vivid speech synthesis effect is achieved.

CN119400154APending Publication Date: 2025-02-07PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411783991.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The voice synthesized by existing speech synthesis systems sounds stiff and mechanical, resulting in the lack of realism in the sound quality of synthesized speech.

Method used

Using the speech generation method based on artificial intelligence, the text to be synthesized is obtained by obtaining the text to be synthesized by the user input, semantic analysis, environmental sound effect prediction, emotion recognition and speech synthesis processing are performed, and finally the target environment sound effect and the initial synthetic speech are fused to generate the Target voice of ambient sound effects and emotional information.

Benefits of technology

It effectively improves the authenticity and emotional expression ability of synthetic pronunciations, making the generated pronunciations more natural and vivid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119400154A_ABST
    Figure CN119400154A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence, and relates to an artificial intelligence-based voice generation method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a to-be-synthesized text inputted by a user; performing semantic analysis on the text based on the target large model to obtain a semantic analysis result; performing environment sound effect prediction processing on the text and semantic analysis result based on an environment sound effect recognition model to obtain a target environment sound effect type; determining a target environment sound effect matched with the target environment sound effect type from an environment sound effect library; performing emotion recognition on the text based on an emotion analysis model to obtain emotion classification information; performing speech synthesis processing on the text and the sentiment classification information based on a text-to-speech model to obtain initial synthetic speech; and fusing the target environment sound effect and the initial synthetic voice to obtain a target voice. In addition, the invention also relates to a block chain technology, and the target voice can be stored in a block chain. The reality sense and the emotion expression ability of the synthesized speech are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of artificial intelligence development technology, financial technology, and medical health, and in particular to artificial intelligence-based speech generation methods, devices, computer equipment, and storage media. Background Art

[0002] With the rapid development of science and technology, text-to-speech (TTS) technology has made great progress in recent years and has been widely used in many fields such as finance and medicine, greatly enriching the ways and channels of information dissemination. In the financial field, TTS technology enables various financial information to be quickly converted into voice form, making it convenient for users to listen anytime and anywhere, improving the efficiency and convenience of information acquisition. In the medical field, TTS technology is used to generate voice content such as medical reports and drug instructions, providing medical staff and patients with a more intuitive and easy-to-understand way of information transmission.

[0003] However, despite the remarkable achievements of TTS technology in application, there are still obvious deficiencies in the realism and emotional color of synthesized speech. Although the current speech synthesis system can accurately simulate the basic characteristics of human speech, such as speaking speed and intonation, it is still unable to simulate the natural characteristics and emotional expression of human speech. Specifically, the speech synthesized by the current speech synthesis system sounds stiff and mechanical, resulting in the lack of realism in the sound quality of the synthesized speech. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a speech generation method, apparatus, computer equipment and storage medium based on artificial intelligence to solve the technical problem that the speech synthesized by the existing speech synthesis system sounds stiff and mechanical, resulting in the synthesized speech often lacking realism in sound quality.

[0005] In order to solve the above technical problems, the present application provides a method for generating speech based on artificial intelligence, which adopts the following technical solutions:

[0006] Get the text to be synthesized input by the user;

[0007] Performing semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results;

[0008] Performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type;

[0009] Determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library;

[0010] Performing sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information;

[0011] Performing speech synthesis processing on the text and the sentiment classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech;

[0012] The target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech.

[0013] Furthermore, the step of performing semantic analysis on the text based on the preset target macro model to obtain the corresponding semantic analysis result specifically includes:

[0014] Preprocessing the text to obtain a corresponding target text;

[0015] Extracting semantic information from the target text based on the target macro model to obtain corresponding semantic information;

[0016] Performing context analysis on the target text based on the target macro model to obtain corresponding context information;

[0017] Integrate the semantic information with the context information to obtain corresponding integrated information;

[0018] The integrated information is used as the semantic analysis result.

[0019] Furthermore, the step of preprocessing the text to obtain the corresponding target text specifically includes:

[0020] Performing word segmentation processing on the text to obtain a corresponding first text;

[0021] Performing stop word processing on the first text to obtain a corresponding second text;

[0022] Performing format conversion processing on the second text to obtain a corresponding third text;

[0023] The third text is used as the target text.

[0024] Furthermore, the step of determining a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library specifically includes:

[0025] Calling the environmental sound effect library;

[0026] Searching the ambient sound effect library based on the target ambient sound effect type to obtain an initial ambient sound effect corresponding to the target ambient sound effect type;

[0027] Filtering the initial ambient sound effect based on the emotion classification information to obtain a corresponding first ambient sound effect;

[0028] Filtering the first ambient sound effect based on the semantic analysis result to obtain a corresponding second ambient sound effect;

[0029] The target ambient sound effect is generated based on the second ambient sound effect.

[0030] Furthermore, the step of fusing the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech specifically includes:

[0031] Call the preset audio processing library;

[0032] Performing mixing processing on the target environment sound effect and the initial synthesized speech based on the audio processing library to obtain a corresponding first synthesized speech;

[0033] Performing volume balance adjustment processing on the first synthesized speech to obtain a corresponding second synthesized speech;

[0034] The second synthesized speech is used as the target speech.

[0035] Furthermore, after the step of fusing the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech, the method further includes:

[0036] Performing quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech;

[0037] Get the preset target push method;

[0038] Based on the target push mode, the optimized voice is sent to the user.

[0039] Furthermore, the step of performing quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech specifically includes:

[0040] Performing noise removal processing on the target speech to obtain a corresponding first speech;

[0041] Performing volume normalization processing on the first speech to obtain a corresponding second speech;

[0042] Performing gain adjustment processing on the second speech to obtain a corresponding third speech;

[0043] compressing and limiting the third speech to obtain a corresponding fourth speech;

[0044] The fourth voice is used as the optimized voice.

[0045] In order to solve the above technical problems, the embodiment of the present application further provides a speech generation device based on artificial intelligence, which adopts the following technical solution:

[0046] A first acquisition module, used to acquire the text to be synthesized input by the user;

[0047] An analysis module, used to perform semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results;

[0048] A prediction module, used for performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type;

[0049] A determination module, used to determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library;

[0050] A recognition module, used to perform sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information;

[0051] A synthesis module, used for performing speech synthesis processing on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech;

[0052] The fusion module is used to fuse the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech.

[0053] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0054] Get the text to be synthesized input by the user;

[0055] Performing semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results;

[0056] Performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type;

[0057] Determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library;

[0058] Performing sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information;

[0059] Performing speech synthesis processing on the text and the sentiment classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech;

[0060] The target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech.

[0061] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0062] Get the text to be synthesized input by the user;

[0063] Performing semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results;

[0064] Performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type;

[0065] Determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library;

[0066] Performing sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information;

[0067] Performing speech synthesis processing on the text and the sentiment classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech;

[0068] The target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech.

[0069] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0070] The present application first obtains the text to be synthesized input by the user; then performs semantic analysis on the text based on a preset target large model to obtain a corresponding semantic analysis result; then performs environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type; subsequently, a target environmental sound effect that matches the target environmental sound effect type is determined from a preset environmental sound effect library; further, emotion recognition is performed on the text based on a preset emotion analysis model to obtain corresponding emotion classification information; and speech synthesis processing is performed on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech; finally, the target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech. The present application obtains the text to be synthesized input by the user, and performs semantic analysis on the text based on a preset target large model to obtain the corresponding semantic analysis result, then performs environmental sound effect prediction processing on the text and the semantic analysis result based on the use of an environmental sound effect recognition model to obtain the target environmental sound effect type, and determines the target environmental sound effect that matches the target environmental sound effect type from the environmental sound effect library, and performs emotion recognition on the text based on the use of a sentiment analysis model to obtain sentiment classification information, and performs speech synthesis processing on the text and the sentiment classification information based on the use of a text-to-speech model to obtain an initial synthesized speech, and subsequently fuses the target environmental sound effect with the initial synthesized speech, so as to realize automatic and intelligent generation of a target speech with environmental sound effects and emotion information, effectively improving the realism and emotional expression ability of the synthesized speech. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0072] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0073] Figure 2 A flowchart of an embodiment of a method for speech generation based on artificial intelligence according to the present application;

[0074] Figure 3 is a structural schematic diagram of an embodiment of an artificial intelligence-based speech generation device according to the present application;

[0075] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0076] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0077] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0078] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0079] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0080] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0081] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0082] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0083] It should be noted that the artificial intelligence-based speech generation method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based speech generation device is generally arranged in the server / terminal device.

[0084] 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.

[0085] Continue to refer Figure 2 , showing a flow chart of an embodiment of the speech generation method based on artificial intelligence according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The speech generation method based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario where speech generation is required, and the speech generation method based on artificial intelligence can be applied to products in these scenarios, for example, speech generation in the field of finance and insurance. The speech generation method based on artificial intelligence comprises the following steps:

[0086] Step S201, obtaining the text to be synthesized input by the user.

[0087] In this embodiment, the electronic device (e.g. Figure 1The server / terminal device shown in the figure) can obtain the text to be synthesized through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The executor of this application may be a speech processing system, or simply referred to as the system. The user can input the text to be synthesized through the interface or the system can receive the text to be synthesized through the API. The text is stored in the form of a string and is ready for subsequent processing. Among them, the content of the above-mentioned text to be synthesized is not limited, for example, it can be a text in the financial field, or a text in the medical field.

[0088] Step S202: perform semantic analysis on the text based on a preset target macro model to obtain a corresponding semantic analysis result.

[0089] In the present embodiment, the above-mentioned specific implementation process of performing semantic analysis on the text based on the preset target large model to obtain the corresponding semantic analysis result will be further described in detail in the subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0090] Step S203 , performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type.

[0091] In this embodiment, according to the task requirements and the complexity of environmental element recognition, an appropriate large model can be selected as an environmental sound effect recognition model and environmental sound effect annotation can be performed. Among them, the environmental sound effect recognition model has the ability to understand the deep semantics of the text. Specifically, by taking the above text and its semantic analysis results as input, the annotation task for the environmental sound effect recognition model is prepared. Then, the environmental sound effect recognition model is used to predict the environmental sound effect type of the text. Specifically, the most likely environmental sound effect type can be determined through the probability distribution or classification results of the model output to obtain the above target environmental sound effect type.

[0092] Step S204: determining a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library.

[0093] In this embodiment, the specific implementation process of determining the target ambient sound effect that matches the target ambient sound effect type from the preset ambient sound effect library will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated on here.

[0094] Step S205: performing sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information.

[0095] In this embodiment, the sentiment analysis model is a pre-trained sentiment analysis model (such as a sentiment classifier based on LSTM or Transformer). The text can be input into the sentiment analysis model, which will encode the text and perform sentiment analysis through a multi-layer neural network to identify the sentiment tendency in the text, such as positive, negative, neutral, etc., and then perform sentiment annotation on the text to record the sentiment classification information corresponding to the text. The sentiment classification information can be attached to the text in the form of a label.

[0096] Step S206: performing speech synthesis processing on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech.

[0097] In this embodiment, the above-mentioned text-to-speech model can adopt a pre-trained text-to-speech (TTS) model, which can generate speech output with emotion based on text content and emotion annotation. Specifically, by inputting the input text and emotion classification information into the TTS model, the TTS model will encode the input and generate speech output with emotion through a multi-layer neural network, that is, the above-mentioned initial synthesized speech. By using advanced TTS technology, the obtained text emotion annotation, that is, the emotion classification information is also added when synthesizing audio, so that the synthesized speech carries specific emotional information.

[0098] Step S207, fusing the target environmental sound effect with the initial synthesized speech to obtain a corresponding target speech.

[0099] In this embodiment, by introducing a model to annotate the text with environmental sound effects and text emotion, the environmental background of speech synthesis and the emotion expressed in the text are fully considered, thereby improving the realism and immersion of speech synthesis. In addition, the specific implementation process of fusing the target environmental sound effects with the initial synthesized speech to obtain the corresponding target speech will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.

[0100] The present application first obtains the text to be synthesized input by the user; then performs semantic analysis on the text based on a preset target large model to obtain a corresponding semantic analysis result; then performs environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type; subsequently, a target environmental sound effect that matches the target environmental sound effect type is determined from a preset environmental sound effect library; further, emotion recognition is performed on the text based on a preset emotion analysis model to obtain corresponding emotion classification information; and speech synthesis processing is performed on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech; finally, the target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech. The present application obtains the text to be synthesized input by the user, and performs semantic analysis on the text based on a preset target large model to obtain the corresponding semantic analysis result, then performs environmental sound effect prediction processing on the text and the semantic analysis result based on the use of an environmental sound effect recognition model to obtain the target environmental sound effect type, and determines the target environmental sound effect that matches the target environmental sound effect type from the environmental sound effect library, and performs emotion recognition on the text based on the use of a sentiment analysis model to obtain sentiment classification information, and performs speech synthesis processing on the text and the sentiment classification information based on the use of a text-to-speech model to obtain an initial synthesized speech, and subsequently fuses the target environmental sound effect with the initial synthesized speech, so as to realize automatic and intelligent generation of a target speech with environmental sound effects and emotion information, effectively improving the realism and emotional expression ability of the synthesized speech.

[0101] In some optional implementations, step S201 includes the following steps:

[0102] The text is preprocessed to obtain a corresponding target text.

[0103] In this embodiment, the above-mentioned specific implementation process of preprocessing the text to obtain the corresponding target text will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0104] Semantic information is extracted from the target text based on the target macro model to obtain corresponding semantic information.

[0105] In this embodiment, the above-mentioned target large model can specifically adopt a pre-trained large language model (such as BERT, GPT, etc.). By inputting the pre-processed target text into the target large model, the target large model will encode the target text, perform semantic analysis through a multi-layer neural network, and extract semantic information, such as entities (names of people, places, organization names, etc.), relationships (relationships between entities), events (events described in the text), etc.

[0106] The target text is subjected to context analysis based on the target macro model to obtain corresponding context information.

[0107] In this embodiment, by inputting the preprocessed target text into the target large model, the target large model uses the attention mechanism or the self-attention mechanism to analyze the context of the text to obtain the logical relationship between sentences, such as cause and effect relationship, transition relationship, etc.

[0108] The semantic information and the context environment information are integrated to obtain corresponding integrated information.

[0109] In this embodiment, the integration information includes the semantic information and the context information.

[0110] The integrated information is used as the semantic analysis result.

[0111] The present application obtains the corresponding target text by preprocessing the text; then extracts semantic information from the target text based on the target large model to obtain corresponding semantic information; then performs contextual environment analysis on the target text based on the target large model to obtain corresponding contextual environment information; subsequently integrates the semantic information and the contextual environment information to obtain corresponding integrated information; and finally uses the integrated information as the semantic analysis result. The present application obtains the corresponding target text by preprocessing the text; then extracts semantic information and performs contextual environment analysis on the target text based on the use of the target large model, and then integrates the obtained semantic information and contextual environment information, so as to efficiently and accurately generate the corresponding semantic analysis results, ensure the accuracy of the obtained semantic analysis results, and facilitate the subsequent accurate prediction of the required target environment sound effect type based on the semantic analysis results.

[0112] In some optional implementations of this embodiment, preprocessing the text to obtain the corresponding target text includes the following steps:

[0113] Perform word segmentation processing on the text to obtain a corresponding first text.

[0114] In this embodiment, a word segmentation tool may be used to perform word segmentation processing on the text to obtain a corresponding first text.

[0115] The first text is processed to remove stop words to obtain a corresponding second text.

[0116] In this embodiment, the matched stop words in the first text may be removed according to a preset stop word list to obtain a corresponding second text.

[0117] The second text is formatted and converted to obtain a corresponding third text.

[0118] In this embodiment, the text conversion refers to converting the second text into a format suitable for processing by the target large model.

[0119] The third text is used as the target text.

[0120] The present application performs word segmentation processing on the text to obtain a corresponding first text; then performs stop word removal processing on the first text to obtain a corresponding second text; then performs format conversion processing on the second text to obtain a corresponding third text; and subsequently uses the third text as the target text. The present application performs word segmentation processing, stop word removal processing, and format conversion processing on the text, thereby achieving efficient and accurate preprocessing of the text and ensuring the accuracy of the target text obtained.

[0121] In some optional implementations, step S204 includes the following steps:

[0122] The environmental sound effect library is called.

[0123] In this embodiment, rich environmental sound effect resources are collected in advance from various sources (such as professional sound effect libraries, free sound effect websites, homemade recordings, etc.). The obtained environmental sound effect resources are preliminarily classified according to major categories such as natural sounds, urban sounds, and indoor sounds, and further subdivided under each major category. For example, natural sounds can be divided into subcategories such as wind sounds, rain sounds, and bird sounds, and stored in the environmental sound effect library. Afterwards, detailed metadata is added to each sound effect file in the environmental sound effect library, including sound effect name, type, source, duration, volume level, timbre description, etc., for subsequent retrieval and use.

[0124] The environmental sound effect library is searched based on the target environmental sound effect type to obtain an initial environmental sound effect corresponding to the target environmental sound effect type.

[0125] In this embodiment, the metadata of the ambient sound effect library can be used to quickly retrieve sound effect files that match the target ambient sound effect type to obtain the corresponding initial ambient sound effect. This can be achieved through keyword search, category browsing or advanced filtering functions. In addition, the number of the initial ambient sound effects usually includes multiple.

[0126] The initial ambient sound effect is screened based on the emotion classification information to obtain a corresponding first ambient sound effect.

[0127] In this embodiment, according to the needs of the emotional expression of the text, the sound effects that match the emotion of the text, that is, the emotional classification information, can be selected from the above-mentioned initial environmental sound effects. For example, when describing a sad scene, a low and slow environmental sound effect can be selected; when describing a happy scene, a bright and cheerful sound effect can be selected, thereby completing the screening of the initial environmental sound effects and obtaining the corresponding first environmental sound effect.

[0128] The first ambient sound effect is filtered and processed based on the semantic analysis result to obtain a corresponding second ambient sound effect.

[0129] In this embodiment, information extraction can be performed on the above semantic analysis results to determine the text description scene corresponding to the text, and then the first environmental sound effect can be screened and processed according to the text description scene to obtain the second environmental sound effect that matches the text description scene. For example, when describing the night view of the city, traffic sounds and distant human voices can be selected. When describing a walk on the beach, the sound of waves and the cry of seagulls can be selected.

[0130] The target ambient sound effect is generated based on the second ambient sound effect.

[0131] In this embodiment, by obtaining the number of second environmental sound effects, if the number of second environmental sound effects is 1, the second environmental sound effect is directly used as the above-mentioned target environmental sound effect, and if the number of second environmental sound effects is multiple, a sound effect can be randomly selected from the above-mentioned second environmental sound effects as the above-mentioned target environmental sound effect. For example, the sound effect with the highest frequency of use can be selected from all second environmental sound effects as the above-mentioned target environmental sound effect. In addition, the text content of the text and the annotation results (semantic analysis results) of the large model are combined to automatically select suitable environmental sound effects, so that the speech synthesis is closer to the real situation, which increases the fun and attractiveness of the speech synthesis.

[0132] The present application calls the environmental sound effect library; then searches the environmental sound effect library based on the target environmental sound effect type to obtain the initial environmental sound effect corresponding to the target environmental sound effect type; then screens and processes the initial environmental sound effect based on the emotional classification information to obtain the corresponding first environmental sound effect; subsequently screens and processes the first environmental sound effect based on the semantic analysis result to obtain the corresponding second environmental sound effect; and finally generates the target environmental sound effect based on the second environmental sound effect. The present application searches the environmental sound effect library based on the target environmental sound effect type to obtain the initial environmental sound effect corresponding to the target environmental sound effect type, and then screens the initial environmental sound effect based on the use of the emotional classification information and the semantic analysis result, so as to quickly and accurately determine the target environmental sound effect that matches the target environmental sound effect type, thereby ensuring the accuracy and adaptability of the obtained target environmental sound effect.

[0133] In some optional implementations, step S207 includes the following steps:

[0134] Call the preset audio processing library.

[0135] In this embodiment, an audio processing library such as FFmpeg, PyDub, etc. may be called, and the target environment sound effect and the initial synthesized speech may be loaded using the audio processing library.

[0136] The target environmental sound effect and the initial synthesized speech are mixed based on the audio processing library to obtain a corresponding first synthesized speech.

[0137] In this embodiment, the target environment sound effect is mixed with the initial synthesized speech by using an audio processing library to obtain the corresponding first synthesized speech. Different mixing algorithms and parameters can be used during mixing to achieve the best effect. In addition, the audio synchronization problem needs to be ensured during the mixing process to ensure that the target environment sound effect and the initial synthesized speech are consistent in time.

[0138] The volume balance of the first synthesized speech is adjusted to obtain a corresponding second synthesized speech.

[0139] In this embodiment, the volume balance adjustment process refers to adjusting the volume balance between the speech in the first synthesized speech and the ambient sound effect to ensure the harmonious coexistence of the two. The volume can be adjusted using a volume adjustment library.

[0140] The second synthesized speech is used as the target speech.

[0141] The present application calls a preset audio processing library; then, based on the audio processing library, mixes the target environmental sound effect with the initial synthesized speech to obtain a corresponding first synthesized speech; then, adjusts the volume balance of the first synthesized speech to obtain a corresponding second synthesized speech; and subsequently uses the second synthesized speech as the target speech. The present application obtains a first synthesized speech by mixing the target environmental sound effect with the initial synthesized speech based on the use of an audio processing library, and then adjusts the volume balance of the first synthesized speech, thereby efficiently and accurately completing the fusion processing of the target environmental sound effect and the initial synthesized speech, and finally generates a target speech with environmental sound effects and emotions, thereby improving the realism of the generated target speech.

[0142] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:

[0143] The target speech is subjected to quality optimization processing based on a preset optimization strategy to obtain a corresponding optimized speech.

[0144] In this embodiment, the above-mentioned specific implementation process of performing quality optimization processing on the target speech based on the preset optimization strategy to obtain the corresponding optimized speech will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated in detail here.

[0145] Get the preset target push method.

[0146] In this embodiment, there is no specific limitation on the selection of the target push method, which can be set according to actual business needs, for example, email sending, SMS sending, interface push, etc.

[0147] Based on the target push mode, the optimized voice is sent to the user.

[0148] In this embodiment, the optimized voice can be sent to the user by adopting a target push method.

[0149] This application optimizes the quality of the target voice based on a preset optimization strategy to obtain a corresponding optimized voice; then obtains a preset target push method; and subsequently sends the optimized voice to the user based on the target push method. After fusing the target environmental sound effect with the initial synthesized voice to obtain the corresponding target voice, this application will also intelligently optimize the quality of the target voice based on the optimization strategy to improve the voice quality of the generated optimized voice, and then send the optimized voice to the user through a target push method, thereby improving the push intelligence of the optimized voice.

[0150] In some optional implementations of this embodiment, the step of performing quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech includes the following steps:

[0151] The target speech is subjected to noise removal processing to obtain a corresponding first speech.

[0152] In this embodiment, the noise removal process includes: applying a low-pass filter or a band-pass filter to reduce high-frequency or low-frequency noise.

[0153] The first speech is volume normalized to obtain a corresponding second speech.

[0154] In this embodiment, the volume normalization process includes: using a volume normalization function to ensure that the volume level of the audio is consistent, which helps to avoid sudden changes in volume between different sections.

[0155] Perform gain adjustment processing on the second speech to obtain a corresponding third speech.

[0156] In this embodiment, the gain adjustment process includes: using a gain adjustment function to increase or decrease the overall volume of the audio, which can be achieved by adjusting a gain slider in the audio editing software or inputting a specific gain value.

[0157] The third speech is compressed and limited to obtain a corresponding fourth speech.

[0158] In this embodiment, dynamic range compression and a limiter are applied to reduce volume fluctuations so that the audio sounds smoother and more consistent.

[0159] The fourth voice is used as the optimized voice.

[0160] The present application performs noise removal processing on the target speech to obtain the corresponding first speech; then performs volume normalization processing on the first speech to obtain the corresponding second speech; then performs gain adjustment processing on the second speech to obtain the corresponding third speech; subsequently performs compression and restriction processing on the third speech to obtain the corresponding fourth speech; and finally uses the fourth speech as the optimized speech. The present application performs noise removal processing, volume normalization processing, gain adjustment processing, and compression and restriction processing on the target speech, thereby achieving efficient and accurate quality optimization processing for the target speech, and effectively improving the speech quality of the generated optimized speech.

[0161] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.

[0162] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.

[0163] In addition, this application introduces an environmental sound effect recognition model to annotate the text with environmental sound effects, thereby overcoming the defect of the prior art that ignores the speech synthesis environment and improving the realism and immersion of speech synthesis. And through the sentiment analysis model, the text emotion annotation is performed to make the synthesized audio more emotional, rather than a stiff reading. The improved system can provide users with a more vivid and rich speech synthesis experience, enhancing the user's auditory experience and participation. In addition, the improved system can also be applied to various speech synthesis application scenarios, and has broad application prospects and commercial value.

[0164] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0165] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target voice, the above-mentioned target voice can also be stored in a node of a blockchain.

[0166] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0167] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0168] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0170] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0171] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a speech generation device based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0172] like Figure 3 As shown, the speech generation device 300 based on artificial intelligence described in this embodiment includes: a first acquisition module 301, an analysis module 302, a prediction module 303, a determination module 304, a recognition module 305, a synthesis module 306 and a fusion module 307. Among them:

[0173] The first acquisition module 301 is used to acquire the text to be synthesized input by the user;

[0174] An analysis module 302 is used to perform semantic analysis on the text based on a preset target macro model to obtain a corresponding semantic analysis result;

[0175] A prediction module 303 is used to perform environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type;

[0176] A determination module 304 is used to determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library;

[0177] The recognition module 305 is used to perform emotion recognition on the text based on a preset emotion analysis model to obtain corresponding emotion classification information;

[0178] A synthesis module 306 is used to perform speech synthesis processing on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech;

[0179] The fusion module 307 is used to fuse the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech.

[0180] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0181] In some optional implementations of this embodiment, the analysis module 302 includes:

[0182] A preprocessing submodule, used to preprocess the text to obtain a corresponding target text;

[0183] An extraction submodule, used for extracting semantic information from the target text based on the target macro model to obtain corresponding semantic information;

[0184] An analysis submodule, configured to perform context analysis on the target text based on the target macro model to obtain corresponding context information;

[0185] An integration submodule, used to integrate the semantic information with the context environment information to obtain corresponding integrated information;

[0186] The first determining submodule is used to use the integration information as the semantic analysis result.

[0187] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0188] In some optional implementations of this embodiment, the preprocessing submodule includes:

[0189] A first processing unit, configured to perform word segmentation processing on the text to obtain a corresponding first text;

[0190] A second processing unit, configured to remove stop words from the first text to obtain a corresponding second text;

[0191] A conversion unit, configured to perform format conversion processing on the second text to obtain a corresponding third text;

[0192] A determination unit is used to use the third text as the target text.

[0193] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0194] In some optional implementations of this embodiment, the determining module 304 includes:

[0195] A first calling submodule, used for calling the environmental sound effect library;

[0196] A retrieval submodule, configured to search the ambient sound effect library based on the target ambient sound effect type to obtain an initial ambient sound effect corresponding to the target ambient sound effect type;

[0197] A first screening submodule, configured to screen the initial ambient sound effect based on the emotion classification information to obtain a corresponding first ambient sound effect;

[0198] A second screening submodule, configured to screen the first ambient sound effect based on the semantic analysis result to obtain a corresponding second ambient sound effect;

[0199] A generating submodule is used to generate the target ambient sound effect based on the second ambient sound effect.

[0200] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0201] In some optional implementations of this embodiment, the fusion module 307 includes:

[0202] The second calling submodule is used to call a preset audio processing library;

[0203] A mixing submodule, configured to perform mixing processing on the target environment sound effect and the initial synthesized speech based on the audio processing library to obtain a corresponding first synthesized speech;

[0204] An adjustment submodule, configured to adjust the volume balance of the first synthesized speech to obtain a corresponding second synthesized speech;

[0205] The second determining submodule is used to use the second synthesized speech as the target speech.

[0206] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0207] In some optional implementations of this embodiment, the artificial intelligence-based speech generation device further includes:

[0208] An optimization module, used to perform quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech;

[0209] The second acquisition module is used to acquire a preset target push method;

[0210] A sending module is used to send the optimized voice to the user based on the target push mode.

[0211] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0212] In some optional implementations of this embodiment, the optimization module includes:

[0213] A first processing submodule, configured to remove noise from the target speech to obtain a corresponding first speech;

[0214] A second processing submodule, configured to perform volume normalization processing on the first speech to obtain a corresponding second speech;

[0215] A third processing submodule, configured to perform gain adjustment processing on the second speech to obtain a corresponding third speech;

[0216] A fourth processing submodule, configured to compress and limit the third speech to obtain a corresponding fourth speech;

[0217] The third determining submodule is configured to use the fourth voice as the optimized voice.

[0218] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the artificial intelligence-based speech generation method in the aforementioned implementation mode, and will not be repeated here.

[0219] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0220] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0221] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0222] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of a speech generation method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0223] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for running the artificial intelligence-based speech generation method.

[0224] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0225] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0226] In an embodiment of the present application, a text to be synthesized input by a user is obtained, and a semantic analysis is performed on the text based on a preset target large model to obtain a corresponding semantic analysis result, and then an environmental sound effect prediction process is performed on the text and the semantic analysis result based on the use of an environmental sound effect recognition model to obtain a target environmental sound effect type, and a target environmental sound effect that matches the target environmental sound effect type is determined from an environmental sound effect library, and emotion recognition is performed on the text based on the use of an emotion analysis model to obtain emotion classification information, and speech synthesis processing is performed on the text and the emotion classification information based on the use of a text-to-speech model to obtain an initial synthesized speech, and subsequently the target environmental sound effect and the initial synthesized speech are fused, so that the target speech with environmental sound effects and emotion information can be automatically and intelligently generated, effectively improving the realism and emotional expression ability of the synthesized speech.

[0227] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based speech generation method.

[0228] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0229] In an embodiment of the present application, a text to be synthesized input by a user is obtained, and a semantic analysis is performed on the text based on a preset target large model to obtain a corresponding semantic analysis result, and then an environmental sound effect prediction process is performed on the text and the semantic analysis result based on the use of an environmental sound effect recognition model to obtain a target environmental sound effect type, and a target environmental sound effect that matches the target environmental sound effect type is determined from an environmental sound effect library, and emotion recognition is performed on the text based on the use of an emotion analysis model to obtain emotion classification information, and speech synthesis processing is performed on the text and the emotion classification information based on the use of a text-to-speech model to obtain an initial synthesized speech, and subsequently the target environmental sound effect and the initial synthesized speech are fused, so that the target speech with environmental sound effects and emotion information can be automatically and intelligently generated, effectively improving the realism and emotional expression ability of the synthesized speech.

[0230] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0231] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A speech generation method based on artificial intelligence, characterized in that: The steps include: Get the text to be synthesized input by the user; Performing semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results; Performing environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type; Determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library; Performing sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information; Performing speech synthesis processing on the text and the sentiment classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech; The target environmental sound effect and the initial synthesized speech are fused to obtain a corresponding target speech.

2. The method for generating speech based on artificial intelligence according to claim 1, characterized in that: The step of performing semantic analysis on the text based on the preset target macro model to obtain the corresponding semantic analysis result specifically includes: Preprocessing the text to obtain a corresponding target text; Extracting semantic information from the target text based on the target macro model to obtain corresponding semantic information; Performing context analysis on the target text based on the target macro model to obtain corresponding context information; Integrate the semantic information with the context environment information to obtain corresponding integrated information; The integrated information is used as the semantic analysis result.

3. The method for generating speech based on artificial intelligence according to claim 2, characterized in that: The step of preprocessing the text to obtain the corresponding target text specifically includes: Performing word segmentation processing on the text to obtain a corresponding first text; Performing stop word processing on the first text to obtain a corresponding second text; Performing format conversion processing on the second text to obtain a corresponding third text; The third text is used as the target text.

4. The method for generating speech based on artificial intelligence according to claim 1, characterized in that: The step of determining a target ambient sound effect matching the target ambient sound effect type from a preset ambient sound effect library specifically includes: Calling the environmental sound effect library; Searching the ambient sound effect library based on the target ambient sound effect type to obtain an initial ambient sound effect corresponding to the target ambient sound effect type; Filtering the initial ambient sound effect based on the emotion classification information to obtain a corresponding first ambient sound effect; Filtering the first ambient sound effect based on the semantic analysis result to obtain a corresponding second ambient sound effect; The target ambient sound effect is generated based on the second ambient sound effect.

5. The method for generating speech based on artificial intelligence according to claim 1, characterized in that: The step of fusing the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech specifically includes: Call the preset audio processing library; Performing mixing processing on the target environment sound effect and the initial synthesized speech based on the audio processing library to obtain a corresponding first synthesized speech; Performing volume balance adjustment processing on the first synthesized speech to obtain a corresponding second synthesized speech; The second synthesized speech is used as the target speech.

6. The method for generating speech based on artificial intelligence according to claim 1, characterized in that: After the step of fusing the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech, the method further includes: Performing quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech; Get the preset target push method; Based on the target push mode, the optimized voice is sent to the user.

7. The method for generating speech based on artificial intelligence according to claim 6, characterized in that: The step of performing quality optimization processing on the target speech based on a preset optimization strategy to obtain a corresponding optimized speech specifically includes: Performing noise removal processing on the target speech to obtain a corresponding first speech; Performing volume normalization processing on the first speech to obtain a corresponding second speech; Performing gain adjustment processing on the second speech to obtain a corresponding third speech; compressing and limiting the third speech to obtain a corresponding fourth speech; The fourth voice is used as the optimized voice.

8. A speech generation device based on artificial intelligence, characterized in that: include: A first acquisition module is used to acquire the text to be synthesized input by the user; An analysis module, used to perform semantic analysis on the text based on a preset target macro model to obtain corresponding semantic analysis results; A prediction module, configured to perform environmental sound effect prediction processing on the text and the semantic analysis result based on a preset environmental sound effect recognition model to obtain a corresponding target environmental sound effect type; A determination module, used to determine a target ambient sound effect that matches the target ambient sound effect type from a preset ambient sound effect library; A recognition module, used to perform sentiment recognition on the text based on a preset sentiment analysis model to obtain corresponding sentiment classification information; A synthesis module, used for performing speech synthesis processing on the text and the emotion classification information based on a preset text-to-speech model to obtain a corresponding initial synthesized speech; The fusion module is used to fuse the target environmental sound effect with the initial synthesized speech to obtain the corresponding target speech.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the artificial intelligence-based speech generation method as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based speech generation method as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Personalized speech synthesis method, device and equipment based on scene perception and natural language description

    CN120148475A