Dependency-inverted speech conversion methods, devices, systems, and media
By using a dependent inverted speech conversion method and flexibly injecting the speech SDK through an abstract speech interface, the application anomaly caused by the replacement of the speech SDK is resolved, thus achieving both flexibility and stability of the speech conversion function.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies cause mobile applications to malfunction and affect stability when the voice SDK is replaced or removed.
The speech conversion method adopts a dependency inversion approach. By pre-setting an abstract speech interface, the required speech SDK can be flexibly injected, reducing component dependencies and ensuring that the main application program does not depend on the underlying SDK.
It improves the flexibility of voice conversion and the stability of mobile applications, and reduces the impact of changes in underlying modules on the application.
Smart Images

Figure CN116312543B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of financial technology, and in particular to a speech conversion method, apparatus, system and medium based on dependency inversion. Background Technology
[0002] With the rapid development of the mobile internet, financial institutions have launched mobile applications, such as mobile banking apps and credit card apps, providing users with flexible and diverse financial services anytime, anywhere. Currently, the demand for voice input in mobile apps is very common, and voice-to-text input SDKs (Software Development Kits) are quite mature. Compared to manual keyboard input, voice input offers users a significantly improved input experience.
[0003] When integrating a voice SDK into a mobile app, there is often a need to select the most suitable voice input SDK. At the same time, mobile apps usually make voice input an optional feature, so that when the voice function is not needed, the application can remove the function with minimal code changes while ensuring that other functions function normally.
[0004] However, currently, when implementing voice SDK functionality, the main application first relies on the voice SDK, and then implements the relevant interfaces provided by the SDK. Once the relevant dependencies are removed, the application will fail to compile and run. This means that when changing the voice SDK or choosing not to enable the voice function, the removal of dependencies may cause abnormal application operation and affect the stability of mobile application operation. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a dependency-inverted speech conversion method, apparatus, system and medium that can be applied to financial technology or other related fields, aiming to improve the flexibility of speech conversion function implementation and improve the operational stability of mobile applications.
[0006] The technical solution of the present invention is as follows:
[0007] A speech conversion method based on dependency inversion includes:
[0008] Receive user's voice conversion request;
[0009] The preset abstract voice interface is invoked according to the voice conversion request;
[0010] Obtain the currently injected voice SDK from the abstract voice interface;
[0011] The speech conversion request is processed according to the functions of the currently injected speech SDK, and the corresponding speech conversion result is returned.
[0012] In one embodiment, before receiving the user's voice conversion request, the method further includes:
[0013] An abstract voice interface is created, which defines an initialization method for implementing a common speech recognition function.
[0014] In one embodiment, before receiving the user's voice conversion request, the method further includes:
[0015] Adjust the dependent SDK in the abstract voice interface according to the voice function requirements of the target application.
[0016] In one embodiment, adjusting the dependent SDK in the abstract voice interface according to the voice function requirements of the target application includes:
[0017] Obtain multiple voice SDKs, each of which contains corresponding voice function implementation methods;
[0018] Configure the dependency injection state of each voice SDK to the abstract voice interface according to the voice function requirements of the target application.
[0019] In one embodiment, adjusting the dependent SDK in the abstract voice interface according to the voice function requirements of the target application further includes:
[0020] When the target application needs to remove the voice function, the initialization method of the abstract voice interface and its dependent SDK are deleted.
[0021] In one embodiment, processing the speech conversion request based on the functionality of the currently injected speech SDK and returning the corresponding speech conversion result includes:
[0022] Get the voice function implementation methods of the currently injected voice SDK;
[0023] The voice function implementation method is invoked to perform voice conversion processing on the voice conversion request;
[0024] The corresponding speech conversion results are displayed on the screen.
[0025] In one embodiment, the method further includes:
[0026] If the voice SDK injected into the abstract voice interface is empty, a prompt message indicating that the voice conversion function is not supported will be returned directly.
[0027] A speech conversion device based on dependency inversion, comprising:
[0028] The receiving module is used to receive users' voice conversion requests;
[0029] The interface call module is used to call a preset abstract voice interface according to the voice conversion request;
[0030] The acquisition module is used to acquire the currently injected voice SDK in the abstract voice interface;
[0031] The conversion processing module is used to process the voice conversion request according to the functions of the currently injected voice SDK and return the corresponding voice conversion result.
[0032] A dependency-inverted speech conversion system, the system comprising at least one processor; and,
[0033] A memory communicatively connected to the at least one processor; wherein,
[0034] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the aforementioned dependency-inverted speech conversion method.
[0035] A non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the aforementioned dependency-inverted speech conversion method.
[0036] Beneficial effects: This invention discloses a speech conversion method, apparatus, system, and medium based on dependency inversion. Compared with the prior art, the embodiments of this invention pre-define an abstract speech interface on which both the main application program and the underlying speech SDK module depend. Based on dependency injection, the required speech SDK is flexibly injected into the abstract speech interface to realize the user's speech conversion request. This makes the main application program no longer dependent on the underlying speech SDK, reducing the dependency relationship between components and eliminating the impact of changes in the underlying module on the operation of the application. While improving the flexibility of speech conversion function implementation, it also improves the stability of mobile application operation. Attached Figure Description
[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0038] Figure 1 A flowchart of a dependency inversion-based speech conversion method provided in an embodiment of the present invention;
[0039] Figure 2Another flowchart of the speech conversion method based on dependency inversion provided in an embodiment of the present invention;
[0040] Figure 3 Another flowchart of the speech conversion method based on dependency inversion provided in an embodiment of the present invention;
[0041] Figure 4 A flowchart of step S600 in the speech conversion method based on dependency inversion provided in an embodiment of the present invention;
[0042] Figure 5 A flowchart of step S400 in the speech conversion method based on dependency inversion provided in an embodiment of the present invention;
[0043] Figure 6 A schematic diagram of the functional modules of a dependency-inverted speech conversion device provided in an embodiment of the present invention;
[0044] Figure 7 This is a schematic diagram of the hardware structure of a speech conversion system based on dependency inversion provided in an embodiment of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. The embodiments of the invention are described below in conjunction with the accompanying drawings.
[0046] Currently, major banks have launched mobile applications such as mobile banking apps and credit card apps to provide users with flexible and comprehensive financial services anytime, anywhere. In the current market, the demand for voice input in mobile apps is very common, and voice-to-text input SDKs (Software Development Kits) are quite mature. Compared to manually typing on a keyboard, voice input brings a significant improvement to the user's input experience. For example, when communicating with bank customer service, users can automatically convert their voice input into text, achieving a more efficient and convenient communication process.
[0047] When integrating a voice SDK into a mobile app, there is often a need to select the most suitable voice input SDK. At the same time, mobile apps usually make voice input an optional feature, so that when the voice function is not needed, the application can remove the function with minimal code changes while ensuring that other functions function normally.
[0048] However, currently, when implementing voice SDK functionality, the main application first relies on the voice SDK, and then implements the relevant interfaces provided by the SDK. Once the relevant dependencies are removed, the application will fail to compile and run. This means that when changing the voice SDK or choosing not to enable the voice function, the removal of dependencies may cause abnormal application operation and affect the stability of mobile application operation.
[0049] To address the aforementioned problems, this invention proposes a speech conversion method based on dependency inversion. Please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a flowchart of an embodiment of the dependency-inverted speech conversion method provided by the present invention. The dependency-inverted speech conversion method provided in this embodiment is applied to a system comprising a terminal device, a network, and a server. The network serves as the medium for providing a communication link between the terminal device and the server, and can include various connection types, such as wired, wireless communication links, or fiber optic cables. The operating system on the terminal device can include a handheld device operating system (iPhone operating system, iOS system), Android system, or other operating systems. The terminal device connects to the server through the network to achieve interaction, thereby performing operations such as receiving or sending data. Specifically, it can be various electronic devices with a display screen and supporting web browsing, including but not limited to smartphones, tablets, portable computers, and desktop servers. Figure 1 As shown, the method specifically includes the following steps:
[0050] S100: Receives the user's voice conversion request;
[0051] In this embodiment, when a user is using a target application on a mobile terminal, if they need to call the voice input function for voice-to-text conversion, such as when the user is using the voice search function of the target application or communicating with online customer service, the user can enter voice and initiate a voice conversion request by clicking the preset voice button on the relevant page of the target application, so as to achieve a convenient input interaction experience.
[0052] S200: Invoke the preset abstract voice interface according to the voice conversion request;
[0053] S300: Obtain the currently injected voice SDK in the abstract voice interface.
[0054] The voice conversion request is implemented by calling a preset abstract voice interface, which is defined by the main program of the target application. The corresponding voice conversion function is implemented by the voice SDK injected into the abstract interface. Unlike the existing solution where the main program depends on the underlying voice SDK, in this embodiment, the main program, as a high-level module, is responsible for defining the interface and does not depend on the underlying module responsible for implementation, i.e., the voice SDK. The voice SDK depends on the abstract interface defined by the high-level module through dependency injection. By using this dependency inversion method, where both the main program and the underlying module depend on the abstract voice interface, the decoupling between the main program and the underlying implementation is achieved. Changes in the underlying voice SDK no longer affect the normal operation of other functions of the main program, ensuring the stability of the target application.
[0055] S400. Process the voice conversion request according to the functions of the currently injected voice SDK and return the corresponding voice conversion result.
[0056] Since different voice SDKs may implement different functions or have different degrees of compatibility with the target voice, the developers of the target application can flexibly adjust the voice SDK injected into the abstract voice interface according to their needs. This allows the application to respond to the request based on the latest voice SDK injected into the abstract interface after the user initiates a voice conversion request, and return the corresponding voice conversion result, such as the corresponding text, saved voice text, etc.
[0057] The speech conversion method provided in this embodiment pre-defines an abstract speech interface that both the main program and the underlying speech SDK module depend on. Based on the principle of dependency inversion, the required speech SDK is flexibly injected into the abstract speech interface through dependency injection to achieve inversion of control. This makes the application main program no longer dependent on the underlying speech SDK, reducing the dependencies between components and eliminating the impact of changes in the underlying module on the operation of the application. While improving the flexibility of speech conversion function, it also improves the stability of mobile application operation.
[0058] In one embodiment, such as Figure 2 As shown, before step S100, the method further includes:
[0059] S500. Create an abstract voice interface, in which an initialization method for implementing a common voice recognition function is defined.
[0060] In this embodiment, an abstract voice interface is pre-created, and an initialization method for implementing common speech recognition functions is defined in the abstract voice interface. That is, the target application relies on this abstract voice interface to implement the corresponding voice functions. In the absence of other voice SDK injection, the common speech recognition functions are implemented through the callback interface inside the initialization method. The specific common speech recognition functions can be defined according to the needs of the target application itself, such as starting speech recognition; providing the speech file path and returning the recognition result text; changing the volume; notifying the event of recognition completion; returning information such as recording duration; modifying recognition parameter configuration, such as sampling frequency, encoding format, recording duration, audio storage path, etc.; ending speech recognition, etc. This embodiment does not limit these functions.
[0061] In one embodiment, such as Figure 3 As shown, before step S100, the method further includes:
[0062] S600. Adjust the dependent SDK in the abstract voice interface according to the voice function requirements of the target application.
[0063] In this embodiment, after defining the initialization method of the abstract voice interface, the dependency injection in the abstract interface can be flexibly adjusted according to the voice function requirements of the target application. That is, the dependency SDK injected into the abstract voice interface can be used to achieve rich and adjustable voice function configuration. Based on the principle of dependency inversion, this adjustment of the underlying dependency SDK will not affect the main program operation of the target application. This achieves flexible configuration of voice function while ensuring the stability of the application.
[0064] In one embodiment, such as Figure 4 As shown, step S600 includes:
[0065] S601. Obtain multiple voice SDKs, each of which contains corresponding voice function implementation methods;
[0066] S602. Configure the dependency injection state of each voice SDK to the abstract voice interface according to the voice function requirements of the target application.
[0067] In this embodiment, when configuring the dependent SDKs in the abstract voice interface, multiple voice SDKs are first obtained according to the requirements, such as voice SDKs provided by different software service providers. Each voice SDK contains corresponding implementation methods to implement related voice functions. Developers can flexibly select the voice SDKs to be injected into the abstract voice interface according to the functional requirements of the target application. That is, each voice SDK is optional to be injected. The current injection status of each voice SDK can be configured to control whether it is injected into the interface, thus completing the configuration of the underlying implementation method in a convenient and efficient manner.
[0068] This embodiment significantly reduces dependencies between components through a dependency mechanism, while also greatly improving component reusability. This means the main program of the target application does not need frequent changes to keep up with business requirements, allowing for the retention of common code for the upper-layer voice processing logic, dynamic replacement of the underlying SDK, and optional dependencies. For example, when the target application requires voice recognition functionality, after creating an abstract interface, the required voice SDK can be added along with an initialization method; when switching to a different voice SDK provider, only the dependency address and initialization parameters need to be modified, greatly improving the efficiency of voice function configuration.
[0069] In one embodiment, step S600 further includes:
[0070] When the target application needs to remove the voice function, the initialization method of the abstract voice interface and its dependent SDK are deleted.
[0071] In this embodiment, when configuring the voice function of the target application, if the latest business requirement is to remove the voice function, there is no need to replace the main program of the target application. Simply delete the initialization method of the abstract voice interface and the dependent SDK, i.e., the voice SDK, to quickly remove the function, while ensuring the normal operation of the other functions of the target application.
[0072] In one embodiment, such as Figure 5 As shown, step S400 includes:
[0073] S401. Obtain the voice function implementation methods of the currently injected voice SDK;
[0074] S402. Call the voice function implementation method to perform voice conversion processing on the voice conversion request;
[0075] S403. Display the corresponding speech conversion results on the display interface.
[0076] In this embodiment, when returning the voice conversion result, the voice function implementation method of the injected voice SDK is obtained according to the dependency injection of the current abstract voice interface. The voice information carried in the voice conversion request is converted and processed by the method to obtain the corresponding voice conversion result, such as converted text. The corresponding voice conversion result is displayed on the display interface of the mobile terminal, bringing users an efficient and convenient voice input experience.
[0077] In one embodiment, the method further includes:
[0078] If the voice SDK injected into the abstract voice interface is empty, a prompt message indicating that the voice conversion function is not supported will be returned directly.
[0079] In this embodiment, if the target application has removed the voice function due to changes in business needs, that is, the implementation in the abstract voice interface is empty and there is no specific voice SDK to inject a concrete implementation method, then it is considered that the relevant voice function is not supported. At this time, a prompt message indicating that the voice conversion function is not supported is returned, and the prompt message is displayed on the display interface of the mobile terminal to remind the user to adjust the input method.
[0080] Another embodiment of the present invention provides a speech conversion device based on dependency inversion, such as Figure 6 As shown, device 1 includes:
[0081] Receiver module 11 is used to receive the user's voice conversion request;
[0082] The interface calling module 12 is used to call a preset abstract voice interface according to the voice conversion request;
[0083] The acquisition module 13 is used to acquire the currently injected voice SDK in the abstract voice interface;
[0084] The conversion processing module 14 is used to process the voice conversion request according to the functions of the currently injected voice SDK and return the corresponding voice conversion result.
[0085] The module referred to in this invention is a series of computer program instruction segments that can perform specific functions. It is more suitable than a program for describing the execution process of speech conversion based on dependency inversion. For specific implementation methods of each module, please refer to the corresponding method embodiments above, which will not be repeated here.
[0086] In one embodiment, the device 1 further includes:
[0087] The interface creation module is used to create an abstract voice interface, which defines an initialization method for implementing a common speech recognition function.
[0088] In one embodiment, the device 1 further includes:
[0089] The dependency configuration module is used to adjust the dependency SDK in the abstract voice interface according to the voice function requirements of the target application.
[0090] In one embodiment, the dependency configuration module includes:
[0091] The acquisition unit is used to acquire multiple voice SDKs, each of which contains the corresponding voice function implementation methods;
[0092] The dependency injection unit is used to configure the dependency injection state of each voice SDK to the abstract voice interface according to the voice function requirements of the target application.
[0093] In one embodiment, the dependency configuration module further includes:
[0094] The deletion unit is used to delete the initialization method and dependent SDK of the abstract voice interface when the target application needs to remove the voice function.
[0095] In one embodiment, the conversion processing module 14 includes:
[0096] The method acquisition unit is used to acquire the voice function implementation methods of the currently injected voice SDK;
[0097] The method invocation unit is used to invoke the voice function implementation method to perform voice conversion processing on the voice conversion request;
[0098] The display unit is used to show the corresponding speech conversion results on the display interface.
[0099] In one embodiment, the device 1 further includes:
[0100] The prompt module is used to directly return a prompt message indicating that the voice conversion function is not supported if the voice SDK injected in the abstract voice interface is empty.
[0101] Another embodiment of the present invention provides a speech conversion system based on dependency inversion, such as Figure 7 As shown, system 10 includes:
[0102] One or more processors 110 and memory 120, Figure 7 The following description uses a processor 110 as an example. The processor 110 and the memory 120 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0103] Processor 110 is used to perform various control logics of system 10, and can be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), microcontroller, ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. Furthermore, processor 110 can also be any conventional processor, microprocessor, or state machine. Processor 110 can also be implemented as a combination of computing devices, such as a combination of DSP and microprocessor, multiple microprocessors, one or more microprocessors combined with DSP and / or any other such configuration.
[0104] The memory 120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions corresponding to the dependency-inversion-based speech conversion method in the embodiments of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by running the non-volatile software programs, instructions, and units stored in the memory 120, thereby implementing the dependency-inversion-based speech conversion method in the above method embodiments.
[0105] The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created according to the use of the system 10. Furthermore, the memory 120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include memory remotely located relative to the processor 110, and these remote memories may be connected to the system 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0106] One or more units are stored in memory 120, and when executed by one or more processors 110, perform the following steps:
[0107] Receive user's voice conversion request;
[0108] The preset abstract voice interface is invoked according to the voice conversion request;
[0109] Obtain the currently injected voice SDK from the abstract voice interface;
[0110] The speech conversion request is processed according to the functions of the currently injected speech SDK, and the corresponding speech conversion result is returned.
[0111] In one embodiment, before receiving the user's voice conversion request, the method further includes:
[0112] An abstract voice interface is created, which defines an initialization method for implementing a common speech recognition function.
[0113] In one embodiment, before receiving the user's voice conversion request, the method further includes:
[0114] Adjust the dependent SDK in the abstract voice interface according to the voice function requirements of the target application.
[0115] In one embodiment, adjusting the dependent SDK in the abstract voice interface according to the voice function requirements of the target application includes:
[0116] Obtain multiple voice SDKs, each of which contains corresponding voice function implementation methods;
[0117] Configure the dependency injection state of each voice SDK to the abstract voice interface according to the voice function requirements of the target application.
[0118] In one embodiment, adjusting the dependent SDK in the abstract voice interface according to the voice function requirements of the target application further includes:
[0119] When the target application needs to remove the voice function, the initialization method of the abstract voice interface and its dependent SDK are deleted.
[0120] In one embodiment, processing the speech conversion request based on the functionality of the currently injected speech SDK and returning the corresponding speech conversion result includes:
[0121] Get the voice function implementation methods of the currently injected voice SDK;
[0122] The voice function implementation method is invoked to perform voice conversion processing on the voice conversion request;
[0123] The corresponding speech conversion results are displayed on the screen.
[0124] In one embodiment, the method further includes:
[0125] If the voice SDK injected into the abstract voice interface is empty, a prompt message indicating that the voice conversion function is not supported will be returned directly.
[0126] This invention provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example, to perform the operations described above. Figure 1 The method steps S100 to S400.
[0127] As examples, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The memory components or memories disclosed in the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0128] In summary, the speech conversion method, apparatus, system, and medium based on dependency inversion disclosed in this invention involve the following steps: The method receives a user's speech conversion request; invokes a preset abstract speech interface based on the request; obtains the currently injected speech SDKs from the abstract speech interface; processes the speech conversion request according to the functionality of the injected speech SDKs; and returns the corresponding speech conversion result. By pre-setting an abstract speech interface that both the application's main program and the underlying speech SDK modules depend on, and flexibly injecting the required speech SDKs into the abstract speech interface based on dependency injection to fulfill the user's speech conversion request, the application's main program no longer depends on the underlying speech SDK. This reduces the dependencies between components and eliminates the impact of changes in the underlying modules on the application's operation. This improves the flexibility of speech conversion functionality while also enhancing the stability of mobile application operation.
[0129] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The computer program can be stored in a non-volatile, computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The storage medium can be a memory, magnetic disk, floppy disk, flash memory, optical storage, etc.
[0130] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A dependency inversion based speech conversion method, characterized by, The method comprises the following steps: receiving a voice conversion request of a user; calling a preset abstract voice interface according to the voice conversion request, the abstract voice interface being defined by a main program of a target application, and the main program and an underlying voice SDK both relying on the abstract voice interface; obtaining a currently injected voice SDK in the abstract voice interface; processing the voice conversion request according to a function of the currently injected voice SDK, and returning a corresponding voice conversion result; before the step of receiving the voice conversion request of the user, the method further comprises the following steps: adjusting a dependent SDK in the abstract voice interface according to a voice function requirement of the target application; the step of adjusting the dependent SDK in the abstract voice interface according to the voice function requirement of the target application comprises the following steps: obtaining a plurality of voice SDKs, each of which contains a corresponding voice function implementation method; configuring a dependent injection state of each voice SDK to the abstract voice interface according to the voice function requirement of the target application.
2. The dependency inversion based speech conversion method of claim 1, wherein, before the step of receiving the voice conversion request of the user, the method further comprises the following step: creating an abstract voice interface, and defining an initialization method for implementing a public voice recognition function in the abstract voice interface.
3. The dependency inversion based speech conversion method of claim 2, wherein, the step of adjusting the dependent SDK in the abstract voice interface according to the voice function requirement of the target application further comprises the following step: when the target application needs to remove a voice function, deleting the initialization method of the abstract voice interface and the dependent SDK.
4. The dependency inversion based voice conversion method of claim 2, wherein, the step of processing the voice conversion request according to the function of the currently injected voice SDK and returning the corresponding voice conversion result comprises the following steps: obtaining a voice function implementation method of the currently injected voice SDK; calling the voice function implementation method to perform voice conversion processing on the voice conversion request; displaying the corresponding voice conversion result on a display interface.
5. The dependency inversion based voice conversion method of claim 1, wherein, the method further comprises the following step: if the voice SDK injected in the abstract voice interface is empty, directly returning prompt information indicating that voice conversion function is not supported.
6. A voice conversion apparatus based on dependency inversion, characterized by, The system comprises at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores a computer program, and the at least one processor executes the computer program to implement the method. 7. A dependency inversion based speech conversion system characterized by, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the dependency inversion based speech conversion method of any one of claims 1-5.
8. A non-transitory computer readable storage medium, comprising: The non-volatile computer readable storage medium stores computer executable instructions that, when executed by one or more processors, cause the one or more processors to perform the dependency inversion based speech conversion method of any one of claims 1-5.
Citation Information
Patent Citations
Abstraction API automatic generation system and generation method thereof
JP2017033424A
Standalone voice recognition method and system using abstraction API layer
KR1020120063372A