Voice data processing method, electronic equipment, service equipment and readable storage medium

By integrating voice acquisition and processing components in electronic devices, the translation and processing of voice data is realized, and the problem of voice call mutual translation on a single device is solved, providing a simple and efficient voice translation solution, and improving user experience.

CN118887944APending Publication Date: 2024-11-01SHENZHEN YIJIA INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411075475.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The prior art cannot realize voice translation during voice calls on a single device, resulting in inconvenient user experience.

Method used

By integrating voice acquisition device, encoder, decoder, switching module and translation components in electronic devices, the translation processing of voice data is realized, the execution mode is determined according to the status of the switch module, the original sound mode or interpretation mode is performed, and the voice data is performed. encoding, decoding and translation.

Benefits of technology

Real-time translation of voice data in call scenarios is realized, and users can realize voice translation without additional equipment, improving user experience and system adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887944A_ABST
    Figure CN118887944A_ABST
Patent Text Reader

Abstract

The invention provides a voice data processing method, electronic equipment, service equipment and a readable storage medium, and relates to the technical field of data processing. The electronic device is in communication connection with a target device, the target device communicates with a call device, and the voice data processing method comprises the steps that first voice data is acquired, and the first voice data is call voice data described through a first language. And translating the first voice data to obtain second voice data which is described through a second language. And sending the second voice data to the target device, or playing the second voice data through the electronic device. According to the method and the device, the received or sent voice data can be translated in the call scene, so that the call party connected with the electronic equipment can realize translation with the user during the call without carrying out additional actions or purchasing additional equipment, and a simple, convenient, efficient and accurate voice translation scheme with good user experience is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and more specifically, particularly relates to a voice data processing method, electronic equipment, service equipment and readable storage medium. Background Art

[0002] In today's era of globalization, communication between people is becoming more and more frequent, and it is very important to communicate effectively across language barriers. With the continuous development of science and technology, some devices and software with translation functions have emerged.

[0003] However, translation equipment and software often require both parties to have the corresponding equipment or software to achieve the function of mutual translation between the two parties. Especially in voice calls, due to the differences in mobile terminals, it is difficult to achieve voice translation between the two parties on a single device. This makes users feel a lot of inconvenience when using it, resulting in a serious impact on the user experience. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a voice data processing method, electronic device, service device and readable storage medium to solve the problem in the prior art that voice translation during calls cannot be achieved on a single device.

[0005] In the first aspect, the present application provides a method for processing voice data, which is applied to an electronic device, the electronic device is communicatively connected with a target device, and the target device communicates with a call device, the method comprising: obtaining first voice data, the first voice data being call voice data described in a first language. When it is determined to translate the first voice data, the first voice data is translated and processed to obtain second voice data, and the second voice data is described in a second language. If the first voice data is collected by the electronic device, the second voice data is sent to the target device, instructing the target device to send the second voice data as call data to the call device. If the first voice data is from the call device, the second voice data is played through the electronic device.

[0006] In some implementations, determining to translate the first voice data includes: determining a current execution mode according to a state of a switching module in the electronic device, the execution mode including an original sound mode and an interpretation mode. When the state of the switching module indicates that the current execution mode is the interpretation mode, determining to translate the first voice data.

[0007] In some implementations, the first voice data is collected by an electronic device, the first voice data is uncoded voice data collected by a voice collection device, and the second voice data is voice data encoded by a first coding protocol. The first voice data is translated to obtain the second voice data, including: encoding the first voice data according to the second coding protocol by a processor of the electronic device to obtain third voice data encoded according to the second coding protocol. The third voice data is translated to obtain fourth voice data. The fourth voice data is encoded according to the first coding protocol to obtain the second voice data.

[0008] In some implementations, encoding the fourth voice data according to the first coding protocol to obtain the second voice data includes: encoding the fourth voice data by a processor of the electronic device to obtain the second voice data. Or, encoding the fourth voice data by a first encoder to obtain the second voice data, the first encoder being used to encode the unencoded voice data according to the first coding protocol.

[0009] In some implementations, the first voice data is collected by an electronic device, the first voice data is unencoded voice data collected by a voice collection device, and the second voice data is voice data encoded by a first coding protocol. The first voice data is translated to obtain the second voice data, including: encoding the first voice data by a first encoder to obtain fifth voice data, the first encoder being used to encode the unencoded voice data according to the first coding protocol. The first coding protocol corresponding to the fifth voice data is identified by a processor of the electronic device. The fifth voice data is re-encoded according to the first coding protocol and the second coding protocol to obtain third voice data encoded according to the second coding protocol. The third voice data is translated to obtain fourth voice data. The fourth voice data is encoded according to the first coding protocol to obtain the second voice data.

[0010] In some implementations, the first voice data is from a call device, the first voice data is voice data encoded by a first coding protocol, and the second voice data is uncoded voice data collected by a voice collection device. The first voice data is translated to obtain the second voice data, including: identifying the first coding protocol corresponding to the first voice data by a processor of an electronic device. The first voice data is re-encoded according to the first coding protocol and the second coding protocol to obtain third voice data encoded according to the second coding protocol. The third voice data is translated to obtain fourth voice data. The second voice data is obtained according to the fourth voice data. Or, the fourth voice data is used as the second voice data.

[0011] In some implementations, obtaining the second voice data according to the fourth voice data includes: encoding the fourth voice data according to a first coding protocol by a processor of an electronic device to obtain sixth voice data. Decoding the sixth voice data by a first decoder to obtain the second voice data, the first decoder being used to decode voice data encoded using the first coding protocol.

[0012] In some implementations, translating the third voice data to obtain the fourth voice data includes: translating the third voice data locally to obtain the fourth voice data. Or, according to the third voice data and the processing instruction, sending a processing request to the service device, the processing instruction is used to instruct the service device to convert the third voice data into voice data described in the second language.

[0013] In some implementations, locally translating the third voice data to obtain the fourth voice data includes: performing voice recognition on the third voice data to obtain corresponding first text data; translating the first text data to obtain second text data described in a second language; and performing voice synthesis based on the second text data to obtain the fourth voice data.

[0014] In some implementations, after sending a processing request to the service device according to the third voice data and the processing instruction, the method includes: receiving fourth voice data from the service device, where the fourth voice data is processed by the service device according to the third voice data.

[0015] In some implementations, the method further includes: when it is determined not to translate the first voice data, if the first voice data is collected by the electronic device, sending the first voice data to the target device, and the target device sending the first voice data as call data to the call device. If the first voice data is from the call device, playing the first voice data through the electronic device.

[0016] In a second aspect, the present application also provides a method for processing voice data, which is applied to a service device, comprising: receiving a processing request from an electronic device, the processing request comprising a processing instruction and third voice data, the third voice data being obtained by re-encoding the first voice data according to a second encoding protocol, the first voice data being described in a first language, and the processing instruction being used to instruct the service device to convert the third voice data into voice data described in a second language. The third voice data is processed according to the processing instruction to obtain fourth voice data, the fourth voice data being described in a second language. The fourth voice data is sent to the electronic device.

[0017] In some embodiments, the third voice data is processed according to the processing instruction to obtain fourth voice data, including: performing voice recognition on the third voice data to obtain corresponding first text data; translating the first text data to obtain second text data described in a second language; and performing voice synthesis based on the second text data to obtain fourth voice data.

[0018] In the third aspect, the present application also provides an electronic device, including: a voice collection device, a playback device, a first encoder, a first decoder, a switching module, a translation component and a data interface, wherein the data interface is used to connect the electronic device to the target device for communication. The voice collection device is connected to the data interface through the first encoder, and the switching module is arranged between the voice collection device and the first encoder or between the first encoder and the data interface. When the switching module is arranged between the voice collection device and the first encoder, one end of the translation component is connected to the switching module, and the other end is connected to the first encoder or the data interface. When the switching module is arranged between the first encoder and the data interface, one end of the translation component is connected to the switching module, and the other end is connected to the data interface. The playback device is connected to the data interface through the first decoder, and the switching module is arranged between the playback device and the first decoder or between the first decoder and the data interface. When the switching module is arranged between the playback device and the first decoder, one end of the translation component is connected to the switching module, and the other end is connected to the playback device. When the switching module is arranged between the first decoder and the data interface, one end of the translation component is connected to the switching module, and the other end is connected to the first decoder or the playback device. The translation component includes at least one processor and a storage medium connected to the processor, wherein the at least one processor is communicatively connected to the storage medium, and the storage medium stores at least one instruction set, wherein the at least one processor reads the at least one instruction set when running, and implements the method for processing speech data provided in the first aspect according to the instructions of the at least one instruction set.

[0019] In a fourth aspect, the present application also provides a service device, comprising: at least one storage medium storing at least one instruction set for processing voice data; and at least one processor, communicatively connected to the at least one storage medium, wherein the at least one processor reads the at least one instruction set when running, and executes the voice data processing method provided in the second aspect according to the instructions of the at least one instruction set.

[0020] In a fifth aspect, the present application also provides a computer-readable storage medium, in which at least one instruction set is stored. When the at least one instruction set is executed by at least one processor, the voice data processing method provided in the first aspect or the second aspect is implemented.

[0021] In a sixth aspect, the present application further provides a chip system, which is applied to an electronic device, and the chip system includes: at least one processor, at least one data interface, a storage medium, a decoder, and an encoder, wherein the processor, the data interface, the storage medium, the decoder, and the encoder are interconnected through a circuit; a computer program is stored in the storage medium, and when the computer program is executed by the processor, the voice data processing method provided in the first aspect is implemented. In a seventh aspect, the present application further provides a computer program product, the computer program product comprising: a computer program code, which, when executed, implements the method for processing voice data provided in the first aspect or the second aspect.

[0022] In the present application, in a call scenario, when it is determined to perform a translation, after obtaining the first voice data described in the first language, the first voice data is translated and processed to obtain the second voice data described in the second language. Then, according to the source of the first voice data, the second language data is played locally or the second voice data is sent to the target device. During a call, the electronic device translates the received or sent voice data, so that the caller connected to the electronic device can achieve mutual translation with the user during the call without taking additional actions or purchasing additional equipment, providing a simple, efficient, accurate voice translation solution with a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram showing an application scenario of a method for processing voice data provided in the present application is shown; Figure 2 A schematic diagram showing an application scenario of another method for processing voice data provided in the present application; Figure 3 A schematic diagram showing the structure of an electronic device in a method for processing voice data provided in the present application is shown; Figure 4 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 5 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 6 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 7 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 8A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Fig. 9 A flow chart of a method for processing speech data provided in the present application is shown; Fig.10 A flow chart of another method for processing speech data provided in the present application is shown. DETAILED DESCRIPTION

[0024] The following description provides specific application scenarios and requirements of this specification, with the purpose of enabling those skilled in the art to make and use the contents of this specification. Various local modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but to the widest scope consistent with the claims.

[0025] The terms used herein are only used for the purpose of describing specific example embodiments and are not restrictive. For example, unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an" and "the" may also include plural forms. When used in this specification, the terms "include", "comprise" and / or "contain" mean that the associated integers, steps, operations, elements and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups or that other features, integers, steps, operations, elements, components and / or groups may be added in the system / method.

[0026] In view of the following description, these and other features of the present specification, as well as the operation and function of the related elements of the structure, and the economy of the combination and manufacture of the parts can be significantly improved. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.

[0027] The flowcharts used in this specification illustrate the operations implemented by the system according to some embodiments in this specification. It should be clearly understood that the operations of the flowcharts may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.

[0028] Figure 1 A schematic diagram of an application scenario of a method for processing voice data provided in the present application is shown.

[0029] like Figure 1As shown, the method for processing voice data can be applied to call scenarios.

[0030] It includes at least one electronic device 11, a target device 12, and a call device 13.

[0031] exist Figure 1 In the example, the electronic device 11 may be an external device of the target device 12, such as a Bluetooth headset, a wired headset, an external microphone, etc. The target device 12 may be a computer, a laptop, a server, a mobile device, a wearable device, a vehicle-mounted device, etc. Specifically, the mobile device may include a smart phone, a tablet computer, a personal digital assistant (PDA), etc.; the wearable device may include a smart watch, a smart bracelet, a smart glasses, a virtual reality (VR) device, an augmented reality (AR) device, etc.; the vehicle-mounted device may include a vehicle-mounted computer, a vehicle-mounted phone, a vehicle-mounted entertainment system, etc.

[0032] refer to Figure 1 , the electronic device 11 can communicate with the target device 12 through the data interface. As an example, the protocols supported by the data interface include but are not limited to the following public protocols: IIS protocol, Bluetooth protocol, Star Flash protocol, UAC protocol, PD protocol, Thunderbolt protocol, TCP / IP protocol, S / PDIF protocol, ADAT protocol. The types of data interfaces include but are not limited to Aux interface, RCA interface, BNC interface, TSR interface, RJ45 interface, RS232 interface, HDMI interface, USB interface, type-c interface, S / PDIF interface, Bluetooth interface, WiFi interface, Lora interface, Zigbee interface.

[0033] The type of the call device 13 may be the same as or different from that of the target device 12. When the target device 12 is talking with the call device 13, the target device 12 may send the received voice data sent by the call device 13 to the electronic device 11, and the electronic device 11 processes the voice data using the voice data processing method provided in the present application and then plays the voice data.

[0034] At the same time, the electronic device 11 can also receive the user's voice data through the microphone, and after processing the voice data using the voice data processing method provided in this application, send it to the target device 12, and the target device 12 sends the voice data to the call device 13 with which it is talking.

[0035] Figure 2 A schematic diagram of an application scenario of another method for processing voice data provided in the present application is shown.

[0036] like Figure 2 As shown, the method for processing voice data can be applied to call scenarios.

[0037] Among them, Figure 1 The difference of the illustrated scenario is that the electronic device 11 is integrated into the target device 12. For example, the electronic device 11 may be an integrated circuit in the target device 12 or pluggable hardware.

[0038] The target device 12 and the call device are similar to those in the above example and will not be described in detail here.

[0039] Figure 3 A schematic diagram showing the structure of an electronic device in a method for processing voice data provided in the present application is shown; Figure 4 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 5 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown. Figure 3 , Figure 4 and Figure 5 The structure shown can be applied to the scenario of collecting voice data and sending it to the target device.

[0040] refer to Figure 3 , Figure 4 and Figure 5 The electronic device includes a voice collection device 21, a switching module 22, a translation component, a first encoder 25 and a data interface 26, wherein the translation component includes a processor 23 and a storage medium 24. The data interface 26 is used to connect the electronic device 11 with the target device 12 for communication.

[0041] refer to Figure 3 , Figure 4 and Figure 5 The voice collection device 21 is connected to the data interface 26 through the first encoder 25 , and the switching module 22 is arranged between the voice collection device 21 and the first encoder 25 or between the first encoder 25 and the data interface 26 .

[0042] In some embodiments, reference Figure 3 and Figure 4 When the switching module 22 is disposed between the voice collection device 21 and the first encoder 25, one end of the processor 23 is connected to the switching module 22, and the other end is connected to the first encoder 25 or the data interface 26. The storage medium 24 is connected to the processor 23. The electronic device 11 is connected to the target device 12 via the data interface 26.

[0043] In some other embodiments, reference Figure 5 When the switching module 22 is disposed between the first encoder 25 and the data interface 26, one end of the processor 23 is connected to the switching module, and the other end is connected to the data interface 26. The storage medium 24 is connected to the processor 23. The electronic device 11 is connected to the target device 12 via the data interface 26.

[0044] In some implementations, at least one processor 23 is communicatively connected to a storage medium 24, which stores at least one instruction set, wherein at least one processor 23 reads at least one instruction set when running, and executes the voice data processing method provided below according to the instructions of at least one instruction set.

[0045] In the present application, the voice collection device 21 is generally a microphone, and the switching module 22 can be a physical component, such as a button, a switch, a touch component, etc., or an analog component or data used to indicate switching, such as a code for implementing the switching function, a value in a flag, a high level or a low level, an analog switch, etc. The electronic device 11 can respond to user operations, adjust the state of the switching module 22, and then change the execution mode of the electronic device 11. For example, when the user operates the switching module 22 and indicates that the execution mode is the original sound mode, the switching module 22 will instruct that the voice data collected by the voice collection device 21 is directly sent to the data interface 26 for connection. For example, in the original sound mode, the original voice data (first voice data) collected by the voice collection device 21 can be directly sent to the target device 12 through the data interface 26.

[0046] When the user operates the switching module 22 to indicate that the execution mode is the interpretation mode, the switching module 22 will instruct that the voice data collected by the voice collection device 21 be sent to the translation component, and after being processed by the translation component, it will be sent to the data interface 26. For example, in the interpretation mode, the collected original voice data (first voice data) will first be sent to the translation component for translation to obtain translated voice data (second voice data), and then the translated voice data (second voice data) will be sent to the target device 12 through the data interface 26.

[0047] Through this flexible conversion selection mechanism, users do not need to be restricted by a single function, which greatly enhances the adaptability of the system and solves the problem that users of traditional voice conversion systems cannot choose whether to perform voice data conversion processing. This autonomous and controllable method enhances the adaptability of the system and improves the user experience.

[0048] As an example, the data interface 26 includes but is not limited to an Aux interface, an RCA interface, a BNC interface, a TSR interface, an RJ45 interface, an RS232 interface, an HDMI interface, a USB interface, a type-c interface, an s / pdif interface, a Bluetooth interface, a WiFi interface, a Lora interface, and a Ziqbee interface.

[0049] The processor 23 can recognize and process various raw voice data in analog or digital formats when executing the instruction set stored in the storage medium 24. The protocols that can be recognized include but are not limited to IIS protocol, Bluetooth protocol, Star Flash protocol, UAC protocol, PD protocol, Thunderbolt protocol, TCP / IP protocol, S / PDIF protocol, and various protocols of ADAT protocol.

[0050] Figure 6 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 7 A schematic diagram showing the structure of an electronic device in another method for processing voice data provided in the present application is shown; Figure 8 A schematic diagram of the structure of an electronic device in another method for processing voice data provided in the present application is shown. Figure 6 , Figure 7 and Figure 8 The structure shown can be applied to the scenario of receiving and playing voice data.

[0051] refer to Figure 6 , Figure 7 and Figure 8 The electronic device includes a playback device 27, a switching module 22, a translation component, a first decoder 28 and a data interface 26, wherein the translation component includes a processor 23 and a storage medium 24. The data interface 26 is used to connect the electronic device 11 to the target device 12. The playback device 27 can be a speaker, an earphone, a receiver, etc.

[0052] In some embodiments, reference Figure 6 , Figure 7 and Figure 8 The playback device 27 is connected to the data interface 26 via the first decoder 28 , and the switching module 22 is disposed between the playback device 27 and the first decoder 28 , or between the first decoder 28 and the data interface 26 .

[0053] In some embodiments, reference Figure 6 and Figure 7 When the switching module 22 is disposed between the first decoder 28 and the data interface 26 , one end of the processor 23 is connected to the switching module 22 , and the other end is connected to the first decoder 28 or the playback device 27 . The electronic device 11 is connected to the target device 12 via the data interface 26 .

[0054] In some embodiments, reference Figure 8 When the switching module 22 is disposed between the playback device 27 and the first decoder 28, one end of the processor 23 is connected to the switching module 22, and the other end is connected to the playback device 27. The storage medium 24 is connected to the processor 23. The electronic device 11 is connected to the target device 12 via the data interface 26.

[0055] At least one processor 23 is communicatively connected to a storage medium 24, in which at least one instruction set is stored, wherein at least one processor 23 reads at least one instruction set when running, and executes the voice data processing method provided below according to the instructions of at least one instruction set.

[0056] In this embodiment, the electronic device 11 can respond to user operations and adjust the state of the switching module 22, thereby changing the execution mode of the electronic device 11. For example, when the user operates the switching module to indicate that the execution mode is the original sound mode, the switching module 22 connects the playback device 27 to the data interface 26 to play the original voice data (first voice data) received from the target device.

[0057] When the user operates the switching module 22 and indicates that the execution mode is the interpretation mode, the switching module 22 will connect the playback device 27 to the data interface 26 through the translation component, and send the original voice data (first voice data) received from the target device to the translation component for translation to obtain the translated voice data (second voice data), and then send the translated voice data (second voice data) to the playback device 27 through the data interface 26 for playback.

[0058] Fig. 9 A flow chart of a method for processing speech data provided in the present application is shown. Fig. 9 The method for processing speech data shown in the figure can be applied to Figure 1 or Figure 2 An electronic device 11 is shown.

[0059] refer to Fig. 9 , the voice data processing method includes: S301: Acquire first voice data, where the first voice data is described in a first language.

[0060] In some implementations, the first voice data is voice data input into an electronic device. For example, the first voice data may be acquired through a voice acquisition device of the electronic device, or the first voice data may be received from a target device through a data interface.

[0061] For example, the first voice data may be collected by a microphone of the electronic device, or may be received from a target device connected to the electronic device.

[0062] In some implementations, if the first voice data is collected by an electronic device, the first voice data is unencoded voice data collected by a voice collection device, and the second voice data is voice data encoded by a first encoding protocol.

[0063] If the first voice data is from a communication device, the first voice data is voice data encoded by a first encoding protocol, and the second voice data is unencoded voice data collected by a voice collection device.

[0064] As an example, refer to Figure 1 , the electronic device 11 is connected to the target device 12 for communication, and the target device 12 is talking to the calling device 13. In this case, the user speaks to the electronic device 11, and the electronic device 11 collects the user's voice data, which is the first voice data.

[0065] Or, in another example, after the user of the call device 13 speaks to the call device 13, the call device 13 collects the user's voice data and sends it to the target device 12 through the call network. The target device 12 transmits the received voice data to the electronic device 11. In this case, the received voice data is also the first voice data.

[0066] In some implementations, the first language and the second language described later may be different dialects of the same language, or may be different languages. For example, the first language and the second language may both be Chinese, the first language may be Mandarin, and the second language may be Cantonese. Alternatively, the first language may be Chinese, and the second language may be English. This application does not limit this.

[0067] Among them, the first language and the second language are only used to distinguish different languages, but not to limit the types of languages. For example, in a call, when the first voice data is the voice data of the local user collected by the electronic device through the voice collection device, the language spoken by the local user is the first language (such as Chinese). The language spoken by the calling user (that is, the user talking to the local user) is the second language (such as English). In this call, when the first voice data received from the target device is the voice data of the calling user received from the target device, the language spoken by the calling user is the first language (such as English), and the language spoken by the local user is the second language (such as Chinese).

[0068] S302: When it is determined to translate the first voice data, the first voice data is translated to obtain second voice data, where the second voice data is described in a second language.

[0069] In some embodiments, reference Figures 3 to 8 A schematic diagram of the structure of an electronic device is shown.

[0070] When determining whether to translate the first voice data, the current execution mode may be determined according to the state of the switching module in the electronic device. As an example, the execution mode may include an original voice mode and an interpretation mode.

[0071] For example, when the switching module is a switch, when the switch is turned to the first gear, the current execution mode is determined to be the original sound mode; when the switch is turned to the second gear, the current execution mode is determined to be the interpretation mode. When the switching module is an indicator, the indicator position 0 determines that the current execution mode is the original sound mode; the indicator position 1 determines that the current execution mode is the interpretation mode.

[0072] When the execution mode is determined to be the interpretation mode, the first voice data is determined to be translated. When the execution mode is determined to be the original sound mode, the first voice data can be directly played or sent to the target device.

[0073] Among them, whether to play the first voice data or send the first voice data to the target device can be determined according to the source of the first language data. For example, when the first voice data is collected by the electronic device, the first voice data can be sent to the target device; when the first voice data comes from the call device (received from the target device), the first voice data can be played directly.

[0074] In some implementations, when the first voice data is collected by an electronic device, Figure 3 and Figure 4 The electronic device shown in the figure translates the first voice data to obtain the second voice data, including: encoding the first voice data according to the second encoding protocol through the processor of the electronic device to obtain the third voice data encoded according to the second encoding protocol. Translating the third voice data to obtain the fourth voice data. Encoding the fourth voice data according to the first encoding protocol to obtain the second voice data.

[0075] Among them, the first encoding protocol can be a public protocol, the second encoding protocol can be a private protocol, and the second encoding protocol can be determined according to the needs of actual application, and this application does not impose any restrictions on this.

[0076] In some implementations, encoding the fourth voice data according to the first encoding protocol to obtain the second voice data includes: for Figure 3 The electronic device shown in can encode the fourth voice data through the processor of the electronic device to obtain the second voice data.

[0077] or, for Figure 4 The electronic device shown in the figure can encode the fourth voice data through the first encoder to obtain the second voice data, and the first encoder is used to encode the unencoded voice data according to the first encoding protocol.

[0078] In some implementations, when the first voice data is collected by an electronic device, Figure 5The electronic device shown in the figure translates the first voice data to obtain the second voice data, including: encoding the first voice data by a first encoder to obtain fifth voice data, and the first encoder is used to encode the unencoded voice data according to the first encoding protocol. The first encoding protocol corresponding to the fifth voice data is identified by the processor of the electronic device. The fifth voice data is re-encoded according to the first encoding protocol and the second encoding protocol to obtain the third voice data encoded according to the second encoding protocol. The third voice data is translated to obtain the fourth voice data. The fourth voice data is encoded according to the first encoding protocol to obtain the second voice data.

[0079] In some implementations, the first coding protocol corresponding to the fifth voice data is identified by a processor of the electronic device. The identification can be performed by a preprocessor. For example, the first coding protocol corresponding to the fifth voice data can be identified by a preprocessor. Then, the fifth voice data is decoded according to the first coding protocol. Finally, the decoded fifth voice data is re-encoded according to the second coding protocol to obtain the third voice data. Among them, the preprocessor can be a physical device, or it can also be a virtual device implemented by the processor 23.

[0080] In some implementations, encoding the fourth voice data according to the first coding protocol to obtain the second voice data can be implemented by a post-processor. For example, the fourth voice data can be sent to a post-processor, and the post-processor encodes the fourth voice data according to the first coding protocol to obtain the second voice data. The post-processor can be a physical device, or it can also be a virtual device implemented by the processor 23.

[0081] By identifying the first coding protocol corresponding to the fifth voice data, and re-encoding the fifth voice data according to the first coding protocol and the second coding protocol, the third voice data encoded according to the second coding protocol is obtained. The method provided in the present application can be adapted to a variety of different communication protocols and expand more application scenarios.

[0082] In some implementations, the first voice data is from a call device. Figure 6 , Figure 7 and Figure 8 The electronic device shown translates the first voice data to obtain the second voice data, including: identifying the first encoding protocol corresponding to the first voice data through the processor of the electronic device. Re-encoding the first voice data according to the first encoding protocol and the second encoding protocol to obtain the third voice data encoded according to the second encoding protocol. Translating the third voice data to obtain the fourth voice data.

[0083] Among them, for Figure 6The electronic device shown can use the fourth voice data as the second voice data. Figure 7 and Figure 8 An electronic device is shown, which can obtain second voice data according to fourth voice data.

[0084] In some embodiments, for Figure 7 and Figure 8 The electronic device is shown, and the processor of the electronic device can encode the fourth voice data according to the first coding protocol to obtain the sixth voice data. The sixth voice data is decoded by the first decoder to obtain the second voice data, and the first decoder is used to decode the voice data encoded using the first coding protocol.

[0085] In some implementations, the first coding protocol corresponding to the sixth voice data is identified by a processor of the electronic device. The identification can be performed by a preprocessor. For example, the first coding protocol corresponding to the sixth voice data can be identified by a preprocessor. Then, the sixth voice data is decoded according to the first coding protocol. Finally, the decoded sixth voice data is re-encoded according to the second coding protocol to obtain the third voice data. Among them, the preprocessor can be a physical device, or it can also be a virtual device implemented by the processor 23.

[0086] In some implementations, encoding the fourth voice data according to the first encoding protocol to obtain the second voice data can be implemented by a post-processor, and the implementation method is similar to that in the above example, which will not be described in detail here.

[0087] In some implementations, the translation processing of the third voice data to obtain the fourth voice data can be performed locally or on a service device.

[0088] In some implementations, the third voice data may be translated locally to obtain fourth voice data.

[0089] For example, speech recognition can be performed on the third speech data to obtain the corresponding first text data. The first text data is translated to obtain second text data described in a second language. Speech synthesis is performed based on the second text data to obtain fourth speech data. As an example, speech recognition can be implemented by automatic speech recognition (Automatic Speech Recognition, ASR). The ASR algorithm may include a hidden Markov model (HMM) or dynamic time warping (DTW) using traditional statistical techniques. The ASR algorithm may also include a deep learning algorithm, such as a neural network model.

[0090] As an example, to translate a text, one may input the text into a pre-trained translation model, upload the text to a large language model that provides an interface, etc.

[0091] For example, the code with speech recognition and translation functions may be stored in a storage medium, and the corresponding code may be run by the processor 23 to implement the speech recognition and translation functions locally.

[0092] In some other examples, language synthesis can use Text To Speech (TTS) technology. TTS can be implemented by hardware or software, and the specific implementation method of TTS can be selected according to application requirements. For example, when processing locally, it can be implemented by hardware, and when processing on a service device, it can be implemented by software.

[0093] In some other implementations, in addition to translating according to the third voice data, text, video, picture or control instruction etc. may be generated according to the third voice data through a corresponding algorithm.

[0094] In some implementations, speech synthesis is performed based on the second text data to obtain the fourth speech data. Speech synthesis can be performed locally based on the second text data to obtain unencoded speech data for describing the second text, namely, the fourth speech data.

[0095] In some implementations, when the third voice data is translated locally and the pre-processor and the post-processor are independent physical devices, Figures 3 to 8 The system actually includes three processors 23, one processor 23 is a pre-processor, another processor 23 is a post-processor, and another processor 23 is used to implement functions such as speech recognition and translation.

[0096] In some implementations, when the pre-processor and the post-processor are virtual devices implemented by the processor 23, Figures 3 to 8 The system may include only one processor 23, which may implement the functions of a pre-processor, a post-processor, and functions such as speech recognition and translation.

[0097] In some other implementations, the third voice data may be translated and processed on the service device to obtain the second voice data.

[0098] In some implementations, the service device may be a cloud server (referred to as: cloud). For example, a processing request may be sent to the service device based on the third voice data and the processing instruction, and the processing instruction is used to instruct the service device to convert the third voice data into voice data described in the second language.

[0099] In some embodiments, the electronic device may include a wireless communication module, such as a wifi module, a bluetooth module, etc. The electronic device may be connected to the Internet via a wireless communication module (such as a wifi module), and send a processing request to the cloud via the Internet. Alternatively, the electronic device may be connected to a target device via a bluetooth module, send a processing request to the target device via the bluetooth module, and send the processing request to the cloud via the target device.

[0100] In this case, the target device may be installed with an application program that matches the electronic device. The application program may call the wireless communication module of the target device and pair with the electronic device to implement functions such as making calls through the electronic device and configuring the electronic device.

[0101] In some other implementations, the service device may also be a local area network server, a Bluetooth server, a wifi server, etc. In these cases, the example of the cloud can be referred to, and the electronic device can directly communicate with the service device through the wireless communication module to send a processing request. Alternatively, it can also communicate with the target device through the wireless communication module, and send the processing request to the service device through the target device.

[0102] Fig.10 A flow chart of another method for processing speech data provided in the present application is shown. Figure 8 The voice data processing method shown in the figure can be applied to the service device.

[0103] In some embodiments, Fig.10 As shown, the following voice data processing method can be executed on the service device to translate the first voice data to obtain the second voice data: S401: Receive a processing request from an electronic device.

[0104] The processing request includes a processing instruction and third voice data. The third voice data is obtained by re-encoding the first voice data according to the second encoding protocol. The first voice data is described in the first language. The processing instruction is used to instruct the service device to convert the third voice data into voice data described in the second language.

[0105] In some implementations, the processing request received from the electronic device in S401 is the processing request sent by the electronic device in S302.

[0106] S402: Process the third voice data according to the processing instruction to obtain fourth voice data, where the fourth voice data is described in a second language.

[0107] In some implementations, the service device may perform speech recognition on the third speech data to obtain corresponding first text data. The first text data may be translated to obtain second text data described in a second language. Speech synthesis may be performed based on the second text data to obtain fourth speech data. The implementation method is similar to the local implementation and will not be described in detail here.

[0108] S403: Send the fourth voice data to the electronic device.

[0109] In some implementations, after receiving the fourth voice data, the electronic device may encode the fourth voice data according to the first encoding protocol through a processor to obtain the second voice data, or may directly play the fourth voice data as the second voice data.

[0110] S303: If the first voice data is collected by the electronic device, the second voice data is sent to the target device, and the target device is instructed to send the second voice data as call data to the call device.

[0111] S304: If the first voice data is from a call device, play the second voice data through the electronic device.

[0112] In some implementations, when the first voice data is received from the target device (ie, from call merging), it indicates that the first voice data needs to be played on the electronic device, ie, S303 is executed.

[0113] In some implementations, when the first voice data is collected by the electronic device through the electronic device, it indicates that the first voice data needs to be sent to the target device, and S304 is executed.

[0114] In some other implementations, in S302, when it is determined that the first voice data is not to be translated, if the first voice data is collected by an electronic device, the first voice data is sent to a target device, and the target device sends the first voice data as call data to the call device. If the first voice data is from the call device, the first voice data is played by the electronic device.

[0115] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A method for processing voice data, applied to electronic equipment, characterized in that: The electronic device is communicatively connected with a target device, the target device communicates with a calling device, and the method includes: Acquire first voice data, where the first voice data is call voice data described in a first language; When it is determined to translate the first voice data, the first voice data is translated to obtain second voice data, where the second voice data is described in a second language; If the first voice data is collected by the electronic device, sending the second voice data to the target device, instructing the target device to send the second voice data as call data to the call device; If the first voice data is from the communication device, the second voice data is played through the electronic device.

2. The method according to claim 1, characterized in that The determining to translate the first voice data includes: Determine the current execution mode according to the state of the switching module in the electronic device, wherein the execution mode includes an original sound mode and an interpretation mode; When the state of the switching module indicates that the current execution mode is the interpretation mode, it is determined to translate the first voice data.

3. The method according to claim 2, characterized in that The first voice data is collected by the electronic device, the first voice data is uncoded voice data collected by a voice collection device, and the second voice data is voice data encoded by a first coding protocol; The translating the first voice data to obtain the second voice data includes: encoding the first voice data according to a second encoding protocol by a processor of the electronic device to obtain third voice data encoded according to the second encoding protocol; Translating the third voice data to obtain fourth voice data; The fourth voice data is encoded according to a first encoding protocol to obtain the second voice data.

4. The method according to claim 3, characterized in that: The step of encoding the fourth voice data according to the first encoding protocol to obtain the second voice data includes: encoding the fourth voice data by a processor of the electronic device to obtain second voice data; or, The fourth voice data is encoded by a first encoder to obtain the second voice data, and the first encoder is used to encode the unencoded voice data according to a first encoding protocol.

5. The method according to claim 2, characterized in that: The first voice data is collected by the electronic device, the first voice data is uncoded voice data collected by a voice collection device, and the second voice data is voice data encoded by a first coding protocol; The translating the first voice data to obtain the second voice data includes: encoding the first voice data by a first encoder to obtain fifth voice data, wherein the first encoder is used to encode unencoded voice data according to a first encoding protocol; identifying, by a processor of the electronic device, a first encoding protocol corresponding to the fifth voice data; re-encode the fifth voice data according to the first encoding protocol and the second encoding protocol to obtain third voice data encoded according to the second encoding protocol; Translating the third voice data to obtain fourth voice data; The fourth voice data is encoded according to a first encoding protocol to obtain the second voice data.

6. The method according to claim 2, characterized in that The first voice data is from the call device, the first voice data is voice data encoded by a first encoding protocol, and the second voice data is unencoded voice data collected by a voice collection device; The translating the first voice data to obtain the second voice data includes: identifying, by a processor of the electronic device, a first encoding protocol corresponding to the first voice data; Re-encode the first voice data according to the first encoding protocol and the second encoding protocol to obtain third voice data encoded according to the second encoding protocol; Translating the third voice data to obtain fourth voice data; Obtain the second voice data according to the fourth voice data; or, The fourth voice data is used as the second voice data.

7. The method according to claim 6, characterized in that The obtaining the second voice data according to the fourth voice data includes: encoding the fourth voice data according to a first encoding protocol by a processor of the electronic device to obtain sixth voice data; The sixth voice data is decoded by a first decoder to obtain the second voice data, and the first decoder is used to decode the voice data encoded by using a first encoding protocol.

8. The method according to any one of claims 3 to 7, characterized in that: The translating the third voice data to obtain fourth voice data includes: locally translating the third voice data to obtain fourth voice data; Or, according to the third voice data and the processing instruction, a processing request is sent to the service device, wherein the processing instruction is used to instruct the service device to convert the third voice data into voice data described in a second language.

9. The method according to claim 8, characterized in that The locally translating the third voice data to obtain fourth voice data includes: Performing speech recognition on the third speech data to obtain corresponding first text data; Translating the first text data to obtain second text data described in a second language; Speech synthesis is performed according to the second text data to obtain the fourth speech data.

10. The method according to claim 8, characterized in that After sending a processing request to a service device according to the third voice data and the processing instruction, the method includes: Fourth voice data is received from the service device, where the fourth voice data is obtained by the service device through processing based on the third voice data.

11. The method according to claim 1, characterized in that: The method further comprises: When it is determined not to translate the first voice data, if the first voice data is collected by the electronic device, sending the first voice data to a target device, and the target device sending the first voice data as call data to the call device; If the first voice data comes from the communication device, the first voice data is played through the electronic device.

12. A method for processing voice data, applied to a service device, characterized in that: include: receiving a processing request from an electronic device, the processing request including a processing instruction and third voice data, the third voice data being obtained by re-encoding the first voice data according to a second encoding protocol, the first voice data being described in a first language, and the processing instruction being used to instruct the service device to convert the third voice data into voice data described in a second language; Processing the third voice data according to the processing instruction to obtain fourth voice data, wherein the fourth voice data is described in a second language; The fourth voice data is sent to the electronic device.

13. The method according to claim 12, characterized in that The processing of the third voice data according to the processing instruction to obtain fourth voice data includes: Performing speech recognition on the third speech data to obtain corresponding first text data; Translating the first text data to obtain second text data described in a second language; Speech synthesis is performed according to the second text data to obtain the fourth speech data.

14. An electronic device, characterized in that: include: A voice collection device, a playback device, a first encoder, a first decoder, a switching module, a translation component and a data interface, wherein the data interface is used to connect the electronic device to a target device for communication; The voice collection device is connected to the data interface via the first encoder, and the switching module is arranged between the voice collection device and the first encoder or between the first encoder and the data interface; When the switching module is provided between the voice collection device and the first encoder, one end of the translation component is connected to the switching module, and the other end is connected to the first encoder or the data interface; When the switching module is disposed between the first encoder and the data interface, one end of the translation component is connected to the switching module and the other end is connected to the data interface; The playback device is connected to the data interface via the first decoder, and the switching module is arranged between the playback device and the first decoder or between the first decoder and the data interface; When the switching module is disposed between the playback device and the first decoder, one end of the translation component is connected to the switching module, and the other end is connected to the playback device; When the switching module is disposed between the first decoder and the data interface, one end of the translation component is connected to the switching module, and the other end is connected to the first decoder or the playback device; The translation component includes at least one processor and a storage medium connected to the processor, wherein the at least one processor is in communication connection with the storage medium, and the storage medium stores at least one instruction set, wherein the at least one processor reads the at least one instruction set when running, and executes the method for processing speech data according to any one of claims 1 to 11 according to the instructions of the at least one instruction set.

15. A service device, characterized in that: include: At least one storage medium storing at least one instruction set for processing voice data; as well as At least one processor is communicatively connected to the at least one storage medium, wherein the at least one processor reads the at least one instruction set when running, and executes the voice data processing method described in claim 12 or 13 according to the instructions of the at least one instruction set.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction set, and when the at least one instruction set is executed by at least one processor, the method for processing speech data according to any one of claims 1-11 or claims 12-13 is implemented.

17. A chip system, the chip system is applied to electronic equipment, characterized in that: The chip system includes: At least one processor, at least one data interface, a storage medium, a decoder, and an encoder, wherein the processor, the data interface, the storage medium, the decoder, and the encoder are interconnected via a circuit; The storage medium stores a computer program, and when the computer program is executed by the processor, the method for processing speech data according to any one of claims 1 to 11 is implemented.

18. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is executed, the method for processing speech data according to any one of claims 1 to 11 or claims 12 to 13 is implemented.