Environmental noise generation method and device, equipment and storage medium
By obtaining text description information and determining its matching environmental noise attributes, obtaining tone color materials from the tone color material database and synthesizing target noise, the problem of environmental noise and text mismatch in the prior art is solved, and users' reading interest and scene immersion is improved.
Patent Information
- Application Number
- CN202411434943.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to effectively generate high-quality environmental noise matching text, resulting in a reduced user interest in reading or insufficient scene immersion.
By obtaining text description information, determine the ambient noise and its noise attributes that match the text, including the probability and orientation information of sound proportion, obtain the matching ambient material database, and use the sound source simulation function to synthesize the target ambient noise.
The generated environmental noise matches the context of the text description information, effectively improving the user's interest in reading text and immersion in the scene.
Smart Images

Figure CN119517075A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for generating environmental noise. Background Art
[0002] Environmental noise generation is very important in audiobooks, movie dubbing, etc. It can enrich the content of the text and generate many interesting associations, thereby attracting readers' interest in reading articles or increasing the immersion of movie scenes. Therefore, if the environmental noise matches the current text, it can effectively increase the user's interest in reading the text or increase the user's immersion in the scene embodied by the text. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a method, device, equipment and storage medium for generating environmental noise, aiming to provide a method for generating high-quality environmental noise based on text, so as to effectively increase the user's interest in reading the text or increase the user's immersion in the scene reflected by the text.
[0004] In a first aspect, an embodiment of the present application provides a method for generating environmental noise, the method comprising:
[0005] Obtain text description information of the environmental noise to be generated;
[0006] Determine, according to the text description information, each environmental noise matching the text description information and a noise attribute of the environmental noise, wherein the noise attribute at least includes a probability of a sound intensity proportion corresponding to the environmental noise and azimuth information corresponding to the environmental noise;
[0007] Acquire timbre materials matching each of the environmental noises from a timbre material database;
[0008] The audio material is synthesized into target environmental noise according to the sound intensity proportion probability and the orientation information of the environmental noise using a preset sound source simulation function. In a second aspect, an embodiment of the present application provides a device for generating environmental noise, comprising:
[0009] A text acquisition module, used to acquire text description information of the environmental noise to be generated;
[0010] An attribute extraction module, used to determine each environmental noise matching the text description information and the noise attribute of the environmental noise according to the text description information, wherein the noise attribute at least includes the probability of the sound intensity proportion corresponding to the environmental noise and the orientation information corresponding to the environmental noise;
[0011] A material acquisition module, used to acquire timbre materials matching each of the environmental noises from a timbre material database;
[0012] The noise synthesis module is used to synthesize the audio material into target environmental noise according to the sound intensity proportion probability and the orientation information of the environmental noise by using a preset sound source simulation function.
[0013] In a third aspect, an embodiment of the present application provides a terminal device, wherein the terminal device includes a processor and a memory;
[0014] The memory is used to store computer programs;
[0015] The processor is used to execute the computer program and implement any of the aforementioned methods for generating environmental noise when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when executed by one or more processors, enables the one or more processors to perform the steps of the aforementioned method for generating environmental noise.
[0017] The embodiments of the present application provide a method, apparatus, device and storage medium for generating environmental noise. The method obtains text description information of the environmental noise to be generated; determines each environmental noise matching the text description information and the noise attributes of the environmental noise according to the text description information, wherein the noise attributes at least include the probability of sound intensity proportion corresponding to the environmental noise and the azimuth information corresponding to the environmental noise; obtains timbre materials matching each environmental noise from a timbre material database; and synthesizes the target environmental noise from the audio material according to the probability of sound intensity proportion and the azimuth information of the environmental noise using a preset sound source simulation function, so that the output target environmental noise is adapted to the context of the current text description information, thereby effectively improving the user's interest in reading the text or improving the user's sense of presence and immersion in the scene reflected by the text.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.
[0020] Figure 1 A schematic diagram of a step flow of a method for generating environmental noise provided in an embodiment of the present application;
[0021] Figure 2A schematic diagram of obtaining noise attributes corresponding to environmental noise according to text description information provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of target environmental noise synthesis provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of the module structure of a device for generating environmental noise provided in an embodiment of the present application;
[0024] Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0027] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0028] Environmental noise generation is very important in audiobooks, movie dubbing, etc. It can enrich the content of the text and generate many interesting associations, thereby attracting readers' interest in reading articles or increasing the immersion of movie scenes. Therefore, if the environmental noise matches the current text, it can effectively increase the user's interest in reading the text or increase the user's immersion in the scene embodied by the text.
[0029] For example, in the application scenario of audio books, when the audio books output the corresponding text content, if only the text content is output and the environmental noise adapted to the current text cannot be output, the audience can only imagine the scene that the text wants to reflect through the text information, but cannot experience the immersive feeling of the scene that the text wants to reflect in combination with the environmental noise. For example, when reading words such as "small bridge, flowing water and people's homes", if it is accompanied by the sound of streams flowing in the mountain stream and dogs barking, people can associate the words "small bridge, flowing water and people's homes" with the scene reflected by these words.
[0030] For example, in a movie dubbing scene, if only the dialogue text can be output on the movie screen and the environmental noise cannot be output, the dialogue environment may be distorted in some scenes. For example, in a dialogue between two sides in an ancient war environment, if there is no environmental noise such as war horses and weapons fighting, the real environmental picture cannot be presented, causing the dialogue environment to be distorted.
[0031] Based on this, the present application provides a method, device, equipment and storage medium for generating environmental noise, aiming to provide a method for generating high-quality environmental noise based on text, so as to effectively increase the user's interest in reading the text or increase the user's immersion in the scene reflected by the text.
[0032] The method for generating environmental noise can be executed by an environmental noise generating device, which can be a terminal device or a server; the terminal device here can include but is not limited to: computers, smart phones, tablet computers, laptops, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, smart wearable devices, handheld reading pens, etc.; the server here can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0033] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0034] Please refer to Figure 1 , Figure 1 A schematic flow chart of the steps of a method for generating environmental noise provided in an embodiment of the present application.
[0035] like Figure 1 As shown, the method for generating environmental noise includes steps S101 to S104.
[0036] Step S101: obtaining text description information of the environmental noise to be generated.
[0037] In an embodiment of the present application, the method for generating environmental noise is applied to a terminal device as an example for explanation. There are multiple ways for the terminal device to obtain text description information, for example, by scanning the text with a scanning device, or by inputting relevant information by operating an interactive device or an input device.
[0038] In some implementations, obtaining text description information of the environmental noise to be generated includes:
[0039] Input information obtained when the interactive device is triggered is received, and text description information of the environmental noise to be generated is obtained according to the input information.
[0040] Exemplarily, by displaying a text input window on a preset display interface of a terminal device, a user inputs information in the text input window through an interactive device, so that the terminal device obtains corresponding text description information according to the information input by the interactive device. For example, if a user wants to generate an environmental noise corresponding to "a lone smoke rising in the desert, a setting sun round over a long river", the user can input the text description information "a lone smoke rising in the desert, a setting sun round over a long river" into the terminal device by triggering the interactive device, and the interactive device includes but is not limited to a keyboard and a touch panel.
[0041] It can be understood that the way in which the terminal device displays a text input window on a preset display interface includes but is not limited to: the terminal device is provided with a display, and a preset display interface with a text input window is displayed through the display, and the user inputs corresponding text description information in the displayed text input window by triggering the interactive device.
[0042] Or the terminal device is connected to the display for communication, and the terminal device and the display communicate through a preset information transmission protocol. After the terminal device and the display are connected to the display for communication, the terminal device controls the display to display a text input window on a preset display interface, and the user inputs corresponding text description information in the displayed text input window by triggering the interactive device.
[0043] In some implementations, obtaining text description information of the environmental noise to be generated includes:
[0044] The target text is scanned by a scanning device to obtain text description information of the environmental noise to be generated.
[0045] Exemplarily, a page with target text is scanned by a scanning device, and the text is extracted by optical character recognition (OCR) technology, thereby obtaining text description information of the environmental noise to be generated.
[0046] For example, if a user wants to generate the environmental noise corresponding to "a solitary smoke rises straight up in the desert, the sun sets round over the long river", the user can use a scanning device to scan the target text corresponding to "a solitary smoke rises straight up in the desert, the sun sets round over the long river" in the text page to obtain the corresponding text description information.
[0047] Step S102: determining each environmental noise matching the text description information and noise attributes of the environmental noise according to the text description information, wherein the noise attributes at least include a probability of a sound intensity proportion corresponding to the environmental noise and direction information corresponding to the environmental noise.
[0048] Exemplarily, after obtaining the text description information, the terminal device analyzes the text description information to determine the various environmental noises and noise attributes of the environmental noises that match the text description information based on the text description information, wherein the noise attributes include at least the probability of the sound intensity proportion corresponding to the environmental noise and the orientation information corresponding to the environmental noise.
[0049] It can be understood that the environmental noise corresponding to a text description information may be one or more, that is, a text description information corresponds to at least one environmental noise, and the noise attributes of the environmental noises corresponding to different text description information are usually different, and the noise attributes include the sound intensity ratio probability of each environmental noise corresponding to the current text description information and the azimuth information corresponding to the environmental noise. Among them, the azimuth information corresponding to the environmental noise at least includes the elevation angle of the sound orientation corresponding to the environmental noise and the azimuth angle of the sound orientation corresponding to the environmental noise. For example, according to the text description information A, the environmental noise matching the current text description information A includes environmental noise A, environmental noise B, environmental noise C, and environmental noise D. Each environmental noise has a corresponding sound intensity ratio probability and azimuth information. The azimuth information includes at least the elevation angle and azimuth angle of the sound orientation corresponding to the environmental noise. By obtaining the azimuth angle of the environmental noise, the output of noise with a three-dimensional spatial sound body sense can be assisted.
[0050] In some implementations, determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes:
[0051] Extracting text semantics corresponding to the text description information;
[0052] The various environmental noises matching the text description information and the noise attributes of the environmental noises are determined according to the text semantics and the first association relationship, wherein the first association relationship at least records the association relationship between the text semantics and the various environmental noises and the noise attributes corresponding to the environmental noises.
[0053] Exemplarily, after obtaining the text description information, the text semantics corresponding to the text description information can be extracted through a pre-trained semantic extraction model, or the text semantics corresponding to the text description information can be extracted through the association relationship between preset text semantics and text description information, and the text semantics and the corresponding matching environmental noises and the noise attributes of the environmental noises can be associated, so that after obtaining the text semantics, the various environmental noises matching the text description information and the noise attributes of the environmental noises can be determined according to the text semantics.
[0054] For example, the text description information is "The desert is filled with solitary smoke, and the long river is setting in the round." The text description information is a poem, and the whole poem has eight sentences: "I want to ask the border on a bicycle, and pass through Guyuan, a vassal state. The expeditionary dandelions are sweating in the frontier, and the returning geese fly into the Hu sky. The desert is filled with solitary smoke, and the long river is setting in the round. I met a marquis at Xiaoguan, and the governor was in Yanran." The interpretation of the poem can be understood as, in the boundless desert, only the word "big" can describe its landscape. On this pure and desolate background, the smoke rising from the kitchen in the distance is lonely and particularly eye-catching, and only the word "lonely smoke" can describe its charm. The word "straight" after "lonely smoke" makes the scenery suddenly become upright, tough, upright and powerful. "The long river is setting in the round", the vast desert has no mountains, no trees, and only the Yellow River runs through it. As far as the eye can see, the desert is boundless and the Yellow River is endless, and the word "long" naturally comes to the author's mind. Above the "long river" is the round setting sun. The word "round" here and the word "straight" in front are both used vividly and vividly, and it is difficult to describe its beauty. It is just like what Xiangling said in "Dream of Red Mansions": "This word 'straight' seems unreasonable, and the word 'round' seems too vulgar. When I close the book and think about it, it seems like I have seen this scene. If I say I can find two more words to replace these two, I can't find any more." Chinese Literature Bicycle to ask about the border, pass through Guyan, a vassal state. The expeditionary dandelions are sweating on the frontier, and the returning geese fly into the Hu sky. The desert is solitary and the smoke is straight, and the long river is setting. Xiaoguan met the marquis, and the governor was in Yanran. "The desert is solitary and the smoke is straight, and the long river is setting." This is not a sentence describing the river. It is actually a specific description of the unique and magnificent scenery outside the frontier seen after entering the frontier. The picture is broad and the artistic conception is majestic. The frontier desert is vast and boundless, so the word "big" of the desert is used. The border is desolate, without any wonders, so the thick smoke from the beacon tower is particularly eye-catching, so it is called "lonely smoke". The word "lonely" describes the monotony of the scenery, and the word "straight" immediately afterwards shows its beauty of strength and perseverance. There are no mountains or trees in the desert, and the Yellow River that runs across it cannot express the poet's feelings without the word "long". The sunset is easy to give people a sentimental impression, but the word "round" here gives people a warm and vast feeling. The word "round" and the word "straight" not only accurately describe the scene of the desert, but also express the author's deep feelings. The poet skillfully melts his loneliness into the description of the vast natural scene.
[0055] Therefore, the current poems want to present a vast, vast, and magnificent desert, but also a desolate and lonely feeling. Therefore, by extracting the semantics corresponding to the text description information, the scene that the text description information wants to reflect can be obtained, so that the corresponding environmental noise can be adapted to the corresponding scene, making the scene restoration more vivid and natural. For example, "The desert is filled with solitary smoke, and the long river is setting in the round" combined with the corresponding wind sound, the sound of sand collision, and some environmental noise of shepherd's flute can make people think of the picture adapted to the text description information through text and environmental noise, thereby enhancing the user's immersion in hearing the corresponding text description information.
[0056] It can be understood that in some embodiments, the method of extracting the text semantics corresponding to the text description information can be: using a preset extraction template to extract keywords from the text description information to obtain keywords corresponding to the text description information; inputting the keywords as model input information into a preset semantic extraction model to obtain the text semantics corresponding to the text description information.
[0057] Alternatively, the method for extracting the text semantics corresponding to the text description information may be: using a preset extraction template to perform keyword extraction on the text description information to obtain keywords corresponding to the text description information; obtaining the text semantics corresponding to the text description information based on the keywords and a second association relationship, wherein the second association relationship at least records the association relationship between the keywords and the text semantics.
[0058] Alternatively, the method for extracting the text semantics corresponding to the text description information may be: inputting the text description information as model input information into a preset semantic extraction model to obtain the text semantics corresponding to the text description information, wherein the semantic extraction model is a pre-trained model.
[0059] In some implementations, determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes:
[0060] The text description information is input as model input information into a preset text analysis model, and each environmental noise matching the text description information and the noise attribute of the environmental noise are obtained according to the model input of the text analysis model.
[0061] like Figure 2As shown, exemplarily, after the terminal device obtains the text description information (also called the prompt word), the text description information is filled into a template preset by the device, and the information corresponding to the template is input as model input information into a preset text analysis model, also called a large language model, and the text analysis model is used to extract information from the text description information, thereby obtaining various environmental noises matching the text description information and the noise attributes of the environmental noises.
[0062] For example, the text description information is saved as text, and the template is "Judge and analyze the probability distribution and sound direction of the background environmental noise contained in the entire sentence in '{text}' for each environmental noise [water flow, wind, rain, thunder, animal sound, road sound, train sound, ...], and output it completely, even if the probability of belonging to a certain environmental noise is 0; the sound direction is expressed in elevation and azimuth, the unit is degree, the elevation range is -90 to 90, and the azimuth range is 0 to 360; the output format is a list, each element in the list is a tuple, the first element of the tuple is the probability distribution of various background environmental noises, the second element of the tuple is the elevation of the sound direction of the background environmental noise, and the third element of the tuple is the azimuth of the sound direction of the background environmental noise".
[0063] The text description information "The desert is filled with smoke, the long river is setting and the sun is round" can be analyzed by the text analysis model, and we can get [{water flow, 0, 0, 0}, {wind sound, 0.7, -20, 5}, {rain sound, 0.1, 60, 0}, {animal sound, 0.05, 0, -10}, {road sound, 0.05, 0, 0}, {train sound, 0, 0, 0}, ... whistle sound, 0.4, 0, 3]. That is, the probability of the water flow sound is 0, the elevation angle is 0, and the azimuth angle is 0. The probability of the wind sound is 0.7, the elevation angle is -20, and the azimuth angle is 5. The probability of the rain sound is 0.1, the elevation angle is 60, and the azimuth angle is 0. The probability of the animal sound is 0.05, the elevation angle is 0, and the azimuth angle is -10, etc.
[0064] Step S103: Acquire timbre materials matching each of the environmental noises from a timbre material database.
[0065] like Figure 3 As shown, exemplarily, each type of environmental noise corresponds to a timbre material, and after determining the various environmental noises matching the text description information and the noise attributes of the environmental noises according to the text description information, the timbre materials corresponding to the various environmental noises can be selected from the timbre material database. For example, if the environmental noise includes the sound of flowing water, the timbre material corresponding to the sound of flowing water can be selected from the timbre material database, and if the environmental noise includes the sound of wind, the timbre material corresponding to the sound of wind can be selected from the timbre material database.
[0066] Optionally, obtaining the timbre material matching each of the environmental noises from the timbre material database includes: obtaining the timbre material matching the environmental noise having a sound intensity proportion probability greater than zero from the timbre material database at least based on the sound intensity proportion probability corresponding to the environmental noise.
[0067] For example, if the probability of the sound intensity ratio corresponding to the environmental noise is zero, it means that the environmental noise cannot appear in the environmental noise adapted by the current text description information. Therefore, only obtaining the timbre material that matches the environmental noise whose sound intensity ratio probability is greater than zero can improve the efficiency of obtaining the timbre material.
[0068] Step S104: synthesizing the audio material into target environmental noise according to the sound intensity proportion probability and the orientation information of the environmental noise by using a preset sound source simulation function.
[0069] Exemplarily, after obtaining the timbre materials corresponding to each environmental noise adapted to the text description information, the preset sound source simulation function is used to synthesize the audio materials corresponding to each environmental noise into the target environmental noise based on the sound intensity proportion probability of each environmental noise and the azimuth information of each environmental noise.
[0070] For example, the calculation method of the sound intensity corresponding to the target environmental noise is as follows: there are N kinds of environmental noises adapted to the text description information, N is greater than or equal to i, and it is assumed that the timbre material of the i-th environmental noise is x i , with probability p i (The probability has been normalized, assuming the original probability is p i ′, then the normalized probability is p i =p i ′ / ∑ i p i ′), the elevation and azimuth angles are γ i and φ i . Then the mixed sound The formula is:
[0071]
[0072] Among them, α is a constant and Src(x|γ,φ) is the sound source simulation function.
[0073] Optionally, the different elevation and azimuth angles in the sound source simulation function are γ i and φ i The synthesized sound is the target environmental noise after the text description information is converted through different head related transfer functions (HRTF). The audio materials corresponding to each environmental noise matched according to the text description information and the elevation and azimuth angles of each audio material output are γi and φ i The target environmental noise is synthesized so that it is semantically adapted to the current text description information, and the output sound effect is stereo, so that the user has a stronger sense of presence and immersion after hearing the voice output according to the text description information and the adapted environmental noise.
[0074] See also Figure 4 , Figure 4 A schematic block diagram of the structure of a device for generating environmental noise provided in an embodiment of the present application.
[0075] like Figure 4 As shown, the device 200 for generating environmental noise includes a text acquisition module 201, an attribute extraction module 202, a material acquisition module 203 and a noise synthesis module 204. The text acquisition module 201 is used to obtain text description information of the environmental noise to be generated. The attribute extraction module 202 is used to determine each environmental noise matching the text description information and the noise attribute of the environmental noise according to the text description information, wherein the noise attribute at least includes the probability of the sound intensity proportion corresponding to the environmental noise and the azimuth information corresponding to the environmental noise. The material acquisition module 203 is used to obtain the timbre material matching each of the environmental noises from the timbre material database. The noise synthesis module 204 is used to synthesize the target environmental noise from the audio material according to the sound intensity proportion probability and the azimuth information of the environmental noise using a preset sound source simulation function.
[0076] In some implementations, determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes:
[0077] Extracting text semantics corresponding to the text description information;
[0078] The various environmental noises matching the text description information and the noise attributes of the environmental noises are determined according to the text semantics and the first association relationship, wherein the first association relationship at least records the association relationship between the text semantics and the various environmental noises and the noise attributes corresponding to the environmental noises.
[0079] In some implementations, extracting text semantics corresponding to the text description information includes:
[0080] Extract keywords from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; input the keywords as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information;
[0081] Alternatively, keywords are extracted from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; text semantics corresponding to the text description information are obtained based on the keywords and a second association relationship, and the second association relationship at least records the association relationship between the keywords and the text semantics.
[0082] Alternatively, the text description information is input as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information.
[0083] In some implementations, determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes:
[0084] The text description information is input as model input information into a preset text analysis model, and each environmental noise matching the text description information and the noise attribute of the environmental noise are obtained according to the model input of the text analysis model.
[0085] In some implementations, the acquiring of timbre materials matching each of the environmental noises from a timbre material database includes:
[0086] At least based on the sound intensity proportion probability corresponding to the environmental noise, a timbre material matching the environmental noise with a sound intensity proportion probability greater than zero is obtained from the timbre material database. In some embodiments, the azimuth information corresponding to the environmental noise includes at least an elevation angle of the sound azimuth corresponding to the environmental noise and an azimuth angle of the sound azimuth corresponding to the environmental noise.
[0087] In some implementations, obtaining text description information of the environmental noise to be generated includes:
[0088] Scanning the target text by a scanning device to obtain text description information of the environmental noise to be generated;
[0089] Alternatively, input information obtained when the interaction device is triggered is received, and text description information of the environmental noise to be generated is obtained according to the input information.
[0090] It can be understood that the device 200 for generating ambient noise can be applied to a terminal device and used to execute the steps of the method for generating ambient noise provided in any embodiment of the present application.
[0091] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the environmental noise generating device 200 described above can refer to the corresponding process in the aforementioned environmental noise generating method embodiment, and will not be repeated here.
[0092] See also Figure 5 , Figure 5 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application.
[0093] like Figure 5 As shown, the terminal device 10 includes a processor 11 and a memory 12, and the processor 11 and the memory 12 are connected via a bus 13, such as an I2C (Inter-integrated Circuit) bus.
[0094] Specifically, the processor 11 is used to provide computing and control capabilities to support the operation of the entire terminal device 10. The processor 11 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0095] Specifically, the memory 12 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0096] Those skilled in the art will understand that Figure 5 The structure shown in the figure is merely a block diagram of a partial structure related to the embodiment scheme of the present application, and does not constitute a limitation on the terminal device to which the embodiment scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0097] The processor 11 is used to run a computer program stored in the memory, and implement any one of the environmental noise generation methods provided in the embodiments of the present application when executing the computer program.
[0098] In some embodiments, the processor 11 is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0099] Obtain text description information of the environmental noise to be generated;
[0100] Determine, according to the text description information, each environmental noise matching the text description information and a noise attribute of the environmental noise, wherein the noise attribute at least includes a probability of a sound intensity proportion corresponding to the environmental noise and azimuth information corresponding to the environmental noise;
[0101] Acquire timbre materials matching each of the environmental noises from a timbre material database;
[0102] The target environmental noise is synthesized from the audio material according to the sound intensity proportion probability and the orientation information of the environmental noise using a preset sound source simulation function. In some embodiments, the step of determining each environmental noise matching the text description information and the noise attribute of the environmental noise according to the text description information includes:
[0103] Extracting text semantics corresponding to the text description information;
[0104] The various environmental noises matching the text description information and the noise attributes of the environmental noises are determined according to the text semantics and the first association relationship, wherein the first association relationship at least records the association relationship between the text semantics and the various environmental noises and the noise attributes corresponding to the environmental noises.
[0105] In some implementations, extracting text semantics corresponding to the text description information includes:
[0106] Extract keywords from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; input the keywords as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information;
[0107] Alternatively, keywords are extracted from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; text semantics corresponding to the text description information are obtained based on the keywords and a second association relationship, and the second association relationship at least records the association relationship between the keywords and the text semantics.
[0108] Alternatively, the text description information is input as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information.
[0109] In some implementations, determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes:
[0110] The text description information is input as model input information into a preset text analysis model, and each environmental noise matching the text description information and the noise attribute of the environmental noise are obtained according to the model input of the text analysis model.
[0111] In some implementations, the acquiring of timbre materials matching each of the environmental noises from a timbre material database includes:
[0112] At least based on the sound intensity proportion probability corresponding to the environmental noise, a timbre material matching the environmental noise with a sound intensity proportion probability greater than zero is obtained from the timbre material database. In some embodiments, the azimuth information corresponding to the environmental noise includes at least an elevation angle of the sound azimuth corresponding to the environmental noise and an azimuth angle of the sound azimuth corresponding to the environmental noise.
[0113] In some implementations, obtaining text description information of the environmental noise to be generated includes:
[0114] Scanning the target text by a scanning device to obtain text description information of the environmental noise to be generated;
[0115] Alternatively, input information obtained when the interaction device is triggered is received, and text description information of the environmental noise to be generated is obtained according to the input information.
[0116] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned embodiment of the method for generating environmental noise, and will not be repeated here.
[0117] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for generating environmental noise as provided in any embodiment of the present application specification.
[0118] The storage medium may be an internal storage unit of the terminal device in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, 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 (Flash Card), etc. equipped on the terminal device.
[0119] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0120] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0121] The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating environmental noise, characterized in that: The method comprises: Obtain text description information of the environmental noise to be generated; Determine, according to the text description information, each environmental noise matching the text description information and a noise attribute of the environmental noise, wherein the noise attribute at least includes a probability of a sound intensity proportion corresponding to the environmental noise and azimuth information corresponding to the environmental noise; Acquire timbre materials matching each of the environmental noises from a timbre material database; The audio material is synthesized into target environmental noise according to the sound intensity proportion probability and the orientation information of the environmental noise by using a preset sound source simulation function.
2. The method according to claim 1, characterized in that The determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes: Extracting text semantics corresponding to the text description information; The various environmental noises matching the text description information and the noise attributes of the environmental noises are determined according to the text semantics and the first association relationship, wherein the first association relationship at least records the association relationship between the text semantics and the various environmental noises and the noise attributes corresponding to the environmental noises.
3. The method according to claim 2, characterized in that The extracting text semantics corresponding to the text description information includes: Extract keywords from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; input the keywords as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information; Alternatively, keywords are extracted from the text description information using a preset extraction template to obtain keywords corresponding to the text description information; text semantics corresponding to the text description information are obtained according to the keywords and a second association relationship, wherein the second association relationship at least records an association relationship between the keywords and the text semantics; Alternatively, the text description information is input as model input information into a preset semantic extraction model to obtain text semantics corresponding to the text description information.
4. The method according to claim 1, characterized in that: The determining, according to the text description information, each environmental noise matching the text description information and the noise attribute of the environmental noise includes: The text description information is input as model input information into a preset text analysis model, and each environmental noise matching the text description information and the noise attribute of the environmental noise are obtained according to the model input of the text analysis model.
5. The method according to claim 1, characterized in that: The step of acquiring the timbre materials matching the respective environmental noises from the timbre material database comprises: At least based on the sound intensity proportion probability corresponding to the environmental noise, the timbre material matching the environmental noise with a sound intensity proportion probability greater than zero is obtained from the timbre material database.
6. The method according to any one of claims 1 to 5, characterized in that: The azimuth information corresponding to the ambient noise at least includes an elevation angle of the sound azimuth corresponding to the ambient noise and an azimuth angle of the sound azimuth corresponding to the ambient noise.
7. The method according to any one of claims 1 to 5, characterized in that: The step of obtaining text description information of the environmental noise to be generated includes: Scanning the target text by a scanning device to obtain text description information of the environmental noise to be generated; Alternatively, input information obtained when the interaction device is triggered is received, and text description information of the environmental noise to be generated is obtained according to the input information.
8. A device for generating environmental noise, characterized in that: include: A text acquisition module, used to acquire text description information of the environmental noise to be generated; An attribute extraction module, used to determine each environmental noise matching the text description information and the noise attribute of the environmental noise according to the text description information, wherein the noise attribute at least includes the probability of the sound intensity proportion corresponding to the environmental noise and the orientation information corresponding to the environmental noise; A material acquisition module, used to acquire timbre materials matching each of the environmental noises from a timbre material database; The noise synthesis module is used to synthesize the audio material into target environmental noise according to the sound intensity proportion probability and the orientation information of the environmental noise by using a preset sound source simulation function.
9. A terminal device, characterized in that: The terminal device includes a processor and a memory; The memory is used to store computer programs; The processor is configured to execute the computer program and implement the method for generating environmental noise according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: When the computer-readable storage medium is executed by one or more processors, the one or more processors are caused to perform the steps of the method for generating environmental noise according to any one of claims 1 to 7.