Communication method and device, electronic equipment and storage medium
By acquiring and translating audio data in electronic devices and transmitting it directly to the target module, the cumbersome operation problem caused by the involvement of third-party software and hardware in online calls is solved, realizing real-time simultaneous interpretation between the communicating parties and improving communication efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2024-10-15
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, simultaneous interpretation during online calls requires the participation of third-party software and hardware, resulting in long audio data transmission links and cumbersome operations, increasing user costs and affecting the user experience.
By acquiring the first audio data and translating it into the second language online or locally, the audio data is directly transmitted to the target module without the need for third-party software or hardware, enabling two-way real-time simultaneous interpretation between the communicating parties.
It simplifies the audio data transmission link, improves communication efficiency and enhances user experience, and provides flexible translation modes.
Smart Images

Figure CN121884776A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a communication method, apparatus, electronic device and storage medium. Background Technology
[0002] With the continuous development of information and communication technology, online communication scenarios across borders and languages are becoming increasingly common, and users' demand for online simultaneous interpretation is also growing daily. In order to achieve simultaneous interpretation during online calls, both parties usually need the participation of third-party software and hardware to record, transmit, translate, and play the call audio. This results in long audio data transmission links and cumbersome operations, which not only reduces call efficiency but also increases additional costs for users and affects their user experience. Summary of the Invention
[0003] To overcome the problems existing in related technologies, this disclosure provides a communication method, apparatus, electronic device, and storage medium.
[0004] According to a first aspect of the present disclosure, a communication method is provided, the method comprising:
[0005] Acquire first audio data, the first audio data including at least one of first uplink audio data and first downlink audio data of a communication application; wherein the language type of the first audio data is a first language;
[0006] Determine the second audio data; wherein, when the first audio data includes the first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation; when the first audio data includes the first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation; the language type of the second audio data is a second language, and the second language is different from the first language.
[0007] The second audio data is transmitted to the target module; wherein, when the second audio data includes the second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes the second downlink audio data, the target module is used to play the second downlink audio data.
[0008] In one exemplary embodiment, transmitting the second audio data to the target module includes:
[0009] The first audio data and the second audio data are transmitted to the target module. When the first audio data includes the first uplink audio data, the target module is further configured to transmit the first uplink audio data to the uplink data flow path of the communication application. When the first audio data includes the first downlink audio data, the target module is further configured to play the first downlink audio data.
[0010] In an exemplary embodiment, when the first audio data includes the first uplink audio data, determining the second audio data and transmitting the first audio data and the second audio data to the target module includes:
[0011] The second uplink audio data is determined through the first uplink path and transmitted to the target module.
[0012] The first uplink audio data is transmitted to the target module via the second uplink path;
[0013] The first uplink path and the second uplink path run in parallel.
[0014] In an exemplary embodiment, determining the second uplink audio data through a first uplink path and transmitting the second uplink audio data to the target module includes:
[0015] The first uplink audio data is processed by the audio processing module to obtain the processed first uplink audio data, and the processed first uplink audio data is transmitted to the first module.
[0016] The first module calls an online translation interface or a local translation interface to translate the processed first uplink audio data into the second uplink audio data, and then transmits the second uplink audio data to the second module.
[0017] The second uplink audio data is transmitted to the target module via the second module.
[0018] In one exemplary embodiment, the method further includes:
[0019] When transmitting the first uplink audio data to the target module via the second uplink path, the first uplink audio data is set to a mute mode.
[0020] In an exemplary embodiment, when the first audio data includes the first downlink audio data, determining the second audio data and transmitting the first audio data and the second audio data to the target module includes:
[0021] The second downlink audio data is determined through the first downlink path and transmitted to the target module.
[0022] The first downlink audio data is transmitted to the target module via the second downlink path;
[0023] The first downlink path and the second downlink path run in parallel.
[0024] In an exemplary embodiment, determining the second downlink audio data through a first downlink path and transmitting the second downlink audio data to the target module includes:
[0025] The first downlink audio data is recorded from the preset module by the third module and transmitted to the online translation service or the local translation service. The preset module is used to receive the first downlink audio data from the downlink data flow path of the communication application.
[0026] The first downlink audio data is translated into the second downlink audio data through an online translation service or a local translation service, and the second downlink audio data is transmitted to the fourth module, which is a data output module of the online translation service or the local translation service.
[0027] The second downlink audio data is transmitted to the audio processing module via the fourth module.
[0028] The audio processing module processes the second downlink audio data and transmits the processed second downlink audio data to the target module.
[0029] In one exemplary embodiment, the method further includes:
[0030] When transmitting the first downlink audio data to the target module via the second downlink path, the first downlink audio data is set to a mute mode.
[0031] In one exemplary embodiment, the method further includes:
[0032] The first downlink path and the second downlink path are separated from the preset module by the separator module.
[0033] According to a second aspect of the present disclosure, a communication device is provided, the device comprising:
[0034] The acquisition unit is configured to acquire first audio data, the first audio data including at least one of first uplink audio data and first downlink audio data of a communication application; wherein the language type of the first audio data is a first language;
[0035] The determining unit is configured to determine second audio data; wherein, when the first audio data includes the first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation; when the first audio data includes the first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation; and the language type of the second audio data is a second language, which is different from the first language.
[0036] A transmission unit is configured to transmit the second audio data to a target module; wherein, when the second audio data includes the second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes the second downlink audio data, the target module is used to play the second downlink audio data.
[0037] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0038] processor;
[0039] Memory used to store processor-executable instructions;
[0040] The processor is configured to perform the method described in the first aspect of the embodiments of this disclosure.
[0041] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in the first aspect of the present disclosure.
[0042] The method described above has the following advantages: acquiring first audio data, determining second audio data, and transmitting the second audio data to the target module; wherein, when the first audio data includes first uplink audio data, the second audio data includes second uplink audio data obtained by translating the first uplink audio data through online or local translation, and the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, so as to send the translated uplink audio data to the communication peer device through the communication application; when the first audio data includes first downlink audio data, the second audio data includes second downlink audio data obtained by translating the first downlink audio data through online or local translation, and the target module is used to play the second downlink audio data, so as to play the translated downlink audio data to the current user. Thus, two-way real-time simultaneous interpretation is realized between the two communicating parties, the audio data transmission link is short and the operation is simple, which can effectively improve communication efficiency and enhance the user experience.
[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0044] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0045] Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment;
[0046] Figure 2 This is a flowchart illustrating a communication method according to an exemplary embodiment;
[0047] Figure 3 This is a flowchart illustrating a communication method according to an exemplary embodiment;
[0048] Figure 4 This is a flowchart illustrating a communication method according to an exemplary embodiment;
[0049] Figure 5 This is a block diagram illustrating a communication device according to an exemplary embodiment;
[0050] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0051] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0052] In the exemplary embodiments of this disclosure, to overcome the problems arising from simultaneous interpretation implemented through third-party software and hardware in related technologies, a communication method is provided, comprising: acquiring first audio data, determining second audio data, and transmitting the second audio data to a target module; wherein the language type of the first audio data is a first language, the language type of the second audio data is a second language, and the second language is different from the first language; when the first audio data includes first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation, and the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application; when the first audio data includes first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation, and the target module is used to play the second downlink audio data. This method does not require the use of third-party software and hardware, and does not need to consider whether the device at the other end of the call has simultaneous interpretation capabilities, thus achieving bidirectional real-time simultaneous interpretation between the communicating parties. The audio data transmission link is short and the operation is simple, which can effectively improve communication efficiency and enhance the user experience.
[0053] The communication method in this disclosure is applied to electronic devices, including smartphones, tablets, smart wearable devices, IoT devices, smart vehicle systems, and other devices with communication functions.
[0054] In an exemplary embodiment of this disclosure, a communication method is provided. Figure 1 This is a flowchart illustrating a communication method according to an exemplary embodiment, such as... Figure 1 As shown, the process includes the following steps S101-S103:
[0055] Step S101: Obtain first audio data. The first audio data includes at least one of first uplink audio data and first downlink audio data of the communication application, wherein the language type of the first audio data is a first language.
[0056] Electronic devices communicate with other electronic devices through a communication application. The communication application can be any application with communication functions, such as a communication application that comes with the operating system or a third-party communication application installed by the user. The communication method can be any online communication method, such as network communication or satellite communication. This embodiment does not limit the communication application and communication method.
[0057] The uplink audio data of a communication application represents the audio data that the application wants to send to another electronic device that it is communicating with. When acquiring the first uplink audio data, the user's voice is acquired by any sound acquisition device in the electronic device, such as a microphone or a device that receives audio data input from headphones. The downlink audio data of a communication application represents the audio data received by the application from another electronic device that it is communicating with. After receiving the first downlink audio data, the application will output the first downlink audio data through the downlink data flow path. Therefore, the first downlink audio data is acquired from the downlink data flow path of the application.
[0058] The first audio data may include only the first uplink audio data, only the first downlink audio data, or both, depending on the actual communication situation. The language type of the first audio data is the first language, which represents the unprocessed language, such as the language spoken by the current user or the language received through the communication application. The first language can be a standard language, such as Chinese or English, or a dialect, such as Minnan or Cantonese. The first language is determined based on the actual communication situation. It can be automatically identified from the first audio data by the electronic device based on a preset speech recognition algorithm, or it can be pre-set by the current user according to the user on the other end of the call, for example, through the call language settings control in the communication application.
[0059] Step S102: Determine the second audio data; wherein, when the first audio data includes the first uplink audio data, the second audio data includes the second uplink audio data obtained by translating the first uplink audio data through online translation or local translation; when the first audio data includes the first downlink audio data, the second audio data includes the second downlink audio data obtained by translating the first downlink audio data through online translation or local translation; the language type of the second audio data is a second language, which is different from the first language.
[0060] The second audio data is the audio data that the user expects to hear or the audio data that the user expects to send to the communication peer device. The language type of the second audio data is different from that of the first audio data. The language type of the second audio data is a second language, which can be a standard language or a dialect. The second language differs from the first language, either in language or dialect. The second language can be set by the user, for example, through the language settings controls in the communication application. This can be preset before communication begins or set during communication based on the actual communication situation. Alternatively, the second language can be set by the electronic device according to preset translation rules. For example, the second language may be set to the user's preferred language by default, or to the same language as the audio data collected from the user. Online translation means that the electronic device performs online translation by calling a translation server through a translation interface. Local translation means that the electronic device performs translation by calling a local translation service through a translation interface, without requiring the electronic device to connect to the network. After obtaining the first audio data, if the first audio data includes first uplink audio data, and the first uplink audio data is translated into second uplink audio data in a second language through online translation or local translation, then the second audio data includes second uplink audio data; if the first audio data includes first downlink audio data, and the first downlink audio data is translated into second downlink audio data in a second language through online translation or local translation, then the second audio data includes second downlink audio data.
[0061] Step S103: Transmit the second audio data to the target module; wherein, when the second audio data includes second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes second downlink audio data, the target module is used to play the second downlink audio data.
[0062] If the second audio data includes second uplink audio data, then the second uplink audio data needs to be transmitted to the uplink data path of the communication application so that the communication application can send the second uplink audio data, translated from the first uplink audio data, to the communication peer device. If the second audio data includes second downlink audio data, then the second downlink audio data needs to be played so that the second downlink audio data, translated from the first downlink audio data, can be played to the current user. The second downlink audio data can be played through any audio playback device in the electronic device, such as a speaker or a device that outputs audio data to headphones. The target module can be any program capable of implementing the above functions. The target module for transmitting the second uplink audio data to the uplink data path of the communication application and the target module for playing the second downlink audio data can be the same module or different modules.
[0063] In some implementations, only the second audio data is transmitted to the target module. This avoids interference from the first audio data with the second audio data, ensuring that the second audio data is clearer and smoother.
[0064] In some implementations, the first audio data and the second audio data are transmitted to the target module. When the first audio data includes first uplink audio data, the target module is further configured to transmit the first uplink audio data to the uplink data flow path of the communication application; when the first audio data includes first downlink audio data, the target module is further configured to play the first downlink audio data. The first and second audio data can be transmitted to the target module in parallel, or they can be transmitted serially to the target module. Transmitting the first audio data to the target module as well can avoid translation errors that could affect the user's communication experience.
[0065] In the exemplary embodiments of this disclosure, after acquiring first audio data in a first language, the first audio data is translated into second audio data in a second language through online or local translation. The second audio data is then transmitted to the target module. When the first audio data includes first uplink audio data, the second audio data includes second uplink audio data obtained by translating the first uplink audio data. The target module transmits the second uplink audio data to the uplink data flow path of the communication application, so that the communication application can send the second uplink audio data to the communication peer device. When the first audio data includes first downlink audio data, the second audio data includes second downlink audio data obtained by translating the first downlink audio data. The target module plays the second downlink audio data to the current user. Therefore, without using third-party hardware or software, and without considering whether the peer device has simultaneous interpretation capabilities, two-way real-time simultaneous interpretation can be achieved based on the electronic device's own audio components. The audio data transmission link is short and simple to operate, effectively improving communication efficiency. Furthermore, translation through online or local translation provides users with diverse translation modes, thereby enhancing the user experience.
[0066] In an exemplary embodiment of this disclosure, a communication method is provided. Figure 2 This is a flowchart illustrating a communication method according to an exemplary embodiment, such as... Figure 2 As shown, the process includes the following steps S201-S203:
[0067] Step S201: Obtain first audio data, which includes first uplink audio data, wherein the language type of the first uplink audio data is a first language.
[0068] In some implementations, the first uplink audio data is acquired by any sound acquisition device in the electronic device, such as a microphone or a device for receiving audio data input from headphones.
[0069] For a detailed implementation of step S201, please refer to step S101, which will not be repeated here.
[0070] Step S202: Determine the second uplink audio data through the first uplink path and transmit the second uplink audio data to the target module; wherein, the language type of the second uplink audio data is a second language, which is different from the first language, and the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application.
[0071] The specific implementation of step S202 is described in steps S101 and S102, and will not be repeated here.
[0072] In some implementations, the first uplink path includes an audio processing module, a first module, and a second module. The second uplink audio data is determined through the following steps, and the second uplink audio data is transmitted to the target module:
[0073] S1-1, The first uplink audio data is processed by the audio processing module to obtain the processed first uplink audio data, and the processed first uplink audio data is transmitted to the first module.
[0074] The audio processing module includes preset audio processing algorithms, which can be any algorithm chosen based on specific needs, such as noise reduction or sound effect optimization. Performing audio processing before translation improves the clarity of the initial uplink audio data, ensuring the accuracy of the translation results.
[0075] S1-2, the first module calls the online translation interface or the local translation interface to translate the processed first uplink audio data into second uplink audio data, and then transmits the second uplink audio data to the second module;
[0076] After the processed first uplink audio data is translated into second uplink audio data, the translation result will be output to the second module by the online translation server or local translation. The second module is used to connect to the target module.
[0077] S1-3, the second uplink audio data is transmitted to the target module through the second module.
[0078] Step S203: The first uplink audio data is transmitted to the target module through the second uplink path; wherein, the target module is used to transmit the first uplink audio data to the uplink data transmission path of the communication application, and the first uplink path and the second uplink path run in parallel.
[0079] The uplink path is used to transmit uplink audio data for communication applications. The uplink path includes a first uplink path and a second uplink path, which operate in parallel and independently. After acquiring the first uplink audio data, it is output to both the first and second uplink paths. The first uplink path translates the first uplink audio data into second uplink audio data by calling an online or local translation interface, and then transmits the second uplink audio data to the target module. The second uplink path transmits the first uplink audio data to the target module. Both the first and second uplink paths are either preset communication links with the aforementioned functions.
[0080] In some embodiments, when transmitting the first uplink audio data to the target module via the second uplink path, the first uplink audio data is set to a mute mode. Mute mode means adjusting the volume of the audio data to below a preset threshold, which is a small value, such as adjusting the volume to 0. The first uplink audio data can be set to mute mode according to user instructions, or it can be set to mute mode by default according to preset communication rules. This achieves the function of masking the untranslated first uplink audio data, avoiding interference with the translated second uplink audio data, ensuring the clarity and fluency of the translated second uplink audio data, and allowing the user to control whether to set the first uplink audio data to mute mode in real time, providing users with flexible and diverse translation methods. Furthermore, implementing the masking function of the first uplink audio data by setting it to mute mode is simpler than closing or deleting the second uplink path, and ensures that it does not conflict with ordinary communication functions (i.e., communication functions that do not require translation).
[0081] In the exemplary embodiments of this disclosure, by processing the first uplink audio data and the second uplink audio data in parallel through the first uplink path and the second uplink path respectively, mutual interference between the first uplink data and the second uplink data can be avoided, ensuring the clarity of the audio data.
[0082] In an exemplary embodiment of this disclosure, a communication method is provided. Figure 3 This is a flowchart illustrating a communication method according to an exemplary embodiment, such as... Figure 3 As shown, the process includes the following steps S301-S303:
[0083] Step S301: Obtain first audio data, which includes first downlink audio data, wherein the language type of the first downlink audio data is a first language.
[0084] In some implementations, first downlink audio data is obtained from the downlink data path of a communication application, the downlink data path of the communication application being used to output the first downlink audio data.
[0085] In some implementations, first downlink audio data is received from the downlink data flow path of a communication application via a preset module.
[0086] For a detailed implementation of step S301, please refer to step S101, which will not be repeated here.
[0087] Step S302: Determine the second downlink audio data through the first downlink path and transmit the second downlink audio data to the target module; wherein, the language type of the second downlink audio data is a second language, which is different from the first language, and the target module is used to play the second downlink audio data.
[0088] For the specific implementation of step S302, please refer to steps S101 and S102, which will not be repeated here.
[0089] In some implementations, the first downlink path includes a third module, a fourth module, and an audio processing module. The second downlink audio data is determined through the following steps, and the second downlink audio data is transmitted to the target module:
[0090] S2-1, the first downlink audio data is recorded from the preset module through the third module and transmitted to the online translation service or the local translation service. The preset module is used to receive the first downlink audio data from the downlink data flow path of the communication application.
[0091] The third module is the data input module for online or local translation services. After obtaining the first line of audio data from the preset module, the third module will transmit the first line of audio data to the translation service or local translation service.
[0092] S2-2, the first downlink audio data is translated into the second downlink audio data through an online translation service or a local translation service, and the second downlink audio data is transmitted to the fourth module, which is the data output module of the online translation service or the local translation service;
[0093] S2-3, the second downlink audio data is transmitted to the audio processing module through the fourth module;
[0094] S2-4: The second downlink audio data is processed by the audio processing module, and the processed second downlink audio data is transmitted to the target module.
[0095] The audio processing module includes preset audio processing algorithms, which can be any algorithm chosen based on specific needs, such as noise reduction or sound effect optimization. Performing audio processing before playback improves the clarity of the second-line audio data.
[0096] Step S303: The first downlink audio data is transmitted to the target module through the second downlink path; wherein the target module is used to play the first downlink audio data, and the first downlink path and the second downlink path run in parallel.
[0097] The downlink path is used to transmit downlink audio data for communication applications. The downlink path includes a first downlink path and a second downlink path, which operate in parallel and independently. After acquiring the first downlink audio data, it is transmitted to both the first and second downlink paths. The first downlink path translates the first downlink audio data into second downlink audio data by calling an online or local translation interface and transmits the second downlink audio data to the target module. The second downlink path transmits the first downlink audio data to the target module. Both the first and second downlink paths are preset communication links with the aforementioned functions. In some embodiments, a splitter module separates the first and second downlink paths from the preset module.
[0098] In some embodiments, when transmitting the first downlink audio data to the target module via the second downlink path, the first downlink audio data is set to a mute mode. Mute mode means adjusting the volume of the audio data to below a preset threshold, which is a small value, such as adjusting the volume to 0. The first downlink audio data can be set to mute mode according to user instructions, or it can be set to mute mode by default according to preset communication rules. This achieves the function of masking the untranslated first downlink audio data, avoiding interference with the translated second downlink audio data, ensuring the clarity and fluency of the translated second downlink audio data, and allowing the user to control whether to set the first downlink audio data to mute mode in real time, providing users with flexible and diverse translation methods. Furthermore, implementing the masking function of the first downlink audio data by setting it to mute mode is simpler than closing or deleting the second downlink path, and it ensures that it does not conflict with ordinary communication functions (i.e., communication functions that do not require translation).
[0099] In the exemplary embodiments of this disclosure, by processing the first downlink audio data and the second downlink audio data in parallel through the first downlink path and the second downlink path respectively, mutual interference between the first downlink data and the second downlink data can be avoided, ensuring the clarity of the audio data.
[0100] In an exemplary embodiment of this disclosure, if the first audio data includes first uplink data and first downlink data, a communication method is provided, including the above steps S201-S203 and S301-S303. Specific implementation details will not be repeated.
[0101] In an exemplary embodiment of this disclosure, a communication method is provided, applied to an electronic device. The electronic device includes an application process (AP) chip and a baseband process (BP) chip. The application process chip is used to implement functions related to processing communication applications and functions related to online translation interfaces, while the baseband process chip is used to implement all other functions in this embodiment. Taking an audio digital signal processor (ADSP) architecture as an example... Figure 4 This is a flowchart illustrating a communication method according to an exemplary embodiment, such as... Figure 4 As shown, this includes the transmission process of uplink audio data and the transmission process of downlink audio data.
[0102] The transmission process of uplink audio data includes:
[0103] The device_tx module collects the first uplink audio data and transmits the first uplink audio data to the first uplink path and the second uplink path respectively.
[0104] In the first uplink path: the devicePP module processes the first uplink audio data to obtain processed first uplink audio data, and transmits the processed first uplink audio data to the stream_tx module of the online translation interface; the stream_tx module calls the online translation interface to translate the processed first uplink audio data into second uplink audio data, and outputs the second uplink audio data to the incall_music module; the incall_music module transmits the second uplink audio data to the stream_tx module of the communication application.
[0105] In the second uplink path: the devicePP module performs audio processing on the first uplink audio data to obtain the processed first uplink audio data; the processed first uplink audio data is then transmitted to the stream_tx module of the communication application;
[0106] The second uplink audio data and the processed first uplink audio data are transmitted to the uplink data stream path of the communication application through the stream_tx module.
[0107] The transmission process of downlink audio data includes:
[0108] The first downlink audio data is obtained from the downlink data stream path of the communication application through the stream_rx module, and the first downlink audio data is transmitted to the second downlink path; at the same time, the first downlink path is separated by the splitter module in the stream_rx module of the communication application.
[0109] In the second downlink path: the devicePP module performs audio processing on the first downlink audio data to obtain the processed first downlink audio data; the processed first downlink audio data is then transmitted to the device_rx module.
[0110] In the first downlink path: the first downlink audio data is recorded from the stream_rx module of the communication application through the data input module (i.e., the incall_record module) of the online translation service, and the first downlink audio data is transmitted to the online translation service; the first downlink audio data is translated into second downlink audio data through the online translation service, and the second downlink audio data is transmitted to the data output module (i.e., the stream_rx module) of the online translation service; the second downlink audio data is transmitted to the devicePP module through the stream_rx module of the online translation service; the second downlink audio data is processed by the devicePP module to obtain processed second downlink audio data; the processed second downlink audio data is transmitted to the device_rx module.
[0111] The processed first and second downlink audio data are played using the device_rx module.
[0112] In some implementations, a `mute` parameter is added to the `devicePP` module of the second uplink path. If it is necessary to mute the first uplink audio data, the `mute` parameter is set to `true`; otherwise, it is set to `false`. Similarly, a `mute` parameter is added to the `devicePP` module of the second downlink path. If it is necessary to mute the first downlink audio data, the `mute` parameter is set to `true`; otherwise, it is set to `false`. Specifically, when the `mute` parameter is `true`, the audio data volume is adjusted to 0; when the `mute` parameter is `true`, the audio data volume is not adjusted.
[0113] In an exemplary embodiment of this disclosure, a communication transmission device is provided. Figure 5 This is a block diagram illustrating a communication device according to an exemplary embodiment, such as... Figure 5 As shown, the communication device includes:
[0114] The acquisition unit 501 is configured to acquire first audio data, which includes at least one of first uplink audio data and first downlink audio data of a communication application; wherein the language type of the first audio data is a first language.
[0115] The determining unit 502 is configured to determine second audio data; wherein, when the first audio data includes first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation; when the first audio data includes first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation; and the language type of the second audio data is a second language, which is different from the first language.
[0116] The transmission unit 503 is configured to transmit the second audio data to the target module; wherein, when the second audio data includes second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes second downlink audio data, the target module is used to play the second downlink audio data.
[0117] In one exemplary embodiment, the transmission unit 503 is further configured to:
[0118] The first audio data and the second audio data are transmitted to the target module. When the first audio data includes first uplink audio data, the target module is also used to transmit the first uplink audio data to the uplink data flow path of the communication application. When the first audio data includes first downlink audio data, the target module is also used to play the first downlink audio data.
[0119] In an exemplary embodiment, when the first audio data includes first uplink audio data:
[0120] The determining unit 502 is also configured to determine the second uplink audio data via the first uplink path;
[0121] The transmission unit 503 is also configured to transmit the second uplink audio data to the target module via the first uplink path; and to transmit the first uplink audio data to the target module via the second uplink path.
[0122] The first uplink path and the second uplink path run in parallel.
[0123] In one exemplary embodiment,
[0124] The transmission unit 503 is further configured to perform audio processing on the first uplink audio data through the audio processing module to obtain the processed first uplink audio data, and transmit the processed first uplink audio data to the first module; transmit the second uplink audio data to the second module through the first module; and transmit the second uplink audio data to the target module through the second module.
[0125] The determining unit 502 is also configured to translate the processed first uplink audio data into second uplink audio data by calling the online translation interface or the local translation interface through the first module.
[0126] In one exemplary embodiment, the communication device further includes a processing module 504, configured to:
[0127] When transmitting the first uplink audio data to the target module via the second uplink path, the first uplink audio data is set to mute mode.
[0128] In an exemplary embodiment, when the first audio data includes first downlink audio data:
[0129] The determining unit 502 is also configured to determine the second downlink audio data via the first downlink path;
[0130] The transmission unit 503 is also configured to transmit the second downlink audio data to the target module via the first downlink path; and to transmit the first downlink audio data to the target module via the second downlink path.
[0131] The first downlink path and the second downlink path run in parallel.
[0132] In one exemplary embodiment,
[0133] The transmission unit 503 is further configured to record and obtain first downlink audio data from a preset module via a third module, and transmit the first downlink audio data to an online translation service or a local translation service. The preset module is used to receive the first downlink audio data from the downlink data flow path of the communication application. The second downlink audio data is transmitted to a fourth module via the online translation service or the local translation service. The fourth module is a data output module for the online translation service or the local translation service. The second downlink audio data is transmitted to an audio processing module via the fourth module. The audio processing module processes the second downlink audio data and transmits the processed second downlink audio data to a target module.
[0134] The determining unit 502 is also configured to translate the first downlink audio data into the second downlink audio data via an online translation service or a local translation service.
[0135] In one exemplary embodiment, the processing module 504 is further configured to:
[0136] When transmitting the first downlink audio data to the target module via the second downlink path, the first downlink audio data is set to mute mode.
[0137] In one exemplary embodiment, the processing module 504 is further configured to:
[0138] The first downlink path and the second downlink path are separated from the preset module by the separator module.
[0139] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0140] Figure 6 This is a block diagram illustrating an electronic device 600 according to an exemplary embodiment.
[0141] Reference Figure 6 The electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0142] Processing component 602 typically controls the overall operation of electronic device 600, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 602 may include one or more modules to facilitate interaction between processing component 602 and other components. For example, processing component 602 may include a multimedia module to facilitate interaction between multimedia component 608 and processing component 602.
[0143] Memory 604 is configured to store various types of data to support the operation of electronic device 600. Examples of this data include instructions for any application or method operating on electronic device 600, contact data, phonebook data, messages, pictures, videos, etc. Memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0144] Power supply component 606 provides power to various components of electronic device 600. Power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 600.
[0145] Multimedia component 608 includes a screen that provides an output interface between the electronic device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 608 includes a front-facing camera and / or a rear-facing camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0146] Audio component 610 is configured to output and / or input audio signals. For example, audio component 610 includes a microphone (MIC) configured to receive external audio signals when electronic device 600 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 604 or transmitted via communication component 616. In some embodiments, audio component 610 also includes a speaker for outputting audio signals.
[0147] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0148] Sensor assembly 614 includes one or more sensors for providing state assessments of various aspects of electronic device 600. For example, sensor assembly 614 can detect the on / off state of electronic device 600, the relative positioning of components such as the display and keypad of electronic device 600, changes in position of electronic device 600 or a component of electronic device 600, the presence or absence of user contact with electronic device 600, orientation or acceleration / deceleration of electronic device 600, and temperature changes of electronic device 600. Sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 614 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0149] Communication component 616 is configured to facilitate wired or wireless communication between electronic device 600 and other devices. Electronic device 600 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 616 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0150] In an exemplary embodiment, the electronic device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0151] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, which can be executed by a processor 620 of an electronic device 600 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0152] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform a communication method, including any of the methods described above.
[0153] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0154] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A communication method characterized by comprising: The method includes: Acquire first audio data, the first audio data including at least one of first uplink audio data and first downlink audio data of a communication application; wherein the language type of the first audio data is a first language; Determine the second audio data; wherein, when the first audio data includes the first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation; when the first audio data includes the first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation; the language type of the second audio data is a second language, and the second language is different from the first language. The second audio data is transmitted to the target module; wherein, when the second audio data includes the second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes the second downlink audio data, the target module is used to play the second downlink audio data.
2. The communication method according to claim 1, characterized by, The step of transmitting the second audio data to the target module includes: The first audio data and the second audio data are transmitted to the target module. When the first audio data includes the first uplink audio data, the target module is further configured to transmit the first uplink audio data to the uplink data flow path of the communication application. When the first audio data includes the first downlink audio data, the target module is further configured to play the first downlink audio data.
3. The communication method according to claim 2, wherein, When the first audio data includes the first uplink audio data, determining the second audio data and transmitting the first audio data and the second audio data to the target module includes: The second uplink audio data is determined through the first uplink path and transmitted to the target module. The first uplink audio data is transmitted to the target module via the second uplink path; The first uplink path and the second uplink path run in parallel.
4. The communication method according to claim 3, wherein, The step of determining the second uplink audio data through the first uplink path and transmitting the second uplink audio data to the target module includes: The first uplink audio data is processed by the audio processing module to obtain the processed first uplink audio data, and the processed first uplink audio data is transmitted to the first module. The first module calls an online translation interface or a local translation interface to translate the processed first uplink audio data into the second uplink audio data, and then transmits the second uplink audio data to the second module. The second uplink audio data is transmitted to the target module via the second module.
5. The communication method according to claim 3, characterized in that, The method further includes: When transmitting the first uplink audio data to the target module via the second uplink path, the first uplink audio data is set to a mute mode.
6. The communication method according to claim 2, characterized in that, When the first audio data includes the first downlink audio data, determining the second audio data and transmitting the first audio data and the second audio data to the target module includes: The second downlink audio data is determined through the first downlink path and transmitted to the target module. The first downlink audio data is transmitted to the target module via the second downlink path; The first downlink path and the second downlink path run in parallel.
7. The communication method according to claim 6, characterized in that, The step of determining the second downlink audio data through the first downlink path and transmitting the second downlink audio data to the target module includes: The first downlink audio data is recorded from the preset module by the third module and transmitted to the online translation service or the local translation service. The preset module is used to receive the first downlink audio data from the downlink data flow path of the communication application. The first downlink audio data is translated into the second downlink audio data through an online translation service or a local translation service, and the second downlink audio data is transmitted to the fourth module, which is a data output module of the online translation service or the local translation service. The second downlink audio data is transmitted to the audio processing module via the fourth module. The audio processing module processes the second downlink audio data and transmits the processed second downlink audio data to the target module.
8. The communication method according to claim 6, characterized in that, The method further includes: When transmitting the first downlink audio data to the target module via the second downlink path, the first downlink audio data is set to a mute mode.
9. The communication method according to claim 7, characterized in that, The method further includes: The first downlink path and the second downlink path are separated from the preset module by the separator module.
10. A communication device, characterized in that, The device includes: The acquisition unit is configured to acquire first audio data, the first audio data including at least one of first uplink audio data and first downlink audio data of a communication application; wherein the language type of the first audio data is a first language; The determining unit is configured to determine second audio data; wherein, when the first audio data includes the first uplink audio data, the second audio data includes second uplink audio data obtained by translating based on the first uplink audio data through online translation or local translation; when the first audio data includes the first downlink audio data, the second audio data includes second downlink audio data obtained by translating based on the first downlink audio data through online translation or local translation; and the language type of the second audio data is a second language, which is different from the first language. A transmission unit is configured to transmit the second audio data to a target module; wherein, when the second audio data includes the second uplink audio data, the target module is used to transmit the second uplink audio data to the uplink data flow path of the communication application, and when the second audio data includes the second downlink audio data, the target module is used to play the second downlink audio data.
11. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method as described in any one of claims 1-9.
12. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-9.