Method, system and device for realizing voice alarm based on ChatTTS and medium
By calling ChatTTS in the monitoring system of the new energy station, the low work efficiency and easy errors caused by manual copying in the existing technology are solved, and the automation and real-time improvement of voice alarms are achieved.
Patent Information
- Application Number
- CN202411928852.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-22
AI Technical Summary
The existing TTS voice processing method requires manual copying of voice files, resulting in low work efficiency, easy errors and omissions, and the inability to integrate with existing systems to achieve automation.
By calling ChatTTS to synthesize voice alarm files and save them to the file storage server, when the system generates alarm information, it automatically reads the alarm information from the relational database, and obtains the corresponding voice alarm file, store it in the local server, and the client plays the voice alarm file.
It avoids the low work efficiency and prone to errors and omissions caused by manual copying, realizes the automation of voice alarms, and improves the work efficiency and real-time performance of voice broadcasts.
Smart Images

Figure CN119864013A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of application system function development, and relates to a method, system, device and medium for realizing voice alarm based on ChatTTS. Background Art
[0002] The market-oriented electricity trading mechanism will be put on the agenda as the times develop. In the entire power generation system, the installed capacity of new energy is increasing, the probability of failure is increasing, and the types of failures also involve all aspects. A large amount of fault alarm information is broadcast in real time in the form of voice, so that the staff can grasp the production situation at the first time and take immediate measures, thereby ensuring the production safety of new energy stations and reducing the losses of enterprises.
[0003] The existing TTS voice processing method is to first use a third-party TTS tool to synthesize the voice file, and then copy it to the new energy station monitoring system. When a new voice alarm is added or needs to be re-synthesized, it is necessary to manually use the tool to generate it again and then copy it to the system. It cannot be integrated with the existing system to achieve automation, has poor usability, affects the real-time nature of the system alarm, reduces work efficiency, and is prone to errors. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method, system, device and medium for realizing voice alarm based on ChatTTS. The method, system, device and medium can avoid the problems of low work efficiency and easy errors caused by manual copying.
[0005] In order to achieve the above object, the present invention adopts the following technical scheme:
[0006] In one aspect, the present invention provides a method for implementing voice alarm based on ChatTTS, comprising:
[0007] Synthesize a voice alarm file by calling ChatTTS, and save the voice alarm file to a file storage server;
[0008] When the system generates alarm information, the alarm information is stored in the relational database through the alarm service;
[0009] When the client monitors that the system generates an alarm, it reads the alarm information from the relational database, and obtains the corresponding voice alarm file from the file storage server according to the alarm information, and then stores it in the local server.
[0010] The voice alarm file is obtained from the local server through the client, and the voice alarm file is played.
[0011] The method for realizing voice alarm based on ChatTTS described in the present invention is further improved in that:
[0012] Furthermore, it also includes:
[0013] The system alarm points are entered through the alarm information configuration service and saved in the relational database.
[0014] Furthermore, it also includes:
[0015] Reading a voice alarm file to be written from an external device, and storing the voice alarm file to be written in a file storage server;
[0016] The voice alarm file is read from the file storage server, and the voice alarm file is played for testing, and the content of the voice alarm file is displayed.
[0017] Furthermore, the process of synthesizing the voice alarm file by calling ChatTTS is as follows:
[0018] Set the save path, voice tone and speaking speed of the voice alarm file;
[0019] According to the storage path, voice timbre and speech speed of the voice alarm file, the voice alarm file is synthesized by calling ChatTTS.
[0020] In a second aspect of the present invention, the present invention provides a system for implementing voice alarm based on ChatTTS, comprising:
[0021] A calling module, used for synthesizing a voice alarm file by calling ChatTTS, and saving the voice alarm file to a file storage server;
[0022] A first storage module is used to store the alarm information in a relational database through an alarm service when the system generates the alarm information;
[0023] The second storage module is used to read the alarm information from the relational database when the client monitors the system to generate an alarm, and obtain the corresponding voice alarm file from the file storage server according to the alarm information, and then store it in the local server;
[0024] The playing module is used to obtain the voice alarm file from the local server through the client and play the voice alarm file.
[0025] The system for implementing voice alarm based on ChatTTS described in the present invention is further improved in that:
[0026] Furthermore, it also includes:
[0027] The input module is used to input the system alarm points through the alarm information configuration service and save the system alarm points into the relational database.
[0028] Furthermore, it also includes:
[0029] A writing module, used for reading a voice alarm file to be written from an external device, and storing the voice alarm file to be written in a file storage server;
[0030] The test module is used to read the voice alarm file from the file storage server, test and play the voice alarm file, and display the content of the voice alarm file.
[0031] Furthermore, the process of synthesizing the voice alarm file by calling ChatTTS is as follows:
[0032] Set the save path, voice tone and speaking speed of the voice alarm file;
[0033] According to the storage path, voice timbre and speech speed of the voice alarm file, the voice alarm file is synthesized by calling ChatTTS.
[0034] In a third aspect of the present invention, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for realizing voice alarm based on ChatTTS when executing the computer program.
[0035] In a fourth aspect of the present invention, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for realizing voice alarm based on ChatTTS are implemented.
[0036] The present invention has the following beneficial effects:
[0037] The method, system, device and medium for realizing voice alarm based on ChatTTS described in the present invention, during specific operation, synthesizes a voice alarm file by calling ChatTTS, and saves the voice alarm file in a file storage server. When reading, when the client monitors that the system generates an alarm, the alarm information is read from the relational database, and according to the alarm information, the corresponding voice alarm file is obtained from the file storage server, and then stored in the local server, thereby avoiding the low work efficiency and easy error and omission problems caused by manual copying, and the operation is simple, convenient and highly practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0039] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.
[0042] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0043] It should be further 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, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.
[0044] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.
[0045] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0046] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention described and shown in the drawings here can usually be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.
[0048] refer to Figure 1 The method for realizing voice alarm based on ChatTTS of the present invention comprises the following steps:
[0049] Entering system alarm points through the alarm information configuration service and saving the system alarm points into a relational database;
[0050] The voice alarm file is synthesized by calling the TTS service, and the voice alarm file is saved in the file storage server.
[0051] When the system generates alarm information, the alarm information is stored in the relational database through the alarm service.
[0052] When the client monitors that the system generates an alarm, it reads the alarm information from the relational database, obtains the corresponding voice alarm file from the file storage server, and then stores it in the local server.
[0053] The voice alarm file is obtained from the local server through the client, and the voice alarm file is played.
[0054] It should be noted that the present invention has the following characteristics:
[0055] In addition to being stable, reliable and fully functional, the new energy station monitoring system must also be easy to use and help staff improve their work efficiency. The voice alarm can promptly broadcast the alarm information in natural, clear and fluent Mandarin. It avoids staff from viewing a large amount of text alarm information and allows them to grasp the system alarm situation at the first time. The existing TTS voice processing method is to first use a third-party TTS tool to synthesize the voice file, and then copy it to the new energy station monitoring system. When a new voice alarm is added or needs to be re-synthesized, it is necessary to manually use the tool to generate it again and then copy it to the system. It cannot be integrated with the existing system to achieve automation and has poor usability. It affects the real-time nature of the system alarm, reduces work efficiency, and is prone to errors.
[0056] The present invention realizes independent TTS service based on ChatTTS, supports private local deployment, and provides API interface to facilitate system integration access. It provides visual management tools for implementation personnel, independently developed, and convenient for subsequent function expansion.
[0057] Automatic synthesis of voice alarm, no human intervention is required. This method is implemented based on Java language, provides TTS voice synthesis interface, automatically detects the description text of the voice alarm that the system needs to synthesize, synthesizes the voice file, and automatically calls the synthesis interface to re-synthesize a new voice file when the alarm description changes. The whole process does not require human intervention, which improves work efficiency and the real-time performance of voice broadcasting.
[0058] In addition, the present invention provides a simple visual interface for convenient configuration of system parameters, such as voice file save path, voice timbre, speaking speed, one-click import of descriptive information of the voice alarm to be synthesized, turning on and off the voice synthesis task, viewing all current alarm voice files in the system, and test playback.
[0059] The synthesized voice has a natural and smooth timbre, fully meeting the needs of voice alarm scenarios, thanks to ChatTTS's huge model training data.
[0060] Embodiment 2
[0061] The system for realizing voice alarm based on ChatTTS of the present invention comprises:
[0062] A calling module, used for synthesizing a voice alarm file by calling ChatTTS, and saving the voice alarm file to a file storage server;
[0063] A first storage module is used to store the alarm information in a relational database through an alarm service when the system generates the alarm information;
[0064] The second storage module is used to read the alarm information from the relational database when the client monitors the system to generate an alarm, and obtain the corresponding voice alarm file from the file storage server according to the alarm information, and then store it in the local server.
[0065] The playing module is used to obtain the voice alarm file from the local server through the client and play the voice alarm file.
[0066] As an embodiment of the present invention, it also includes:
[0067] The input module is used to input the system alarm points through the alarm information configuration service and save the system alarm points into the relational database.
[0068] As an embodiment of the present invention, it also includes:
[0069] A writing module, used for reading a voice alarm file to be written from an external device, and storing the voice alarm file to be written in a file storage server;
[0070] The test module is used to read the voice alarm file from the file storage server, test and play the voice alarm file, and display the content of the voice alarm file.
[0071] As an implementation mode of the present invention, the process of synthesizing the voice alarm file by calling ChatTTS is as follows:
[0072] Set the save path, voice tone and speaking speed of the voice alarm file;
[0073] According to the storage path, voice timbre and speech speed of the voice alarm file, the voice alarm file is synthesized by calling ChatTTS.
[0074] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional module in each embodiment of the present application may be integrated into a processor, or may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0075] Embodiment 3
[0076] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for realizing voice alarm based on ChatTTS are implemented, for example, including: synthesizing a voice alarm file by calling ChatTTS, and saving the voice alarm file to a file storage server; when the system generates an alarm message, the alarm message is stored in a relational database through an alarm service; when a client monitors that the system generates an alarm, the alarm message is read from the relational database, and according to the alarm message, the corresponding voice alarm file is obtained from the file storage server, and then stored in a local server; the voice alarm file is obtained from the local server through the client, and the voice alarm file is played. Wherein, the memory may include a memory, such as a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk memory, etc.; the processor, the network interface, and the memory are interconnected through an internal bus, and the internal bus may be an industrial standard architecture bus, a peripheral component interconnection standard bus, an extended industrial standard architecture bus, etc., and the bus may be divided into an address bus, a data bus, a control bus, etc. The memory is used to store programs, specifically, the programs may include program codes, and the program codes include computer operation instructions. The memory may include internal memory and non-volatile memory, and provide instructions and data to the processor.
[0077] Embodiment 4
[0078] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for realizing voice alarm based on ChatTTS are implemented, for example, including: synthesizing a voice alarm file by calling ChatTTS, and saving the voice alarm file to a file storage server; when the system generates an alarm message, the alarm message is stored in a relational database through an alarm service; when a client monitors that the system generates an alarm, the alarm message is read from the relational database, and according to the alarm message, the corresponding voice alarm file is obtained from the file storage server, and then stored in a local server; the voice alarm file is obtained from the local server through the client, and the voice alarm file is played. Specifically, the computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include a read-only memory (ROM), a hard disk, a flash memory, an optical disk, a magnetic disk, etc.
[0079] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0081] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0082] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0083] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and disclosure of the invention. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0084] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
[0085] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for implementing voice alarm based on ChatTTS, characterized in that: include: Synthesize a voice alarm file by calling ChatTTS, and save the voice alarm file to a file storage server; When the system generates alarm information, the alarm information is stored in the relational database through the alarm service; When the client monitors the system to generate an alarm, it reads the alarm information from the relational database, and obtains the corresponding voice alarm file from the file storage server according to the alarm information, and then stores it in the local server; The voice alarm file is obtained from the local server through the client, and the voice alarm file is played.
2. The method for realizing voice alarm based on ChatTTS according to claim 1, characterized in that: Also includes: The system alarm points are entered through the alarm information configuration service and saved in the relational database.
3. The method for realizing voice alarm based on ChatTTS according to claim 1, characterized in that: Also includes: Reading a voice alarm file to be written from an external device, and storing the voice alarm file to be written in a file storage server; The voice alarm file is read from the file storage server, and the voice alarm file is played for testing, and the content of the voice alarm file is displayed.
4. The method for realizing voice alarm based on ChatTTS according to claim 1, characterized in that: The process of calling ChatTTS to synthesize the voice alarm file is as follows: Set the save path, voice tone and speaking speed of the voice alarm file; According to the storage path, voice timbre and speech speed of the voice alarm file, the voice alarm file is synthesized by calling ChatTTS.
5. A system for implementing voice alarm based on ChatTTS, characterized in that: include: A calling module, used for synthesizing a voice alarm file by calling ChatTTS, and saving the voice alarm file to a file storage server; A first storage module is used to store the alarm information in a relational database through an alarm service when the system generates the alarm information; The second storage module is used to read the alarm information from the relational database when the client monitors the system to generate an alarm, and obtain the corresponding voice alarm file from the file storage server according to the alarm information, and then store it in the local server; The playing module is used to obtain the voice alarm file from the local server through the client and play the voice alarm file.
6. The system for implementing voice alarm based on ChatTTS according to claim 5, characterized in that: Also includes: The input module is used to input the system alarm points through the alarm information configuration service and save the system alarm points into the relational database.
7. The system for implementing voice alarm based on ChatTTS according to claim 5, characterized in that: Also includes: A writing module, used for reading a voice alarm file to be written from an external device, and storing the voice alarm file to be written in a file storage server; The test module is used to read the voice alarm file from the file storage server, test and play the voice alarm file, and display the content of the voice alarm file.
8. The system for implementing voice alarm based on ChatTTS according to claim 5, characterized in that: The process of calling ChatTTS to synthesize the voice alarm file is as follows: Set the save path, voice tone and speaking speed of the voice alarm file; According to the storage path, voice timbre and speech speed of the voice alarm file, the voice alarm file is synthesized by calling ChatTTS.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for realizing voice alarm based on ChatTTS as described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for realizing voice alarm based on ChatTTS as described in any one of claims 1 to 4 are implemented.