CN109582976A - A kind of interpretation method and electronic equipment based on voice communication - Google Patents
A kind of interpretation method and electronic equipment based on voice communication Download PDFInfo
- Publication number
- CN109582976A CN109582976A CN201811198715.7A CN201811198715A CN109582976A CN 109582976 A CN109582976 A CN 109582976A CN 201811198715 A CN201811198715 A CN 201811198715A CN 109582976 A CN109582976 A CN 109582976A
- Authority
- CN
- China
- Prior art keywords
- user
- electronic device
- voice
- translation
- language
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72433—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
- H04M1/72454—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Artificial Intelligence (AREA)
- Environmental & Geological Engineering (AREA)
- Telephone Function (AREA)
Abstract
一种基于语音通话的翻译方法及电子设备,涉及终端技术领域,该方法包括:第一电子设备与第二电子设备建立语音通话连接;当第一电子设备的语音通话翻译功能已开启时,第一电子设备采集第一用户的语音,向翻译服务器上报第一用户的语音,以及接收翻译服务器发送的第一用户的语音的翻译结果,并将第一用户的语音的翻译结果发送给第二电子设备;以及接收第二电子设备发送的第二用户的语音,向翻译服务器上报第二用户的语音,以及接收翻译服务器发送的第二用户的语音的翻译结果,并播报第二用户的语音的翻译结果。因而,这种技术方案有助于提高使用不同语言的用户的沟通效率。
A voice call-based translation method and electronic device relate to the technical field of terminals. The method includes: establishing a voice call connection between a first electronic device and a second electronic device; when the voice call translation function of the first electronic device is enabled, the first electronic device An electronic device collects the voice of the first user, reports the voice of the first user to the translation server, receives the translation result of the voice of the first user sent by the translation server, and sends the translation result of the voice of the first user to the second electronic device equipment; and receive the voice of the second user sent by the second electronic device, report the voice of the second user to the translation server, and receive the translation result of the voice of the second user sent by the translation server, and broadcast the translation of the voice of the second user result. Therefore, this technical solution helps to improve the communication efficiency of users who use different languages.
Description
技术领域technical field
本申请涉及终端技术领域,特别涉及一种基于语音通话的翻译方法及电子设备。The present application relates to the field of terminal technologies, and in particular, to a voice call-based translation method and electronic device.
背景技术Background technique
手机等电子设备的普及使得人与人之间的通信不再受时间和空间的制约,为人们的生活和工作带来了极大的便利。但是,受地域的影响,通信双方可能因语言不同,而导致沟通障碍。The popularization of electronic devices such as mobile phones makes the communication between people no longer restricted by time and space, which brings great convenience to people's life and work. However, due to the influence of the region, the two communicating parties may have different languages, which may lead to communication barriers.
因此,对于如何使得使用不同语言的通信双方通过手机实现无障碍沟通的研究,具有重要的实用价值。Therefore, it has important practical value to study how to make communication between two parties using different languages achieve barrier-free communication through mobile phones.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种基于语音通话的翻译方法及电子设备,有助于提高使用不同语言的用户在使用电子设备进行通信时的沟通效率。Embodiments of the present application provide a voice call-based translation method and electronic device, which help to improve the communication efficiency of users who use different languages when using electronic devices to communicate.
第一方面,本申请实施例提供了一种基于语音通话的翻译方法,所述方法包括:In a first aspect, an embodiment of the present application provides a translation method based on a voice call, the method comprising:
第一电子设备与第二电子设备建立语音通话连接;当所述第一电子设备的语音通话翻译功能已开启时,所述第一电子设备采集第一用户的语音,向翻译服务器上报所述第一用户的语音,以及接收所述翻译服务器发送的所述第一用户的语音的翻译结果,并将所述第一用户的语音的翻译结果发送给所述第二电子设备;以及接收所述第二电子设备发送的第二用户的语音,向所述翻译服务器上报所述第二用户的语音,以及接收所述翻译服务器发送的所述第二用户的语音的翻译结果,并播报所述第二用户的语音的翻译结果。The first electronic device establishes a voice call connection with the second electronic device; when the voice call translation function of the first electronic device is enabled, the first electronic device collects the voice of the first user, and reports the first electronic device to the translation server. a user's voice, and receiving the translation result of the first user's voice sent by the translation server, and sending the translation result of the first user's voice to the second electronic device; and receiving the first user's voice The second user's voice sent by the two electronic devices, report the second user's voice to the translation server, receive the translation result of the second user's voice sent by the translation server, and broadcast the second user's voice A translation of the user's speech.
本申请实施例中由于第一电子设备能够实现对用户通话过程中双端语音的翻译,从而有助于提高使用不同语言的用户的沟通效率。In the embodiment of the present application, since the first electronic device can implement the translation of the double-ended voice during the user's call, it is helpful to improve the communication efficiency of users who use different languages.
在一种可能的设计中,所述第一电子设备与所述翻译服务器通过网络通信,所述第一电子设备当网络信号强度小于或者等于预设阈值时,采集到所述第一用户的语音后,对所述第一用户的语音进行翻译,得到所述第一用户的语音的翻译结果;接收到所述第二用户的语音后,对所述第二用户的语音进行翻译,得到所述第二用户的语音的翻译结果。通过上述技术方案,有助于降低因网络信号变差,导致语音翻译失败的可能性。In a possible design, the first electronic device communicates with the translation server through a network, and when the network signal strength is less than or equal to a preset threshold, the first electronic device collects the voice of the first user Then, translate the voice of the first user to obtain a translation result of the voice of the first user; after receiving the voice of the second user, translate the voice of the second user to obtain the voice of the second user The translation result of the second user's speech. The above technical solution helps to reduce the possibility of speech translation failure due to network signal deterioration.
在一种可能的设计中,所述第一电子设备当所述网络信号强度小于或者等于所述预设阈值时,提示所述第一用户切换网络,或者自动切换到所述第一电子设备进行语音翻译,或者自动切换到网络信号强度大于所述预设阈值的网络上。从而有助于降低因网络信号变差,导致语音翻译失败的可能性。In a possible design, when the network signal strength is less than or equal to the preset threshold, the first electronic device prompts the first user to switch networks, or automatically switches to the first electronic device to perform Voice translation, or automatically switch to a network whose network signal strength is greater than the preset threshold. This helps to reduce the possibility of speech translation failure due to poor network signal.
在一种可能的设计中,所述第一电子设备根据本端语言和对端语言,确定所述翻译服务器,然后向所述翻译服务器上报所述第一用户的语音或上报所述第二用户的语音。其中,所述本端语言为所述第一用户所使用的语言,所述对端语言为所述第二用户所使用的语言。从而有助于使得第一电子设备能够选择更合适的翻译服务器对语音进行翻译,提高语音翻译的可靠性。In a possible design, the first electronic device determines the translation server according to the local language and the opposite language, and then reports the voice of the first user or reports the second user to the translation server 's voice. The local language is the language used by the first user, and the peer language is the language used by the second user. Therefore, it is helpful to enable the first electronic device to select a more suitable translation server to translate the speech, thereby improving the reliability of speech translation.
在一种可能的设计中,所述第一电子设备与所述第二电子设备建立语音通话连接中或者所述第一电子设备与所述第二电子设备建立语音通话连接之后,当所述本端语言和所述对端语言不同时,自动开启语音通话翻译功能。有助于简化用户的操作。In a possible design, when the first electronic device establishes a voice call connection with the second electronic device or after the first electronic device establishes a voice call connection with the second electronic device, when the local When the language of the terminal is different from the language of the opposite terminal, the voice call translation function is automatically enabled. Helps simplify operations for users.
在一种可能的设计中,所述第一电子设备响应于用户的第一操作,开启语音通话翻译功能。有助于提高第一电子设备与用户的交互。In a possible design, the first electronic device enables the voice call translation function in response to the user's first operation. It helps to improve the interaction between the first electronic device and the user.
在一种可能的设计中,所述第一电子设备向所述第二电子设备发送所述第一电子设备的语音通话翻译功能已开启的提示信息,所述提示信息所使用的语言为所述对端语言。有助于提高第一电子设备与用户的交互。In a possible design, the first electronic device sends, to the second electronic device, prompt information that the voice call translation function of the first electronic device has been enabled, and the prompt information is in the language of the peer language. It helps to improve the interaction between the first electronic device and the user.
在一种可能的设计中,所述第一电子设备获取所述本端语言和所述对端语言;其中,所述本端语言为所述系统语言、或者所述第一用户和所述第二用户的最近一次的通话记录中所述第一用户所使用的语言、或者所述第一用户的电话号码归属地的母语、或者所述第一电子设备接入的通信网络所在的归属地的母语、或者响应于用户操作设置的语言;所述对端语言为所述第二用户的电话号码归属地的母语、或者所述第一用户和所述第二用户的最近一次的通话记录中所述第二用户所使用的语言、或者所述第二电子设备接入的通信网络所在的归属地的母语、或者响应于用户操作设置的语言。有助于简化本端语言和对端语言的获取方式。In a possible design, the first electronic device acquires the local language and the peer language; wherein the local language is the system language, or the first user and the first user The language used by the first user in the last call record of the two users, or the native language of the home of the first user's phone number, or the home language of the communication network accessed by the first electronic device is located. The native language, or the language set in response to the user operation; the peer language is the native language of the home of the second user's phone number, or the most recent call record between the first user and the second user. The language used by the second user, or the native language of the home location where the communication network accessed by the second electronic device is located, or the language set in response to the user operation. Helps to simplify the acquisition of the local language and the peer language.
在一种可能的设计中,所述第一电子设备当未采集到所述第一用户的语音以及未接收到所述第二用户的语音时,播报所述第二用户的语音的翻译结果。有助于降低语音播报时的叠音或者不完整的可能性。In a possible design, the first electronic device broadcasts the translation result of the voice of the second user when the voice of the first user is not collected and the voice of the second user is not received. Helps reduce the possibility of overlapping or incomplete voice announcements.
在一种可能的设计中,所述第一电子设备当接收到第二用户的语音、且第一时长内未接收到所述翻译服务器发送的所述第二用户的语音的翻译结果时,获取所述网络信号强度;当所述网络信号强度大于预设阈值时,提示所述第二用户降低语速。有助于降低因用户语速过快导致翻译服务器无法识别语音进行翻译的可能性。In a possible design, when the first electronic device receives the voice of the second user and does not receive the translation result of the voice of the second user sent by the translation server within a first period of time, obtain the network signal strength; when the network signal strength is greater than a preset threshold, prompt the second user to reduce the speech rate. Helps reduce the possibility that the translation server cannot recognize the speech for translation due to the user speaking too fast.
在一种可能的设计中,所述第一电子设备在显示屏上显示第一提示信息,所述第一提示信息用于提示所述第一用户通知所述第二降低语速;或者,所述第一电子设备通过向第二电子设备发送第一语音,所述第一语音用于提示所述第二用户降低语速;或者,所述第一电子设备向所述第一用户播放第二语音,第二语音用于提示所述第一用户通知所述第二用户降低语速。有助于简化通知用户放慢语速的方式。In a possible design, the first electronic device displays first prompt information on the display screen, and the first prompt information is used to prompt the first user to notify the second to reduce the speech rate; or, the The first electronic device sends the first voice to the second electronic device, where the first voice is used to prompt the second user to reduce the speaking rate; or, the first electronic device plays the second voice to the first user. voice, and the second voice is used to prompt the first user to notify the second user to reduce the speaking rate. Helps to simplify how users are notified to slow down.
在一种可能的设计中,所述第一电子设备缓存的所述第二用户的语音的翻译结果超过预设数量时,播报所述第二用户的语音的翻译结果。有助于降低语音的翻译结果丢包的可能性。In a possible design, when the translation result of the voice of the second user buffered by the first electronic device exceeds a preset number, the translation result of the voice of the second user is broadcast. Helps reduce the possibility of packet loss in speech translation results.
在一种可能的设计中,所述第一电子设备播报所述第一用户的语音的翻译结果。In a possible design, the first electronic device broadcasts the translation result of the first user's speech.
在一种可能的设计中,所述第一电子设备在显示屏上显示所述第一用户与所述第二用户的通话语音记录的文本以及语音的翻译结果的文本。有助于帮助用户理解对方所表达的意思。In a possible design, the first electronic device displays the text of the voice recording of the call between the first user and the second user and the text of the translation result of the voice on the display screen. Helps users understand what the other person is saying.
在一种可能的设计中,所述第一电子设备与第二电子设备建立语音通话连接之后,使用所述本端语言播放或者显示语音通话翻译功能已开启的提示信息。有助于提示用户语音通话翻译功能已开启。In a possible design, after the first electronic device establishes a voice call connection with the second electronic device, the local language is used to play or display a prompt message that the voice call translation function has been enabled. Helpful to indicate to the user that voice call translation is turned on.
第二方面,本申请实施例提供的一种电子设备,包括:一个或多个处理器、存储器、多个应用程序、以及一个或多个计算机程序;其中,一个或多个计算机程序被存储在存储器中,当计算机程序被电子设备执行时,实现本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法。In a second aspect, an electronic device provided by an embodiment of the present application includes: one or more processors, a memory, multiple application programs, and one or more computer programs; wherein the one or more computer programs are stored in In the memory, when the computer program is executed by the electronic device, the first aspect and any possible design method involved in the first aspect of the embodiments of the present application are implemented.
第三方面,本申请实施例提供的一种芯片,所述芯片与电子设备中的存储器耦合,使得所述芯片在运行时调用所述存储器中存储的计算机程序,实现本申请实施例第一方面以及第一方面涉及的任一可能设计的方法。A third aspect is a chip provided by an embodiment of the present application. The chip is coupled to a memory in an electronic device, so that the chip calls a computer program stored in the memory when running, so as to implement the first aspect of the embodiment of the present application. and any possible design method involved in the first aspect.
第四方面,本申请实施例的一种计算机存储介质,该计算机存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得电子设备执行本申请实施例第一方面以及第一方面涉及的任一可能设计的方法。In a fourth aspect, a computer storage medium according to an embodiment of the present application, the computer storage medium stores a computer program, and when the computer program runs on an electronic device, enables the electronic device to execute the first aspect and the first aspect of the embodiment of the present application. The method of any possible design involved in the aspect.
第五方面,本申请实施例的一种计算机程序产品,当所述计算机程序产品在电子设备上运行时,使得所述电子设备执行实现本申请实施例上述第一方面以及第一方面涉及的任一可能设计的方法。A fifth aspect is a computer program product according to an embodiment of the present application. When the computer program product is run on an electronic device, the electronic device is made to execute and implement any of the above-mentioned first aspect and the first aspect of the embodiment of the present application. A possible design method.
另外,第二方面至第五方面中任一种可能设计方式所带来的技术效果可参见方法部分相关中不同设计方式所带来的技术效果,此处不再赘述。In addition, for the technical effect brought by any of the possible design methods in the second aspect to the fifth aspect, reference may be made to the technical effect brought by different design methods in the related section of the method, which will not be repeated here.
附图说明Description of drawings
图1为本申请实施例适用的一种通信系统的架构示意图;FIG. 1 is a schematic diagram of the architecture of a communication system to which an embodiment of the application is applied;
图2为本申请实施例提供的一种电子设备的硬件结构示意图;2 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的具体的结构示意图;FIG. 3 is a specific structural schematic diagram of an electronic device provided by an embodiment of the present application;
图4为本申请实施例应用场景的示意图;4 is a schematic diagram of an application scenario of an embodiment of the present application;
图5为本申请实施例拨打电话的用户界面的示意图;5 is a schematic diagram of a user interface for making a phone call according to an embodiment of the present application;
图6为本申请实施例对端语言设置的用户界面的示意图;FIG. 6 is a schematic diagram of a user interface of a peer language setting according to an embodiment of the present application;
图7为本申请实施例系统语言设置的示意图;7 is a schematic diagram of system language setting according to an embodiment of the present application;
图8为本申请实施例的应用场景的示意图;FIG. 8 is a schematic diagram of an application scenario of an embodiment of the present application;
图9为本申请实施例的基于语音通话的翻译方法的流程示意图;9 is a schematic flowchart of a translation method based on a voice call according to an embodiment of the present application;
图10为本申请实施例提示用户放慢语速的用户界面的示意图;10 is a schematic diagram of a user interface prompting a user to slow down the speech rate according to an embodiment of the present application;
图11为本申请实施例一种语音播报方法的流程示意图;11 is a schematic flowchart of a voice broadcast method according to an embodiment of the present application;
图12为本申请实施例一种队列的示意图;12 is a schematic diagram of a queue according to an embodiment of the present application;
图13为本申请实施例文本显示的用户界面的示意图;13 is a schematic diagram of a user interface for text display according to an embodiment of the present application;
图14为本申请实施例另一种用户界面的示意图;14 is a schematic diagram of another user interface according to an embodiment of the present application;
图15为本申请实施例另一种用户界面的示意图;15 is a schematic diagram of another user interface according to an embodiment of the present application;
图16为本申请实施例系统设置界面的示意图;16 is a schematic diagram of a system setting interface according to an embodiment of the present application;
图17为本申请实施例来电显示的用户界面的示意图;FIG. 17 is a schematic diagram of a user interface for caller ID according to an embodiment of the present application;
图18为本申请实施例另一种电子设备的结构示意图。FIG. 18 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和 /或”,描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示以下三种关系:单独存在A,同时存在A和B,单独存在B。其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。It should be understood that, in the embodiments of the present application, "at least one" refers to one or more, and "a plurality" refers to two or more. "And/or", which describes the association relationship of associated objects, indicates that there can be three kinds of relationships. For example, A and/or B can represent the following three relationships: A alone exists, A and B exist simultaneously, and B exists alone. A and B can be singular or plural. The character "/" generally indicates that the associated objects are an "or" relationship. "At least one (item) of the following" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural item (item). For example, at least one (a) of a, b or c may represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c Can be single or multiple.
为了使得使用不同语言的通信双方(例如母语不同的通信双方)通过电子设备实现无障碍沟通,本申请实施例提供了一种基于语音通话的翻译方法。In order to enable communication parties using different languages (for example, communication parties with different native languages) to achieve barrier-free communication through an electronic device, an embodiment of the present application provides a translation method based on a voice call.
如图1所示,为本申请实施例适用的一种通信系统的架构示意图。具体的,图1所示的通信系统架构包括电子设备100、电子设备200和移动通信网络。电子设备100和电子设备200可以通过移动通信网络进行通信。其中,移动通信网络可以为第二代移动通信(2nd-generation, 2G)网络、或者第三代移动通信(3rd-generation,3G)网络,又可以为第四代移动通信 (4th-generation,4G)网络,还可以第五代移动通信(5th-generation,5G)网络等。As shown in FIG. 1 , it is a schematic structural diagram of a communication system to which this embodiment of the present application is applied. Specifically, the communication system architecture shown in FIG. 1 includes an electronic device 100 , an electronic device 200 and a mobile communication network. The electronic device 100 and the electronic device 200 may communicate through a mobile communication network. The mobile communication network may be a second-generation (2nd-generation, 2G) network, a third-generation (3rd-generation, 3G) network, or a fourth-generation (4th-generation, 4G) network. ) network, as well as a fifth-generation mobile communication (5th-generation, 5G) network, etc.
如图1所示,用户A使用电子设备100,用户B使用电子设备200,在用户A和用户B语言不通的情况下,例如用户A使用语言1,用户B使用语言2,为了便于用户A和用户B的沟通,本申请实施例中电子设备A可以在用户A和用户B通话过程中,将采集的用户A使用语言1发出的语音翻译为语言2,然后通过移动通信网络将翻译为语言2的语音发送给电子设备200,从而使得电子设备200能够直接向用户B播放翻译为语言2的语音。而电子设备200可以将采集的用户 B使用语言2发出的语音通过移动通信网络发送给电子设备100,电子设备100在接收到电子设备200发送的语音后,将接收到的语音翻译为语言1,然后播放给用户A,从而有助于用户A与用户B在语言不通的情况下进行沟通。As shown in FIG. 1 , user A uses electronic device 100 and user B uses electronic device 200. If user A and user B have different languages, for example, user A uses language 1 and user B uses language 2. For the communication of user B, in the embodiment of the present application, electronic device A can translate the collected voice sent by user A in language 1 into language 2 during the conversation between user A and user B, and then translate into language 2 through the mobile communication network The voice of the user B is sent to the electronic device 200, so that the electronic device 200 can directly play the voice translated into language 2 to the user B. On the other hand, the electronic device 200 can send the collected voice sent by user B in language 2 to the electronic device 100 through the mobile communication network. After receiving the voice sent by the electronic device 200, the electronic device 100 translates the received voice into language 1, Then it is played to user A, thereby helping user A and user B to communicate in the case of language barriers.
以语言1为中文,语言2为英文为例。例如,电子设备100采集的用户A的语音为“我是露西,有什么需要帮助您的吗?”,则获取的用户A的语音的翻译结果为“This is Lucyspeaking, may I help you?”,并将“This is Lucy speaking,may I help you?”的语音发送给电子设备 200,以使得电子设备200向用户B播放“This is Lucy speaking,may Ihelp you?”的语音,从而使得用户B在不懂中文的情况下,可以明白用户A所表达的意思。电子设备200在采集到用户B的语音“I want to buy a ticket”后,将用户B的语音“I wantto buy a ticket”通过移动通信网络发送给电子设备100。电子设备100在接收到电子设备200发送的“I want to buy a ticket”的语音后,获取用户B的语音的翻译结果“我想买一张票”,并将“我想买一张票”的语音播放给用户A,从而使得用户A在不懂英文的情况下,可以明白用户B所表达的意思。Take language 1 as Chinese and language 2 as English as an example. For example, if the voice of user A collected by the electronic device 100 is "I'm Lucy, do I need to help you?", the translation result of the voice of user A obtained is "This is Lucyspeaking, may I help you?" , and send the voice of "This is Lucy speaking, may I help you?" to the electronic device 200, so that the electronic device 200 plays the voice of "This is Lucy speaking, may I help you?" to user B, so that user B can play the voice of "This is Lucy speaking, may I help you?" In the case of not knowing Chinese, you can understand the meaning expressed by user A. After collecting the voice "I want to buy a ticket" of the user B, the electronic device 200 sends the voice "I want to buy a ticket" of the user B to the electronic device 100 through the mobile communication network. After receiving the voice of "I want to buy a ticket" sent by the electronic device 200, the electronic device 100 obtains the translation result of the voice of the user B, "I want to buy a ticket", and writes "I want to buy a ticket". The voice of user A is played to user A, so that user A can understand the meaning expressed by user B even if he does not understand English.
在另一些实施例中,电子设备100还可以将采集的用户A使用语言1发出的语音通过移动通信网络发送给电子设备200,从而使得电子设备200能够将用户A使用语言1发出的语音播放给用户B。此外,在又一些实施例中,本申请实施例中电子设备100在通过移动通信网络接收到电子设备200发送的使用语言2的语音后,还可以向用户A播放使用语言2的语音。In other embodiments, the electronic device 100 may also send the collected voice sent by user A using language 1 to the electronic device 200 through the mobile communication network, so that the electronic device 200 can play the voice sent by user A using language 1 to the electronic device 200. user B. In addition, in still other embodiments, after receiving the voice in language 2 sent by electronic device 200 through the mobile communication network, the electronic device 100 in this embodiment of the present application may also play the voice in language 2 to user A.
为了降低对电子设备100处理性能的要求,在一些实施例中,图1所示的通信系统架构还包括翻译服务器。电子设备100可以将采集到的用户A的语音或者接收到的来自电子设备200 采集的用户B的语音发送到翻译服务器上进行翻译。需要说明的是,用于翻译电子设备100采集的用户A的语音的翻译服务器和用于翻译电子设备100接收到的用户B的语音的翻译服务器可以为同一个翻译服务器,也可以为不同的翻译服务器,本申请实施例对通信系统中翻译服务器的个数不作限定。应理解,电子设备100可以通过无线保真(wireless-fidelity,Wi-Fi)、蓝牙、或者移动通信网络等与翻译服务器通信。In order to reduce the requirements on the processing performance of the electronic device 100, in some embodiments, the communication system architecture shown in FIG. 1 further includes a translation server. The electronic device 100 may send the collected voice of user A or the received voice of user B collected from the electronic device 200 to the translation server for translation. It should be noted that the translation server used to translate the voice of user A collected by the electronic device 100 and the translation server used to translate the voice of user B received by the electronic device 100 may be the same translation server or different translation servers. Server, the embodiment of the present application does not limit the number of translation servers in the communication system. It should be understood that the electronic device 100 may communicate with the translation server through wireless-fidelity (Wi-Fi), Bluetooth, or a mobile communication network.
本申请实施例中的电子设备100和电子设备200在用户A和用户B通话过程中,可以只有一方例如电子设备100支持语音通话翻译功能即可,本申请实施例中电子设备200可以支持语音通话翻译功能,也可以不支持语音通话翻译功能,对此不作限定。In the electronic device 100 and the electronic device 200 in the embodiment of the present application, during the call between the user A and the user B, only one party, for example, the electronic device 100, may support the voice call translation function. In the embodiment of the present application, the electronic device 200 may support the voice call. The translation function may also not support the voice call translation function, which is not limited.
应理解,本申请实施例中电子设备100可以是便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)、车载设备等。便携式电子设备的示例性实施例包括但不限于搭载或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是诸如具有触敏表面(例如触控面板)的膝上型计算机(Laptop) 等。还应当理解的是,在本申请其他一些实施例中,电子设备100也可以是具有触敏表面(例如触控面板)的台式计算机。It should be understood that the electronic device 100 in this embodiment of the present application may be a portable electronic device, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with a wireless communication function, a vehicle-mounted device, and the like. Exemplary embodiments of portable electronic devices include, but are not limited to, carry-on Or portable electronic devices with other operating systems. The aforementioned portable electronic device may also be, for example, a laptop computer (Laptop) having a touch-sensitive surface (eg, a touch panel). It should also be understood that, in some other embodiments of the present application, the electronic device 100 may also be a desktop computer having a touch-sensitive surface (eg, a touch panel).
示例性的,如图2所示为一种可能的电子设备100的硬件结构示意图。应理解,图示电子设备100的硬件结构仅是一个示例。并且,电子设备100可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。Exemplarily, FIG. 2 is a schematic diagram of a possible hardware structure of the electronic device 100 . It should be understood that the illustrated hardware structure of the electronic device 100 is only an example. Also, the electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
如图2所示,电子设备100包括处理器110、内部存储器121、外部存储器接口122、天线1、移动通信模块131、天线2、无线通信模块132、音频模块140、扬声器140A、受话器 140B、麦克风140C、耳机接口140D、显示屏151、用户标识模块(subscriber identificationmodule,SIM)卡接口152、摄像头153、按键154、传感器模块160、通用串行总线(universalserial bus,USB)接口170、充电管理模块180、电源管理模块181和电池182。在另一些实施例中,电子设备100还可以包括马达、指示器等。As shown in FIG. 2, the electronic device 100 includes a processor 110, an internal memory 121, an external memory interface 122, an antenna 1, a mobile communication module 131, an antenna 2, a wireless communication module 132, an audio module 140, a speaker 140A, a receiver 140B, and a microphone 140C, headphone jack 140D, display screen 151, subscriber identification module (SIM) card interface 152, camera 153, button 154, sensor module 160, universal serial bus (universal serial bus, USB) interface 170, charging management module 180 , the power management module 181 and the battery 182 . In other embodiments, the electronic device 100 may also include a motor, an indicator, and the like.
其中,处理器110可以包括一个或多个处理单元。例如:处理器110可以包括应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processingunit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、和/或神经网络处理器(neural-network processing unit, NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (ISP), a controller, a video encoder A decoder, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
在一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例的,处理器110中的存储器可以为高速缓冲存储器。该存储器可以用于保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。In some embodiments, memory may also be provided in the processor 110 for storing instructions and data. By way of example, the memory in the processor 110 may be a cache memory. This memory may be used to hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from this memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据、电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、通用闪存存储器(universal flash storage,UFS)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
外部存储器接口122可以用于连接外部存储卡(例如,Micro SD卡),实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口122与处理器110通信,实现数据存储功能。例如将音乐、视频等文件保存在外部存储卡中。The external memory interface 122 can be used to connect an external memory card (eg, a Micro SD card) to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 122 to realize the data storage function. For example, save files such as music, video, etc. in an external memory card.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块131可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块131可以包括至少一个滤波器、开关、功率放大器、低噪声放大器(low noise amplifier,LNA)等。移动通信模块131可以由天线1接收电磁波信号,并对接收的电磁波信号进行滤波、放大等处理,传送至调制解调处理器进行解调。移动通信模块131还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波信号辐射出去。在一些实施例中,移动通信模块131的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块131的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。例如,移动通信模块131可以向电子设备200发送语音,也可以接收电子设备200发送的语音。The mobile communication module 131 can provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 131 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 131 can receive the electromagnetic wave signal from the antenna 1, perform filtering, amplifying and other processing on the received electromagnetic wave signal, and transmit it to the modulation and demodulation processor for demodulation. The mobile communication module 131 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into an electromagnetic wave signal and radiate it out through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 131 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 131 may be provided in the same device as at least part of the modules of the processor 110 . For example, the mobile communication module 131 can send voice to the electronic device 200 , and can also receive the voice sent by the electronic device 200 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器140A、受话器140B等)输出声音信号,或通过显示屏151显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块131或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 140A, the receiver 140B, etc.), or displays an image or video through the display screen 151 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 131 or other functional modules.
无线通信模块132可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如Wi-Fi网络)、蓝牙(bluetooth,BT)、全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块132可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块132经由天线2接收电磁波信号,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块132还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。例如,无线通信模块132可以将电子设备100采集的用户A使用语言1的语音发送给翻译服务器,也可以将移动通信模块131接收到的电子设备200采集的用户B使用语言 2的语音发送给翻译服务器,还可以接收翻译服务器发送语音的翻译结果。应理解,在本申请实施例中语音的翻译结果为一段音频。The wireless communication module 132 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as Wi-Fi networks), bluetooth (BT), global navigation satellite system (GNSS) , frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 132 may be one or more devices integrating at least one communication processing module. The wireless communication module 132 receives the electromagnetic wave signal via the antenna 2 , frequency modulates and filters the electromagnetic wave signal, and sends the processed signal to the processor 110 . The wireless communication module 132 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves for radiation through the antenna 2 . For example, the wireless communication module 132 can send the voice of the user A in language 1 collected by the electronic device 100 to the translation server, and can also send the voice of the user B in the language 2 collected by the electronic device 200 received by the mobile communication module 131 to the translation server The server can also receive the translation result of the speech sent by the translation server. It should be understood that in this embodiment of the present application, the translation result of the speech is a piece of audio.
在一些实施例中,电子设备100的天线1和移动通信模块131耦合,天线2和无线通信模块132耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(codedivision multiple access,CDMA)、宽带码分多址(wideband code division multipleaccess,WCDMA)、时分码分多址(time-division code division multiple access,TD-SCDMA)、长期演进(long term evolution, LTE)、BT、GNSS、WLAN、NFC、FM、和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS)、全球导航卫星系统(global navigation satellite system, GLONASS)、北斗卫星导航系统(beidounavigation satellite system,BDS)、准天顶卫星系统 (quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems, SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 131, and the antenna 2 is coupled with the wireless communication module 132, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou satellite navigation system (BDS), a quasi-zenith satellite system (quasi- zenith satellite system, QZSS) and/or satellite based augmentation system (satellite based augmentation systems, SBAS).
电子设备100可以通过音频模块140、扬声器140A、受话器140B、麦克风140C、耳机接口140D以及应用处理器等实现音频功能。例如音乐播放、录音等。The electronic device 100 may implement audio functions through an audio module 140, a speaker 140A, a receiver 140B, a microphone 140C, an earphone interface 140D, an application processor, and the like. Such as music playback, recording, etc.
音频模块140可以用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块140还可以用于对音频信号编码和解码。在一些实施例中,音频模块140可以设置于处理器110中,或将音频模块140的部分功能模块设置于处理器110 中。The audio module 140 can be used to convert digital audio information to analog audio signal output, and also to convert analog audio input to digital audio signal. Audio module 140 may also be used to encode and decode audio signals. In some embodiments, the audio module 140 may be provided in the processor 110 , or some functional modules of the audio module 140 may be provided in the processor 110 .
扬声器140A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器140A收听音乐、或接听免提通话。Speaker 140A, also referred to as "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or answer a hands-free call through the speaker 140A.
受话器140B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器140B靠近人耳接听语音。The receiver 140B, also referred to as an "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 140B close to the human ear.
麦克风140C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风140C发声,麦克风140C可以用于采集用户A 的声音,然后,将用户A的声音转换为电信号。电子设备100可以设置至少一个麦克风140C。在另一些实施例中,电子设备100可以设置两个麦克风140C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个、四个或更多麦克风140C,实现声音信号采集、降噪、还可以识别声音来源,实现定向录音功能等。The microphone 140C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound through the human mouth close to the microphone 140C, and the microphone 140C can be used to collect the voice of the user A, and then convert the voice of the user A into an electrical signal. The electronic device 100 may be provided with at least one microphone 140C. In other embodiments, the electronic device 100 may be provided with two microphones 140C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 140C to implement sound signal collection, noise reduction, identify sound sources, and implement directional recording functions.
耳机接口140D用于连接有线耳机。耳机接口140D可以是USB接口130,也可以是3.5mm 的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口、美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口等。The earphone jack 140D is used to connect wired earphones. The earphone interface 140D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface, etc. .
电子设备100可以通过GPU、显示屏151、以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏151和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 may implement a display function through a GPU, a display screen 151, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 151 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏151可以用于显示图像、视频等。显示屏151可以包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode, OLED)、有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED)、柔性发光二极管(flex light-emitting diode,FLED)、Miniled、 MicroLed、Micro-oLed、量子点发光二极管(quantumdot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏151,N为大于1的正整数。The display screen 151 may be used to display images, videos, and the like. The display screen 151 may include a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantumdot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include 1 or N display screens 151 , where N is a positive integer greater than 1.
电子设备100可以通过摄像头153、ISP、视频编解码器、GPU、显示屏151以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the camera 153, the ISP, the video codec, the GPU, the display screen 151, the application processor, and the like.
ISP可以用于处理摄像头153反馈的数据。例如,拍照时,打开快门,通过摄像头153采集光信号,然后摄像头153将采集的光信号转换为电信号,并将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点、亮度、肤色进行算法优化。ISP还可以对拍摄场景的曝光、色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP can be used to process the data fed back by the camera 153 . For example, when taking a picture, the shutter is opened, and the light signal is collected by the camera 153, and then the camera 153 converts the collected light signal into an electrical signal, and transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头153可以用于捕获静态图像或视频。通常情况下,摄像头153包括镜头和图像传感器。其中,物体通过镜头生成光学图像投射到图像传感器。图像传感器可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。图像传感器把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB、YUV等格式的图像信号。在一些实施例中,电子设备100 可以包括1个或N个摄像头153,N为大于1的正整数。Camera 153 may be used to capture still images or video. Typically, the camera 153 includes a lens and an image sensor. Among them, the object is projected through the lens to generate an optical image to the image sensor. The image sensor may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The image sensor converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 153 , where N is a positive integer greater than 1.
按键154可以包括开机键、音量键等。按键154可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 154 may include a power key, a volume key, and the like. Keys 154 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
传感器模块160可以包括一个或多个传感器。例如,触摸传感器160A、指纹传感器160B、陀螺仪传感器160C、压力传感器160D、加速度传感器160E等。在一些实施例中,传感器模块160还可以包括环境传感器、距离传感器、接近光传感器、骨传导传感器等。Sensor module 160 may include one or more sensors. For example, a touch sensor 160A, a fingerprint sensor 160B, a gyro sensor 160C, a pressure sensor 160D, an acceleration sensor 160E, and the like. In some embodiments, the sensor module 160 may also include environmental sensors, distance sensors, proximity light sensors, bone conduction sensors, and the like.
触摸传感器160A,也可称为“触控面板”。触摸传感器160A可以设置于显示屏151,由触摸传感器160A与显示屏151组成触摸屏,也称“触控屏”。触摸传感器160A用于检测作用于其上或附近的触摸操作。触摸传感器160A可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏151提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器160A也可以设置于电子设备100的表面,与显示屏151所处的位置不同。The touch sensor 160A may also be referred to as a "touch panel". The touch sensor 160A may be disposed on the display screen 151 , and the touch sensor 160A and the display screen 151 form a touch screen, also referred to as a “touch screen”. The touch sensor 160A is used to detect touch operations on or near it. The touch sensor 160A may communicate the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through the display screen 151 . In other embodiments, the touch sensor 160A may also be disposed on the surface of the electronic device 100 , which is different from the position where the display screen 151 is located.
指纹传感器160可以用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁、访问应用锁、指纹拍照、指纹接听来电等。The fingerprint sensor 160 may be used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
陀螺仪传感器160C可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器160C确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器160C可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器160C检测电子设备100 抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器160C还可以用于导航、体感游戏场景。The gyro sensor 160C may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 160C. The gyro sensor 160C can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyroscope sensor 160C detects the shaking angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyro sensor 160C can also be used for navigation and somatosensory game scenarios.
压力传感器160D用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器160D可以设置于显示屏151。压力传感器160D的种类很多,如电阻式压力传感器、电感式压力传感器、电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 160D is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 160D may be disposed on the display screen 151 . There are many types of pressure sensors 160D, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
加速度传感器160E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换、计步器等应用。The acceleration sensor 160E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
在另一些实施例中,处理器110还可以包括一个或多个接口。例如,接口可以为SIM卡接口152。又例如,接口还可以为USB接口170。再例如,接口还可以为集成电路(inter-integrated circuit,I2C)接口、集成电路内置音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制 (pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface, MIPI)、通用输入输出(general-purposeinput/output,GPIO)接口等。可以理解的是,本申请实施例处理器110可以通过接口连接电子设备100的不同模块,从而使得电子设备100能够实现不同的功能。例如拍照、处理等。需要说明的是,本申请实施例对电子设备100中接口的连接方式不作限定。In other embodiments, the processor 110 may also include one or more interfaces. For example, the interface may be the SIM card interface 152 . For another example, the interface may also be the USB interface 170 . For another example, the interface may also be an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver transmission A universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, and the like. It can be understood that, the processor 110 in this embodiment of the present application may be connected to different modules of the electronic device 100 through an interface, so that the electronic device 100 can implement different functions. For example, taking pictures, processing, etc. It should be noted that, the embodiment of the present application does not limit the connection manner of the interface in the electronic device 100 .
其中,SIM卡接口152可以用于连接SIM卡。SIM卡可以通过插入SIM卡接口152,或从SIM卡接口152拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或 N个SIM卡接口,N为大于1的正整数。SIM卡接口152可以支持Nano SIM卡、Micro SIM 卡、SIM卡等。同一个SIM卡接口152可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口152也可以兼容不同类型的SIM卡。SIM卡接口152也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。Wherein, the SIM card interface 152 can be used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting into the SIM card interface 152 or pulling out from the SIM card interface 152 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 152 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 152 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 152 may also be compatible with different types of SIM cards. The SIM card interface 152 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
USB接口170是符合USB标准规范的接口。例如,USB接口170可以包括Mini USB接口、Micro USB接口、USB Type C接口等。USB接口170可以用于连接充电器为电子设备 100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。USB接口170还可以用于连接其他电子设备,例如增强现实技术(augmentedreality,AR)设备等。The USB interface 170 is an interface conforming to the USB standard specification. For example, the USB interface 170 may include a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 170 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The USB interface 170 may also be used to connect other electronic devices, such as augmented reality (AR) devices and the like.
充电管理模块180用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块180可以通过USB接口170接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块180可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池182充电的同时,还可以通过电源管理模块181为电子设备供电。The charging management module 180 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 180 may receive charging input from the wired charger through the USB interface 170 . In some wireless charging embodiments, the charging management module 180 may receive wireless charging input through the wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 182 , the power management module 181 can also supply power to the electronic device.
电源管理模块181用于连接电池182,充电管理模块180与处理器110。电源管理模块 181接收电池182和/或充电管理模块180的输入,为处理器110、内部存储器121、外部存储器、显示屏151、摄像头153、移动通信模块131和无线通信模块132等供电。电源管理模块181还可以用于监测电池容量、电池循环次数、电池健康状态(漏电、阻抗)等参数。在其他一些实施例中,电源管理模块181也可以设置于处理器110中。在另一些实施例中,电源管理模块181和充电管理模块180也可以设置于同一个器件中。The power management module 181 is used to connect the battery 182 , the charging management module 180 and the processor 110 . The power management module 181 receives input from the battery 182 and/or the charge management module 180, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 151, the camera 153, the mobile communication module 131 and the wireless communication module 132. The power management module 181 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 181 may also be provided in the processor 110 . In other embodiments, the power management module 181 and the charging management module 180 may also be provided in the same device.
下面以电子设备100为例对本申请实施例中基于语音通话的翻译方法进行详细说明。The following takes the electronic device 100 as an example to describe the translation method based on a voice call in this embodiment of the present application in detail.
如图3所示,为本申请实施例电子设备100的一种具体的架构示意图。具体的,电子设备100包括交互模块、语音采集模块、播报模块、通信模块和翻译模块。As shown in FIG. 3 , it is a schematic diagram of a specific structure of an electronic device 100 according to an embodiment of the present application. Specifically, the electronic device 100 includes an interaction module, a voice collection module, a broadcast module, a communication module and a translation module.
其中,交互模块用于实现用户与电子设备100之间的交互。例如,交互模块可以用于显示用户界面。在一些实施例中,交互模块可以通过图2所示的电子设备100的硬件架构中的显示屏151实现,也可以通过图2所示的电子设备100的硬件架构中的显示屏151和触摸传感器160A实现。语音采集模块用于采集语音。在一些实施例中,语音采集模块可以通过图2 所示的电子设备100的硬件架构中的麦克风140C实现。播报模块用于播报语音,例如通话过程中语音的翻译结果、或者未翻译的语音等。需要说明的是,播报模块可以通过图2所示的电子设备100的硬件架构中的受话器140B、或者扬声器140A、或者与耳机接口140D连接的耳机等实现。通信模块用于实现电子设备与其它电子设备或者翻译服务器的通信。例如,通信模块可以用于接收其它电子设备发送的语音,也可以用于向翻译服务器发送语音采集模块采集的语音、或者用于向翻译服务器发送通信模块接收的语音,还可以用于接收翻译服务器发送的语音的翻译结果等。示例的,通信模块可以支持的通信协议包括WiFi、蓝牙、LTE、 WCDMA、GSM、下一代无线通信(next radio,NR)等。在本申请实施例中,通信模块可以通过图2所示的电子设备100的硬件架构中的移动通信模块131和/或无线通信模块132实现。Wherein, the interaction module is used to realize the interaction between the user and the electronic device 100 . For example, an interaction module can be used to display a user interface. In some embodiments, the interaction module may be implemented by the display screen 151 in the hardware architecture of the electronic device 100 shown in FIG. 2 , or may be implemented by the display screen 151 and the touch sensor in the hardware architecture of the electronic device 100 shown in FIG. 2 160A implementation. The voice acquisition module is used to collect voice. In some embodiments, the voice collection module may be implemented by the microphone 140C in the hardware architecture of the electronic device 100 shown in FIG. 2 . The broadcast module is used to broadcast the voice, such as the translation result of the voice during the call, or the untranslated voice, etc. It should be noted that the broadcasting module may be implemented by the receiver 140B, the speaker 140A, or the earphone connected to the earphone interface 140D in the hardware architecture of the electronic device 100 shown in FIG. 2 . The communication module is used to realize the communication between the electronic device and other electronic devices or the translation server. For example, the communication module can be used to receive the voice sent by other electronic devices, and can also be used to send the voice collected by the voice acquisition module to the translation server, or used to send the voice received by the communication module to the translation server, and can also be used to receive the translation server. The translation result of the voice sent, etc. Exemplarily, the communication protocols that the communication module can support include WiFi, Bluetooth, LTE, WCDMA, GSM, next radio communication (next radio, NR) and the like. In this embodiment of the present application, the communication module may be implemented by the mobile communication module 131 and/or the wireless communication module 132 in the hardware architecture of the electronic device 100 shown in FIG. 2 .
翻译模块用于获取语音的翻译结果。在一些实施例中,如图3所示,翻译模块可以包括接入单元、本端翻译单元、对端翻译单元、协调单元、主控单元、播报控制单元和语音检测单元。示例的,接入单元可以用于实现翻译服务的选择。例如,在网络情况断开或者信号较差的情况下,接入单元采用离线翻译,通过预先配置在电子设备100中的翻译引擎进行翻译。需要说明的是,预先配置在电子设备100中的翻译引擎可以为用于实现对语音翻译的软件程序或命令等,可以存储在内部存储器121中,也可以存储在外部存储器110中,当电子设备对语音进行翻译时,调用翻译引擎,获取语音的翻译结果。又例如,在网络信号较好的情况下,接入单元采用在线翻译,进一步基于预先配置的策略选择相应的翻译服务器。本端翻译单元可以用于获取语音采集模块采集的语音、以及缓存语音采集模块采集的语音的翻译结果。对端翻译单元可以用于获取通信模块接收到的语音、以及缓存通信模块接收到的语音的翻译结果。播报控制单元可以用于控制播报模块播报翻译结果。在一些实施例中,本端翻译单元或者对端翻译单元还可以将缓存的语音的翻译结果发送给播报模块播报后,自动删除语音的翻译结果,也可以将语音的翻译结果存储到内部存储器121或者与外部存储器接口122连接的外部存储器中。语音检测单元可以用于检测当前是否有语音输入。协调单元可以用于协调翻译进程,控制语音的播放节奏。主控单元可以用于接收用户的操作指令,以及协调各个单元模块,从而实现语音通话翻译功能。需要说明的是,本申请实施例中翻译模块可以通过图 2所示的电子设备100的硬件架构中的处理器110实现。示例的,翻译模块可以通过处理器 110中的应用处理器实现。又示例的,翻译模块还可以为专用处理器,集成在处理器110中,也可不集成在处理器110中。The translation module is used to obtain the translation result of the speech. In some embodiments, as shown in FIG. 3 , the translation module may include an access unit, a local translation unit, a peer translation unit, a coordination unit, a main control unit, a broadcast control unit, and a voice detection unit. Illustratively, the access unit may be used to implement selection of translation services. For example, when the network is disconnected or the signal is poor, the access unit adopts offline translation, and performs translation through a translation engine preconfigured in the electronic device 100 . It should be noted that the translation engine pre-configured in the electronic device 100 may be a software program or command for realizing speech translation, and may be stored in the internal memory 121 or in the external memory 110. When the electronic device When translating speech, call the translation engine to obtain the translation result of speech. For another example, when the network signal is good, the access unit adopts online translation, and further selects a corresponding translation server based on a preconfigured policy. The local translation unit can be used to obtain the voice collected by the voice collection module and to cache the translation result of the voice collected by the voice collection module. The peer translation unit may be configured to acquire the speech received by the communication module and buffer the translation result of the speech received by the communication module. The broadcast control unit can be used to control the broadcast module to broadcast the translation result. In some embodiments, the translation unit at the local end or the translation unit at the opposite end may also automatically delete the translation result of the speech after sending the cached translation result of the speech to the broadcasting module for broadcasting, and may also store the translation result of the speech in the internal memory 121 Or in an external memory connected to the external memory interface 122 . The voice detection unit can be used to detect whether there is currently a voice input. The coordination unit can be used to coordinate the translation process and control the playback rhythm of the speech. The main control unit can be used to receive the user's operation instructions, and coordinate each unit module, so as to realize the voice call translation function. It should be noted that the translation module in this embodiment of the present application may be implemented by the processor 110 in the hardware architecture of the electronic device 100 shown in FIG. 2 . Illustratively, the translation module may be implemented by an application processor in the processor 110. In another example, the translation module may also be a dedicated processor, integrated in the processor 110, or not integrated in the processor 110.
下面对本申请实施例提供的基于语音通话的翻译方法的应用场景进行相应的介绍。本申请实施例基于语音通话的翻译方法可以应用于电子设备100作为主叫端,电子设备200作为被叫端的应用场景中,也可以应用于电子设备100作为被叫端,电子设备200作为主叫端的应用场景中。以电子设备100作为主叫端、电子设备200作为被叫端来实现用户A与用户B 之间的通信为例,对本申请实施例基于语音通话的翻译方法进行详细说明,其中用户A使用电子设备100,用户B使用电子设备200。The following describes the application scenarios of the voice call-based translation method provided by the embodiments of the present application. The translation method based on a voice call in this embodiment of the present application can be applied to an application scenario where the electronic device 100 is the calling end and the electronic device 200 is the called end, or can be applied to the electronic device 100 as the called end and the electronic device 200 as the calling end end application scenarios. Taking the electronic device 100 as the calling end and the electronic device 200 as the called end to realize the communication between the user A and the user B as an example, the translation method based on the voice call in the embodiment of the present application will be described in detail, wherein the user A uses the electronic device 100 , user B uses the electronic device 200 .
本申请实施例中的电子设备100可以在采集到用户A的语音后,获取用户A的语音的翻译结果,并将用户A的语音的翻译结果发送给电子设备200,以及电子设备100可以在接收到电子设备200发送的用户B的语音后,获取用户B的语音的翻译结果,并播放用户B的语音的翻译结果。The electronic device 100 in the embodiment of the present application may acquire the translation result of the user A's speech after collecting the user A's speech, and send the translation result of the user A's speech to the electronic device 200, and the electronic device 100 may receive the translation result of the user A's speech. After the voice of the user B sent by the electronic device 200, the translation result of the voice of the user B is acquired, and the translation result of the voice of the user B is played.
为了便于电子设备100获取用户A的语音的翻译结果和用户B的语音的翻译结果,在一些实施例中,电子设备100确定用于进行语音翻译的设备,然后从用于进行语音翻译的设备获取用户A的语音的翻译结果和/或用户B的语音的翻译结果。需要说明的是,用于进行语音翻译的设备可以为电子设备100本身,也可以为翻译服务器。当用于进行语音翻译的设备为翻译服务器时,用于进行语音翻译的设备可以为一个翻译服务器,也可以为多个翻译服务器。另外,用于对用户A的语音进行翻译的设备和用于对用户B的语音进行翻译的设备可以为同一个设备,也可以为不同的设备。示例的,电子设备100可以在向用户B发起呼叫之前,确定用于进行语音翻译的设备。例如,电子设备100可以在确定向用户B发起呼叫,在向用户B发起呼叫之前,确定用户进行语音翻译的设备。又示例的,电子设备100也可以在向用户B发起呼叫之后,确定用于进行语音翻译的设备。In order to facilitate the electronic device 100 to obtain the translation result of user A's voice and the translation result of user B's voice, in some embodiments, the electronic device 100 determines a device for voice translation, and then obtains the device from the device for voice translation The translation result of user A's speech and/or the translation result of user B's speech. It should be noted that the device used for voice translation may be the electronic device 100 itself, or may be a translation server. When the device for performing speech translation is a translation server, the device for performing speech translation may be one translation server, or may be multiple translation servers. In addition, the device for translating the voice of user A and the device for translating the voice of user B may be the same device or different devices. For example, before initiating a call to user B, the electronic device 100 may determine a device for performing speech translation. For example, the electronic device 100 may determine a device for the user to perform voice translation before determining to initiate a call to user B and before initiating a call to user B. In another example, the electronic device 100 may also determine a device for voice translation after initiating a call to user B.
其中,本申请实施例中电子设备100可以响应于对用户B的电话号码的拨打操作,向用户B发起呼叫。Wherein, in this embodiment of the present application, the electronic device 100 may initiate a call to user B in response to an operation of dialing the phone number of user B.
示例的,如图4所示,电子设备100的显示屏151显示用户界面400。其中,用户界面400包括电话图标401。在另一些实施例中,用户界面400还可以包括其它应用图标,例如设置图标、微信图标、图库图标、邮箱图标、相机图标等。电子设备100检测到对电话图标401的操作时,可以响应于对电话图标401的操作,在显示屏151显示用户界面410。用户界面410包括联系人列表411和功能栏412。其中联系人列表411是用户A根据自身的需要存储的。功能栏412包括新建联系人、扫名片和更多等功能按钮。例如,电子设备100响应于用户对联系人列表411中的用户B的操作,在显示屏151显示用户界面420。其中,用户界面420 可以包括用户B的名称、电话号码、邮箱等信息,以及还可以包括发送信息、添加到收藏、阻止来电号码等功能按钮。电子设备100可以响应于对电话号码12345659876的操作,向用户B发起呼叫,并在显示屏151显示用户界面430。示例的,对电话号码12345659876的操作可以为对电话号码12345659876的触摸操作。也可以为其它操作。For example, as shown in FIG. 4 , the display screen 151 of the electronic device 100 displays the user interface 400 . Among them, the user interface 400 includes a phone icon 401 . In other embodiments, the user interface 400 may further include other application icons, such as a settings icon, a WeChat icon, a gallery icon, a mailbox icon, a camera icon, and the like. When the electronic device 100 detects the operation on the phone icon 401 , the user interface 410 may be displayed on the display screen 151 in response to the operation on the phone icon 401 . User interface 410 includes a contact list 411 and a function bar 412 . The contact list 411 is stored by user A according to his own needs. The function bar 412 includes function buttons such as creating a new contact, scanning business cards and more. For example, the electronic device 100 displays the user interface 420 on the display screen 151 in response to the user's operation on the user B in the contact list 411 . The user interface 420 may include user B's name, phone number, mailbox and other information, and may also include function buttons such as sending information, adding to favorites, and blocking caller numbers. The electronic device 100 may initiate a call to the user B in response to the operation on the phone number 12345659876, and display the user interface 430 on the display screen 151 . For example, the operation on the phone number 12345659876 may be a touch operation on the phone number 12345659876. Other operations are also possible.
此外,用户A还可以通过直接在电子设备100的用户界面500上输入用户B的电话号码来向用户B发起呼叫。例如,如图5所示,电子设备100的显示屏151显示用户界面500,用户界面500包括拨号键盘、输入的电话号码“12345659876”以及拨号按钮501。当输入的电话号码为用户B的电话号码时,电子设备100响应于对拨号按钮501的操作,向用户B发起呼叫,并在显示屏151显示图4中所示的用户界面430。需要说明的是,本申请实施例中用户A还可以使用电子设备100通过其它方式向用户B发起呼叫,例如通过语音的方式向用户B发起呼叫。In addition, user A can also initiate a call to user B by directly inputting the phone number of user B on the user interface 500 of the electronic device 100 . For example, as shown in FIG. 5 , the display screen 151 of the electronic device 100 displays a user interface 500 including a dial pad, an entered phone number “12345659876”, and a dial button 501 . When the input phone number is the phone number of user B, the electronic device 100 initiates a call to user B in response to the operation of the dial button 501 , and displays the user interface 430 shown in FIG. 4 on the display screen 151 . It should be noted that, in this embodiment of the present application, user A may also use the electronic device 100 to initiate a call to user B in other manners, such as initiating a call to user B in a voice manner.
在一些实施例中,电子设备100可以根据网络信号强度,确定用于进行语音翻译的设备。其中,电子设备100当网络信号强度大于预设阈值时,从预设的至少一个翻译服务器中确定用于进行语音翻译的设备。然而,不同厂商的翻译服务器对于语言翻译的准确性有不同。例如,厂商S提供的翻译服务器对于东南亚语系的语言翻译的更加准确。又例如,厂商M提供的翻译服务器对于欧洲语系的语言翻译更加准确。因此为了提高语音翻译的准确性,电子设备100在使用翻译服务器时,可以根据预先设置的本端语言和对端语言,确定用于进行语音翻译的翻译服务器,如中文与越南语相互翻译时,选择厂商S的翻译服务器。需要说明的是,本端语言为用户A使用的语言,对端语言为用户B使用的语言。电子设备100当网络信号强度小于或等于预设阈值时,确定通过预先配置在电子设备100中的翻译引擎进行语音翻译。通过上述技术方案,有助于在网络信号较差的情况下,提高获取语音翻译结果的实时性。In some embodiments, the electronic device 100 may determine the device for performing speech translation according to the network signal strength. Wherein, when the network signal strength is greater than a preset threshold, the electronic device 100 determines a device for performing speech translation from at least one preset translation server. However, translation servers from different manufacturers vary in the accuracy of language translation. For example, the translation server provided by the manufacturer S is more accurate for the language translation of Southeast Asian languages. For another example, the translation server provided by the manufacturer M is more accurate for language translation of European languages. Therefore, in order to improve the accuracy of speech translation, when using the translation server, the electronic device 100 can determine the translation server for speech translation according to the preset local language and opposite language. For example, when translating between Chinese and Vietnamese, Select the translation server of manufacturer S. It should be noted that the local language is the language used by user A, and the peer language is the language used by user B. When the network signal strength is less than or equal to the preset threshold, the electronic device 100 determines to perform speech translation through the translation engine preconfigured in the electronic device 100 . The above technical solution helps to improve the real-time performance of obtaining the speech translation result under the condition of poor network signal.
需要说明的是,本申请实施例中,预设阈值可以预先配置在电子设备100中,也可以由电子设备100根据预先配置的算法来确定。另外,本申请实施例中电子设备100可以通过移动通信网络(例如4G网络、5G网络等)与翻译服务器建立通信,也可以通过WiFi网络与翻译服务器建立通信。本申请实施例中当电子设备100与翻译服务器通过移动通信网络通信时,可以将预设阈值设置为第一阈值。当电子设备100与翻译服务器通过WiFi与翻译服务器通信时,可以将预设阈值设置为第二阈值。需要说明的是,第一阈值和第二阈值是根据不同网络设置的阈值,第一阈值和第二阈值的大小,在此不作限定。示例的,当电子设备100打开移动通信网络,未打开WiFi网络时,电子设备100可以在移动通信网络的信号强度大于第一阈值时,通过移动通信网络将语音发送给确定的翻译服务器。又示例的,当电子设备100既打开移动通信网络,又打开WiFi网络,当WiFi网络的网络信号强度大于第二阈值时,在一些实施例中,电子设备100采用WiFi网络与翻译服务器通信。从而有助于节省费用。又示例的,当移动通信网络的网络信号强度大于第一阈值、WiFi网络的网络信号强度小于或等于第二阈值时,在一些实施例中,电子设备100采用移动通信网络与翻译服务器通信。从而有助于降低电子设备100和翻译服务器之间的通信时延。It should be noted that, in this embodiment of the present application, the preset threshold may be pre-configured in the electronic device 100, or may be determined by the electronic device 100 according to a pre-configured algorithm. In addition, in the embodiment of the present application, the electronic device 100 may establish communication with the translation server through a mobile communication network (eg, a 4G network, a 5G network, etc.), or may establish communication with the translation server through a WiFi network. In this embodiment of the present application, when the electronic device 100 communicates with the translation server through a mobile communication network, the preset threshold may be set as the first threshold. When the electronic device 100 and the translation server communicate with the translation server through WiFi, the preset threshold may be set as the second threshold. It should be noted that the first threshold and the second threshold are thresholds set according to different networks, and the sizes of the first threshold and the second threshold are not limited here. For example, when the electronic device 100 turns on the mobile communication network but does not turn on the WiFi network, the electronic device 100 may send the voice to the determined translation server through the mobile communication network when the signal strength of the mobile communication network is greater than the first threshold. In another example, when the electronic device 100 opens both the mobile communication network and the WiFi network, when the network signal strength of the WiFi network is greater than the second threshold, in some embodiments, the electronic device 100 uses the WiFi network to communicate with the translation server. Thereby helping to save costs. In another example, when the network signal strength of the mobile communication network is greater than the first threshold and the network signal strength of the WiFi network is less than or equal to the second threshold, in some embodiments, the electronic device 100 uses the mobile communication network to communicate with the translation server. This helps to reduce the communication delay between the electronic device 100 and the translation server.
下面结合图3所示的电子设备100的架构对电子设备100根据网络信号强度确定用于进行语音翻译的设备进行具体说明。The electronic device 100 determines the device used for speech translation according to the network signal strength in detail below with reference to the architecture of the electronic device 100 shown in FIG. 3 .
示例的,电子设备100的主控单元接收到交互模块上报的向用户B发起呼叫的操作或者接收到交互模块上报的输入用户B的电话号码的操作后,向接入单元发送翻译服务接入的通知。需要说明的是,主控单元可以直接向接入单元发送翻译服务接入的通知,也可以通过协调单元将翻译服务接入的通知发送给接入单元等,对此不作限定。接入单元接收到翻译服务接入的通知后,从通信模块获取网络信号强度,并根据网络信号强度,确定用于进行语音翻译的设备。For example, after receiving the operation of initiating a call to user B reported by the interaction module or the operation of inputting the phone number of user B reported by the interaction module, the main control unit of the electronic device 100 sends a translation service access message to the access unit. Notice. It should be noted that the main control unit may directly send a notification of translation service access to the access unit, or may send a notification of translation service access to the access unit through the coordination unit, etc., which is not limited. After receiving the notification of the access of the translation service, the access unit obtains the network signal strength from the communication module, and determines the device used for speech translation according to the network signal strength.
示例的,当电子设备100打开WiFi网络和移动通信网络,电子设备100在通过WiFi网络或移动通信网络向翻译服务器发送语音的情况下,当WiFi网络的网络信号强度小于或者等于第二阈值且移动通信网络的网络信号强度小于等于第一阈值时,确定使用预先配置在电子设备100中的翻译引擎对语音进行翻译。又示例的,电子设备100可以在WiFi网络的网络信号强度大于第二阈值时,确定用于进行语音翻译的设备为翻译服务器。在具体实现时,示例的,电子设备100的接入单元在WiFi网络信号强度大于第二阈值时,获取预先设置的本端语言和对端语言,然后根据本端语言和对端语言,确定用于进行语音翻译的服务器。在一些实施例中,电子设备100可以将预先设置的本端语言和对端语言存储到公共存储空间中,接入单元可以直接从公共存储空间中获取预先设置的本端语言和对端语言,也可以通过主控单元从公共存储空间中获取预先设置的本端语言和对端语言。Exemplarily, when the electronic device 100 turns on the WiFi network and the mobile communication network, and the electronic device 100 sends voice to the translation server through the WiFi network or the mobile communication network, when the network signal strength of the WiFi network is less than or equal to the second threshold and the mobile When the network signal strength of the communication network is less than or equal to the first threshold, it is determined to use the translation engine preconfigured in the electronic device 100 to translate the speech. In another example, the electronic device 100 may determine that the device for performing speech translation is a translation server when the network signal strength of the WiFi network is greater than the second threshold. In specific implementation, for example, when the WiFi network signal strength is greater than the second threshold, the access unit of the electronic device 100 obtains the preset local language and peer language, and then determines the local language and peer language according to the local language and peer language. server for speech translation. In some embodiments, the electronic device 100 may store the preset local language and peer language in the public storage space, and the access unit may directly obtain the preset local language and peer language from the public storage space, The pre-set local language and peer language can also be obtained from the public storage space through the main control unit.
其中,本端语言和对端语言可以是用户预先手动配置的,也可以为电子设备100自动配置的。The local language and the opposite language may be manually configured by the user in advance, or may be automatically configured by the electronic device 100 .
例如,如图4所示,用户A可以通过在用户界面420中的语言设置422设置对端语言。例如,用户B的母语为英语,电子设备100可以响应于用户A对语言设置422的操作,如图 6,在显示屏151显示语言列表600。电子设备100响应于选中“英文”的操作,在语言设置 422中显示英文,并隐藏语言列表600。应理解,用户A可以在语言列表600的区域内通过上下滑动显示不同的语言。还需要说明的是,语言列表600所包括的语言为能够与电子设备 100通信的翻译服务器和/或预先配置在电子设备100中的翻译引擎所支持的语言,可以是电子设备100在出厂之前预先设置在电子设备100中的,也可以为当检测首次检测到存储联系人的操作后,再从翻译服务器中获取。此外,本申请实施例中电子设备100还可以自动对语言设置422的语言进行设置。示例的,电子设备100可以基于存储的用户B的电话号码的归属地,自动设置语言设置422的语言。例如,电子设备100检测到用户B的电话号码的归属地为伦敦,则自动设置将语言设置422设置为英文。又示例的,电子设备100还可以根据用户A与用户B的通话过程中用户B使用的语言对语言设置422进行设置。再示例的,电子设备100还可以将语言设置422设置为预先配置的默认语言,例如默认语言为英文。默认语言可以为电子设备100在出厂之前配置,也可以为用户根据需要设置的。For example, as shown in FIG. 4 , user A may set the peer language through language setting 422 in user interface 420 . For example, the native language of user B is English, and the electronic device 100 may display the language list 600 on the display screen 151 in response to the operation of the language setting 422 by the user A, as shown in FIG. 6 . The electronic device 100 displays English in the language setting 422 and hides the language list 600 in response to the operation of selecting "English". It should be understood that user A can display different languages by sliding up and down in the area of the language list 600 . It should also be noted that the languages included in the language list 600 are the languages supported by the translation server that can communicate with the electronic device 100 and/or the translation engine pre-configured in the electronic device 100, and may be the languages that are pre-configured before the electronic device 100 leaves the factory. What is set in the electronic device 100 may also be obtained from the translation server after the operation of storing the contacts is detected for the first time. In addition, in the embodiment of the present application, the electronic device 100 may also automatically set the language of the language setting 422 . For example, the electronic device 100 may automatically set the language of the language setting 422 based on the stored attribution of user B's phone number. For example, the electronic device 100 detects that the home location of user B's phone number is London, and automatically sets the language setting 422 to English. For another example, the electronic device 100 may further set the language setting 422 according to the language used by the user B during the call between the user A and the user B. As another example, the electronic device 100 may also set the language setting 422 to a pre-configured default language, for example, the default language is English. The default language may be configured by the electronic device 100 before leaving the factory, or may be set by the user as required.
而本申请实施例中涉及的本端语言可以为电子设备100的系统语言。示例的,如图7所示,电子设备100的显示屏151显示用户界面400。用户界面400包括设置图标700。电子设备100响应于对设置图标700的操作,在显示屏151显示系统设置用户界面710。系统设置界面710包括语言与地区711。此外,系统设置界面711还可以包括其它功能的设置按钮,例如开启云备份、屏幕锁定等。电子设备100响应于对语言与地区711的操作,在显示屏151 显示用户界面720。用户界面720包括系统语言设置按钮721。另外,在一些实施例中,用户界面720还可以包括地区设置按钮。电子设备100可以响应于对系统语言设置按钮721的操作,在显示屏151显示用户界面730,用户界面730包括语言列表731。语言列表731包括语言为电子设备100所支持语言。在一些实施例中,为了便于用户从语言列表731所包括的语言中查找用户需要的语言,用户界面730还可以包括搜索框732。例如,电子设备100可以响应于用户A在搜索框732中输入的“简体中文”,从语言列表731所包括的语言中查找到“简体中文”。电子设备100可以响应于从语言列表732选中“简体中文”的操作,将系统语言设置为简体中文。在另一些实施例中,电子设备100还可以根据用户存储的本机号码所属的归属地自动设置。例如,电子设备100检测到本机号码的归属地为北京,则自动将系统语言设置为中文。再例如,电子设备100检测到本机号码的归属地为中国台湾,则自动将系统语言设置为繁体中文。需要说明的是,本申请实施例中用户可以通过在图4所示的用户界面410 上设置本机号码。The local language involved in the embodiments of the present application may be the system language of the electronic device 100 . For example, as shown in FIG. 7 , the display screen 151 of the electronic device 100 displays the user interface 400 . User interface 400 includes settings icon 700 . The electronic device 100 displays a system setting user interface 710 on the display screen 151 in response to the operation of the setting icon 700 . System settings interface 710 includes language and region 711 . In addition, the system setting interface 711 may further include setting buttons for other functions, such as enabling cloud backup, screen locking, and the like. The electronic device 100 displays a user interface 720 on the display screen 151 in response to the operation of the language and region 711 . User interface 720 includes a system language setting button 721 . Additionally, in some embodiments, user interface 720 may also include a locale setting button. The electronic device 100 may display a user interface 730 on the display screen 151 in response to the operation of the system language setting button 721 , and the user interface 730 includes a language list 731 . The language list 731 includes languages supported by the electronic device 100 . In some embodiments, in order to facilitate the user to find the language required by the user from the languages included in the language list 731 , the user interface 730 may further include a search box 732 . For example, the electronic device 100 may find "Simplified Chinese" from the languages included in the language list 731 in response to "Simplified Chinese" input by the user A in the search box 732 . The electronic device 100 may set the system language to Simplified Chinese in response to an operation of selecting "Simplified Chinese" from the language list 732 . In other embodiments, the electronic device 100 may also be automatically set according to the attribution of the local number stored by the user. For example, when the electronic device 100 detects that the home number of the local number is Beijing, it automatically sets the system language to Chinese. For another example, when the electronic device 100 detects that the origin of the local number is Taiwan, China, it automatically sets the system language to traditional Chinese. It should be noted that, in this embodiment of the present application, the user can set the phone number on the user interface 410 shown in FIG. 4 .
此外,在一些实施例中,用户界面430上还可以包括语音翻译按钮431。从而有助于进一步简化用户的操作。例如,电子设备100还可以响应于对语音翻译按钮431的操作,在显示屏151显示用户界面800。其中,用户界面800包括本端语言设置803和对端语言设置802。电子设备100可以响应于用户A对本端语言设置803的操作,来设置本端语言,响应于用户 A对对端语言设置802的操作,来设置对端语言。电子设备100响应于用户A对本端语言设置803的操作设置本端语言、以及响应于用户A对对端语言设置802的操作设置对端语言的具体实现方式,可以参见电子设备100响应于用户A对用户界面420上的语言设置422的操作,实现设置语言的方式,在此不再赘述。此外,本申请实施例中电子设备100还可以自动对本端语言设置803和对端语言设置802进行语言设置。例如,电子设备100可以响应于向用户B拨打电话的操作,自动将本端语言设置803设置为系统语言,以及自动将对端语言设置802设置为用户界面420中语言设置422所设置的语言。又例如,电子设备100还可以基于本机号码的归属地对本端语言设置803进行语言设置。具体实现方式可参见上述系统语言的自动设置方式。又例如,电子设备100还可以根据电子设备100接入的移动通信网络所在的归属地,对本端语言设置803进行语言设置。例如,电子设备100接入的移动通信网络为中国移动,则自动将本端语言设置为中文。再例如,电子设备100还可以基于用户B的电话号码的归属地对对端语言设置802进行语言设置。又例如,电子设备100还可以根据本机号码和向用户B发起呼叫时所使用的电话号码,获取最近一次用户A与用户B的通话记录,将本端语言设置803设置为通话记录中用户A所使用的语言,将对端语言设置802为通话记录中用户B所使用的语言。又例如,电子设备100还可以根据电子设备200接入的通信网络所在的归属地,对对端语言设置803进行语言设置。例如,电子设备100获取到电子设备200 接入的通信网络所在的归属地为美国,则自动将对端语言设置为英文。Additionally, in some embodiments, a voice translation button 431 may also be included on the user interface 430 . This helps to further simplify the user's operation. For example, the electronic device 100 may also display the user interface 800 on the display screen 151 in response to the operation of the voice translation button 431 . The user interface 800 includes local language settings 803 and peer language settings 802 . The electronic device 100 can set the local language in response to the operation of the local language setting 803 by the user A, and set the peer language in response to the operation of the peer language setting 802 by the user A. For the specific implementation of the electronic device 100 setting the local language in response to the user A's operation on the local language setting 803 and setting the peer language in response to the user A's operation on the peer language setting 802, please refer to the electronic device 100's response to the user A. The operation of the language setting 422 on the user interface 420 implements the manner of setting the language, which will not be repeated here. In addition, in the embodiment of the present application, the electronic device 100 may also automatically perform language settings for the local language setting 803 and the opposite end language setting 802 . For example, the electronic device 100 may automatically set the local language setting 803 to the system language, and automatically set the opposite end language setting 802 to the language set by the language setting 422 in the user interface 420 in response to the operation of dialing a call to user B. For another example, the electronic device 100 may further perform language setting for the local language setting 803 based on the attribution of the local number. For a specific implementation method, refer to the above-mentioned automatic setting method of the system language. For another example, the electronic device 100 may also perform language setting for the local language setting 803 according to the home location of the mobile communication network accessed by the electronic device 100 . For example, if the mobile communication network accessed by the electronic device 100 is China Mobile, the local language is automatically set to Chinese. For another example, the electronic device 100 may further perform language setting on the peer language setting 802 based on the attribution of user B's phone number. For another example, the electronic device 100 can also obtain the most recent call record between user A and user B according to the local number and the phone number used to initiate a call to user B, and set the local language setting 803 to user A in the call record. For the language used, the peer language is set 802 as the language used by user B in the call record. For another example, the electronic device 100 may also perform language setting for the peer language setting 803 according to the home location of the communication network accessed by the electronic device 200 . For example, if the electronic device 100 obtains that the home location of the communication network accessed by the electronic device 200 is located in the United States, it will automatically set the opposite end language to English.
需要说明的是,为了保证自动确定的本端语言和对端语言的可靠性,在一些实施例中,电子设备100的主控单元可以响应于选中用户B或者输入用户B的电话号码的操作,向接入单元发送语言设置通知。接入单元接收到语言设置通知后,获取与用户B的通话记录。并根据与用户B的通话记录,对本端语言设置803和对端语言设置802进行相应的设置。接入单元若未获取到与用户B的通话记录,则可以通过通信模块获取用户B电话号码的归属地和用户A的电话号码的归属地,并基于用户B的电话号码的归属地对对端语言设置802进行设置,以及基于用户A的电话号码的归属地对本端语言设置803进行设置。应理解,接入单元若未获取到与用户B的通话记录时,还可以基于系统语言对本端语言设置803进行设置。接入单元若无法获取到用户B电话号码的归属地,也可以将对端语言设置802设置为默认语言。需要说明的是,接入单元若无法获取到用户B电话号码的归属地时,还可以向主控单元发送自动设置对端语言设置803失败的通知。主控单元接收到自动设置对端语言设置803失败的通知后,提示用户手动对端语言设置803进行设置。例如,主控单元可以通过触发显示屏151显示提示信息,来提示用户手动对端语言设置803进行设置。又例如,主控单元还可以通过触发播报模块播放用户手动对端语言设置803进行设置的提示信息来提示用户。本申请实施例对提示用户手动对端语言设置803进行设置的方式不作限定。It should be noted that, in order to ensure the reliability of the automatically determined local language and peer language, in some embodiments, the main control unit of the electronic device 100 may respond to the operation of selecting user B or inputting the phone number of user B, Send language setting notification to access unit. After receiving the language setting notification, the access unit acquires the call record with user B. And according to the call record with the user B, the local language setting 803 and the opposite end language setting 802 are set correspondingly. If the access unit does not obtain the call record with user B, it can obtain the attribution of user B's phone number and the attribution of user A's phone number through the communication module, and based on the attribution of user B's phone number to the peer The language setting 802 is set, and the local language setting 803 is set based on the attribution of user A's phone number. It should be understood that, if the access unit has not acquired the call record with user B, the local language setting 803 may also be set based on the system language. If the access unit cannot obtain the attribution of user B's phone number, the peer language setting 802 may also be set as the default language. It should be noted that, if the access unit cannot obtain the attribution of user B's phone number, it may also send a notification to the main control unit that the automatic setting of the peer language setting 803 fails. After receiving the notification that the automatic setting of the peer language setting 803 fails, the main control unit prompts the user to manually set the peer language setting 803 . For example, the main control unit may prompt the user to manually set the terminal language setting 803 by triggering the display screen 151 to display prompt information. For another example, the main control unit may also prompt the user by triggering the broadcasting module to play the prompt information that the user manually sets the terminal language setting 803 . This embodiment of the present application does not limit the manner of prompting the user to manually set the terminal language setting 803 .
还需要说明的是,为了便于用户查找,本申请实施例中本端语言设置803和对端语言设置802还可以设置在用户界面430上。It should also be noted that, in order to facilitate user search, the local language setting 803 and the opposite end language setting 802 in this embodiment of the present application may also be set on the user interface 430 .
当本端语言和对端语言相同时,电子设备100可以无需对语音进行翻译操作,在一些实施例中,电子设备100可以在本端语言和对端语言相同时,直接向电子设备200发送电子设备100采集的用户A的语音,电子设备100接收到电子设备200发送的用户B的语音,播放用户B的语音。从而有助于提高简化电子设备100的处理方式。电子设备100可以在本端语言和对端语言不同时,自动开启语音通话翻译功能,执行用户A的语音和用户B的语音的翻译过程。When the local language and the peer language are the same, the electronic device 100 may not need to perform translation operations on the speech. In some embodiments, the electronic device 100 may directly send the electronic device 200 the electronic device 200 when the local language and the peer language are the same. The voice of user A collected by the device 100, the electronic device 100 receives the voice of user B sent by the electronic device 200, and plays the voice of user B. Therefore, the processing method of the electronic device 100 is improved and simplified. The electronic device 100 can automatically enable the voice call translation function when the local language and the opposite end language are different, and perform the translation process of user A's voice and user B's voice.
例如。接入单元在自动设置本端语言和对端语言、或者获取到用户设置的本端语言和对端语言后,若检测到本端语言和对端语言不同,则执行确定用于进行语音翻译的服务器的过程。具体的,接入单元执行确定用于进行语音翻译的服务器的过程可参见上述实施例,在此不再赘述。接入单元若检测到本端语言和对端语言相同,则无需执行确定用于进行语音翻译的服务器的过程。E.g. After the access unit automatically sets the local language and the peer language, or obtains the local language and the peer language set by the user, if it detects that the local language and the peer language are different, it executes the determination method for speech translation. server process. Specifically, the process of determining the server for speech translation performed by the access unit may refer to the foregoing embodiments, and details are not described herein again. If the access unit detects that the language of the local end and the language of the opposite end are the same, there is no need to perform the process of determining a server for speech translation.
为了提高用户体验,在另一些实施例中,电子设备100接收到电子设备200发送的用户 B的语音后,还播报用户B的语音。例如,电子设备100预先设置的本端语言为简体中文,对端语言为英文,若用户B使用电子设备200向电子设备100发送的语音为“Hello,Thisis Mike speaking.”,则电子设备100接收到“Hello,This is Mike speaking.”后,向用户A播报“Hello,This is Mike speaking.”,并在获取到“Hello,This is Mike speaking.”的翻译结果“你好,我是麦克”后,向用户A播报“你好,我是麦克”。在一些实施例中,电子设备 100还播报用户A的语音的翻译结果。例如,电子设备100采集的用户A的语音为“你好,我想买张机票。”,则在获取到“你好,我想买张机票。”的翻译结果“Hello,I want to buy aticket.”后,不仅要将翻译结果“Hello,I want to buy a ticket.”发送给电子设备200,而且向用户A播报用户A的语音的翻译结果“Hello,I want to buy a ticket.”此外,在一些实施例中,电子设备100还可以将采集的用户A的语音发送给电子设备200。电子设备200接收到电子设备100发送的用户A语音后,播报用户A的语音。电子设备200在接收到电子设备 100发送的用户A的语音的翻译结果后,播报用户A的语音翻译结果。在另一些实施例中,电子设备100还可以将用户B的语音的翻译结果发送给电子设备200。电子设备200在接收到用户B的语音的翻译结果后,还可以播报用户B的语音的翻译结果。In order to improve user experience, in other embodiments, after receiving the voice of user B sent by the electronic device 200, the electronic device 100 also broadcasts the voice of user B. For example, the local language preset by the electronic device 100 is simplified Chinese and the opposite language is English. If the voice sent by user B to the electronic device 100 using the electronic device 200 is "Hello, Thisis Mike speaking.", the electronic device 100 receives After reaching "Hello, This is Mike speaking.", broadcast "Hello, This is Mike speaking." to user A, and obtain the translation result of "Hello, This is Mike speaking." "Hello, I am Mike" Then, broadcast "Hello, I'm Mike" to user A. In some embodiments, the electronic device 100 also broadcasts the translation result of User A's speech. For example, if the voice of user A collected by the electronic device 100 is "Hello, I want to buy a ticket.", the translation result of "Hello, I want to buy a ticket." is obtained as "Hello, I want to buy ticket." .", not only the translation result "Hello, I want to buy a ticket." is sent to the electronic device 200, but also the translation result "Hello, I want to buy a ticket." of user A's voice is broadcast to user A. In addition , in some embodiments, the electronic device 100 may also send the collected voice of the user A to the electronic device 200 . After receiving the voice of user A sent by the electronic device 100, the electronic device 200 broadcasts the voice of user A. After receiving the translation result of user A's speech sent by electronic device 100, electronic device 200 broadcasts the translation result of user A's speech. In other embodiments, the electronic device 100 may also send the translation result of user B's speech to the electronic device 200 . After receiving the translation result of user B's speech, the electronic device 200 may also broadcast the translation result of user B's speech.
当电子设备100接收到电子设备200发送的用户B的语音时,直接播报用户B的语音,在这种情况下若电子设备100接收到用户A的语音翻译结果,播报用户A的语音的翻译结果,则会导致用户B的语音的播报和用户A的语音的翻译结果的播报重叠。而当电子设备100采集到用户A的语音时,若接收到用户A的语音的翻译结果,在这种情况下,播报模块播报用户A的语音翻译结果有可能导致播报的语音所表达的意思是不完整的。When the electronic device 100 receives the voice of user B sent by the electronic device 200, it directly broadcasts the voice of user B. In this case, if the electronic device 100 receives the voice translation result of user A, it broadcasts the translation result of user A's voice. , the broadcast of user B's voice and the broadcast of the translation result of user A's voice will overlap. When the electronic device 100 collects the voice of user A, if the translation result of user A's voice is received, in this case, the broadcasting module broadcasting the translation result of user A's voice may cause the meaning expressed by the broadcasting voice to be incomplete.
因此,在一些实施例中,电子设备100在接收到语音的翻译结果后,若检测到无语音输入,则播报接收到的语音的翻译结果。在另一些实施例中,电子设备100若检测到当前有语音输入,则等待检测到无语音输入时,播报接收到的语音的翻译结果。从而有助于降低与播报用户B的语音发生冲突的可能性,以及降低播报的用户A的语音的翻译结果不完整的可能性。此外,在另一些实施例中,电子设备100在接收到的翻译结果为用户A的语音的翻译结果时,则在检测到无语音输入时,向电子设备200发送用户A的语音的翻译结果。从而有助于降低电子设备200语音播报重叠的可能性。Therefore, in some embodiments, after receiving the translation result of the speech, the electronic device 100 broadcasts the translation result of the received speech if no speech input is detected. In other embodiments, if the electronic device 100 detects that there is currently a voice input, it will broadcast the translation result of the received voice when no voice input is detected. Therefore, it helps to reduce the possibility of conflict with the broadcast user B's voice, and reduce the possibility that the translation result of the broadcast user A's voice is incomplete. In addition, in other embodiments, when the received translation result is the translation result of user A's speech, the electronic device 100 sends the translation result of user A's speech to the electronic device 200 when no speech input is detected. This helps to reduce the possibility of overlapping voice broadcasts of the electronic device 200 .
需要说明的是,电子设备100检测到语音输入包括两种情况:一种是电子设备100的语音采集模块采集到用户A的语音,另一种是电子设备100的通信模块接收到电子设备200采集的用户B的语音。当电子设备100检测到未有语音输入时,本申请实施例中指的是电子设备100的语音采集模块未采集到用户A的语音、且通信模块未接收到电子设备200采集的用户B的语音。It should be noted that, the electronic device 100 detects the voice input in two cases: one is that the voice acquisition module of the electronic device 100 collects the voice of user A, and the other is that the communication module of the electronic device 100 receives the voice collected by the electronic device 200 user B's voice. When the electronic device 100 detects that there is no voice input, the embodiment of the present application refers to that the voice collection module of the electronic device 100 has not collected the voice of user A, and the communication module has not received the voice of user B collected by the electronic device 200 .
下面以图3所示的电子设备100的架构对本申请实施例中播报语音以及语音翻译结果的方式进行详细介绍。The manner of broadcasting the voice and the voice translation result in the embodiment of the present application will be described in detail below with reference to the structure of the electronic device 100 shown in FIG. 3 .
如图9所示,电子设备100首先获取语音。例如,电子设备100可以通过语音采集模块获取用户A的语音,也可以通过通信模块接收用户B的语音,然后通过接入单元将获取的语音发送给通信模块,再由通信模块将语音上报到翻译服务器,然后由翻译服务器对语音进行翻译,并将翻译结果返回给通信模块,最后通过播报模块播报语音的翻译结果。为了保证语音获取和语音播报的节奏,在一些实施例中,电子设备100可以根据语音获取的情况和语音翻译情况,通过协同语音的获取情况和语音翻译的情况来对语音的获取和翻译结果的播报进行控制。As shown in FIG. 9 , the electronic device 100 first acquires the voice. For example, the electronic device 100 can obtain the voice of user A through the voice acquisition module, and can also receive the voice of user B through the communication module, and then sends the obtained voice to the communication module through the access unit, and then the communication module reports the voice to the translator. The server, and then the translation server translates the speech, returns the translation result to the communication module, and finally broadcasts the translation result of the speech through the broadcasting module. In order to ensure the rhythm of voice acquisition and voice broadcast, in some embodiments, the electronic device 100 may, according to the voice acquisition situation and the voice translation situation, coordinate the voice acquisition situation and the voice translation situation to determine the voice acquisition and translation results. broadcast control.
下面对用户A的语音的翻译结果的播报的控制方式进行具体介绍。The control method for the broadcast of the translation result of the user A's speech will be described in detail below.
主控单元在检测电子设备200接听电子设备100发起的向用户B的呼叫后,通知语音检测单元监听语音采集模块是否采集到用户A的语音,以及监听通信模块是否接收到用户B的语音。本申请实施例中,语音检测单元可以实时将语音检测结果上报给协调单元,也可以每隔预设时长将语音检测结果上报给协调单元,还可以当监听到语音采集模块未采集到用户A 的语音、通信模块未接收到用户B的语音时,向协调单元发送语音检测结果。After detecting that the electronic device 200 answers the call to user B initiated by the electronic device 100, the main control unit notifies the voice detection unit to monitor whether the voice acquisition module has collected the voice of user A, and whether the communication module has received the voice of user B. In the embodiment of the present application, the voice detection unit may report the voice detection result to the coordination unit in real time, or may report the voice detection result to the coordination unit at preset time intervals, and may also monitor that the voice acquisition module has not collected user A's data. When the voice and communication module does not receive the voice of user B, it sends the voice detection result to the coordination unit.
语音采集模块将采集的用户A的语音发送给本端翻译单元。由本端翻译单元将用户A的语音发送给接入单元,然后接入单元通过通信模块将用户A的语音发送给翻译服务器。翻译服务器对用户A的语音进行翻译后,将用户A的语音的翻译结果返回给电子设备100。电子设备100由通信模块接收翻译服务器发送的用户A的语音的翻译结果,并在通信模块接收到用户A的语音的翻译结果后,通过接入单元将用户A的语音的翻译结果发送给本端翻译单元,由本端翻译单元保存用户A的语音的翻译结果。例如,本端翻译单元可以将用户A的语音的翻译结果保存到预先设置的第一队列中。The voice collection module sends the collected voice of user A to the local translation unit. The local translation unit sends the voice of user A to the access unit, and then the access unit sends the voice of user A to the translation server through the communication module. After the translation server translates the user A's speech, it returns the translation result of the user A's speech to the electronic device 100 . The electronic device 100 receives the translation result of user A's speech sent by the translation server by the communication module, and after the communication module receives the translation result of user A's speech, sends the translation result of user A's speech to the local end through the access unit The translation unit, where the translation result of user A's speech is stored by the local translation unit. For example, the local translation unit may save the translation result of user A's speech into a preset first queue.
本端翻译单元在接收到用户A的语音的翻译结果后,向协调单元上报本端语音翻译结果通知,协调单元接收到本端语音翻译结果通知后,若根据语音检测单元上报的语音检测结果确定没有语音输入,则向播报控制单元发送允许播报语音翻译结果的通知。应理解,本申请实施例中协调单元可以直接向播报控制单元发送允许播报语音翻译结果的通知,也可以通过主控单元将允许播报语音翻译结果的通知发送给播报控制单元。After receiving the translation result of user A's voice, the local translation unit reports the local end speech translation result notification to the coordination unit. If there is no voice input, a notification is sent to the announcement control unit allowing announcement of the result of the speech translation. It should be understood that, in this embodiment of the present application, the coordination unit may directly send a notification of allowing the broadcast of the voice translation result to the broadcast control unit, or may send the notification of allowing the broadcast of the voice translation result to the broadcast control unit through the main control unit.
播报控制单元接收到允许播报语音翻译结果的通知后,通知播报模块获取用户A的语音翻译结果进行播报。此外,协调单元若根据语音检测单元上报的语音检测结果确定没有语音输入,还通知通信模块向电子设备200发送用户A的语音的翻译结果。After the broadcast control unit receives the notification of permission to broadcast the speech translation result, it notifies the broadcast module to obtain the speech translation result of user A and broadcast it. In addition, if the coordination unit determines that there is no voice input according to the voice detection result reported by the voice detection unit, it also notifies the communication module to send the translation result of user A's voice to the electronic device 200 .
协调单元当接收到本端语音翻译结果通知后,若根据语音检测单元上报的语音检测结果确定有语音输入,则向播报控制单元发送暂停播报翻译结果的通知。从而使得播报控制单元可以实现对播报模块对语音的翻译结果进行播报的控制。本申请实施例中,协调单元若根据语音检测单元上报的语音检测结果确定有语音输入,可以不向播报控制单元发送通知,在协调单元根据语音检测单元上报的语音检测结果确定没有语音输入后,再向播报控制单元发送允许播报语音翻译结果的通知。此外,协调单元若根据语音检测单元上报的语音检测结果确定监听到语音输入时,通信模块不向电子设备200发送用户A的语音的翻译结果。例如,协调单元可以通过向通信模块发送暂停向电子设备200发送本端语音翻译结果的通知来实现通信模块不向电子设备200发送用户A的语音的翻译结果。又例如,通信模块还可以在未接收到允许向电子设备200发送本端语音翻译结果的通知时,不向电子设备200发送用户A的语音的翻译结果。When the coordination unit receives the notification of the local end's voice translation result, if it is determined that there is a voice input according to the voice detection result reported by the voice detection unit, it sends a notification to the broadcast control unit to suspend the broadcast of the translation result. Therefore, the broadcast control unit can realize the control of broadcast of the translation result of the speech by the broadcast module. In the embodiment of the present application, if the coordination unit determines that there is voice input according to the voice detection result reported by the voice detection unit, it may not send a notification to the broadcast control unit. After the coordination unit determines that there is no voice input according to the voice detection result reported by the voice detection unit, Then send a notification to the broadcast control unit to allow the broadcast of the speech translation result. In addition, if the coordination unit determines that the voice input is monitored according to the voice detection result reported by the voice detection unit, the communication module does not send the translation result of user A's voice to the electronic device 200 . For example, the coordination unit may send a notification to the communication module to suspend sending the local-end speech translation result to the electronic device 200 so that the communication module does not send the translation result of user A's speech to the electronic device 200 . For another example, the communication module may also not send the translation result of user A's voice to the electronic device 200 when the notification that allows sending the local-end voice translation result to the electronic device 200 is not received.
此外,电子设备100当通过翻译服务器实现用户A的语音翻译时,有可能会由于网络信号或者语速的原因,导致电子设备100可能无法获取到用户A的语音的翻译结果。例如若电子设备100与翻译服务器之间是通过网络建立通信连接的,有可能会由于网络信号较差时,会导致电子设备100无法将用户A的语音上传到翻译服务器,也有可能导致翻译服务器无法将用户A的语音的翻译结果及时返回给电子设备100。In addition, when the electronic device 100 implements user A's speech translation through the translation server, the electronic device 100 may not be able to obtain the translation result of user A's speech due to network signals or speech speed. For example, if the communication connection between the electronic device 100 and the translation server is established through the network, the electronic device 100 may not be able to upload the voice of user A to the translation server due to the poor network signal, or the translation server may not be able to The translation result of user A's speech is returned to the electronic device 100 in time.
在另一些实施例中,电子设备100当检测到有用户A的语音输入时,若第一时长内未接收到用户A的语音的翻译结果,获取当前电子设备100的网络信号强度,该网络信号强度为电子设备100用于与翻译服务器通信的网络的信号强度,该翻译服务器用于对用户A的语音进行翻译。需要说明的是,第一时长可以预先配置在电子设备100中,也可以由电子设备100 根据预设算法确定。以电子设备100用于与翻译服务器通信的网络为移动通信网络为例。若网络信号强度小于或等于第一阈值,则电子设备100切换到预先配置在电子设备100中的翻译引擎中进行语音翻译,切换到网络信号好的服务小区,或者提示用户切换网络,如在电子设备100预先配置有至少两个SIM卡分别使用不同的移动通信网络时,自动切换到另一移动通信网络,使用另一移动通信网络与翻译服务器通信,或者在电子设备100打开WiFi网络时,自动切换到WiFi网络信号强度大于第二阈值的WiFi网络等。因而,通过上述技术方案有助于降低因网络信号变差导致语音翻译受阻的可能性。在一些实施例中,当移动通信网络的网络信号强度大于第一阈值或WiFi网络信号强度大于第二阈值,则电子设备100提示用户A 放慢语速。示例的,如图10所示,电子设备100可以通过在显示屏151上显示提示信息1000,来提示用户降低语速。例如,提示信息900可以为“请放慢语速”等。又示例的,电子设备 100还可以在检测到电子设备100黑屏时,通过播放提示音来提示用户A放慢语速。例如提示音可以为“滴滴”的提示音,也可以为“请放慢语速”的语音等。该提示音可以预先配置在电子设备100中。因而,通过上述技术方案,有助于降低因用户语速过快导致翻译紊乱的可能性。In other embodiments, when the electronic device 100 detects user A's voice input, if the translation result of user A's voice is not received within the first time period, the electronic device 100 obtains the current network signal strength of the electronic device 100, and the network signal The strength is the signal strength of the network used by the electronic device 100 to communicate with the translation server, where the translation server is used to translate the user A's speech. It should be noted that, the first duration may be pre-configured in the electronic device 100, or may be determined by the electronic device 100 according to a preset algorithm. It is assumed that the network used by the electronic device 100 to communicate with the translation server is a mobile communication network as an example. If the network signal strength is less than or equal to the first threshold, the electronic device 100 switches to the translation engine pre-configured in the electronic device 100 to perform voice translation, switches to a serving cell with a good network signal, or prompts the user to switch networks, such as in the electronic device 100 When the device 100 is preconfigured with at least two SIM cards using different mobile communication networks, it automatically switches to another mobile communication network and uses another mobile communication network to communicate with the translation server, or when the electronic device 100 opens the WiFi network, automatically switches to another mobile communication network. Switch to a WiFi network whose signal strength is greater than the second threshold, etc. Therefore, the above-mentioned technical solution helps to reduce the possibility that the speech translation is blocked due to the deterioration of the network signal. In some embodiments, when the network signal strength of the mobile communication network is greater than the first threshold or the WiFi network signal strength is greater than the second threshold, the electronic device 100 prompts the user A to slow down the speech rate. For example, as shown in FIG. 10 , the electronic device 100 may prompt the user to reduce the speech rate by displaying prompt information 1000 on the display screen 151 . For example, the prompt information 900 may be "please speak slowly" or the like. In another example, the electronic device 100 may also prompt the user A to slow down the speech rate by playing a prompt sound when detecting that the screen of the electronic device 100 is black. For example, the prompt sound may be the prompt sound of "DiDi", or the voice of "Please slow down". The prompt tone may be preconfigured in the electronic device 100 . Therefore, the above technical solution helps to reduce the possibility of translation disorder caused by the user speaking too fast.
在具体实现时,在一些示例中,电子设备100的协调单元若根据接收到语音检测单元上报的语音检测结果确定语音采集模块有语音输入,但是协调单元若预设的第一时长内未接收到本端语音翻译结果的通知,则协调单元向接入单元发送网络信号强度检测的通知。接入单元接收到网络信号强度检测的通知后,从通信模块获取网络信号强度。应理解,接入单元从通信模块获取的网络信号强度为电子设备100用于与翻译服务器通信的网络的信号强度。该翻译服务器用于对用户A的语音进行翻译。以电子设备100用于与翻译服务器通信的网络为移动通信网络为例,若网络信号强度大于第一阈值,则向协调单元发送网络正常的通知,协调单元接收到网络正常的通知后,向主控单元发送提示用户A降低语速的通知。主控单元接收到提示用户A降低语速的通知后,向用户A提示降低语速。接入单元当从通信模块获取的网络信号强度不大于第一阈值时,可以向协调单元发送网络异常的通知,然后协调单元将网络异常的通知发送给主控单元。主控单元在接收到网络异常的通知后,提示用户切换网络,或者自动切换网络。例如,主控单元可以通过显示屏151在显示当前网络异常,提示用户切换网络的信息。另外,在一些实施例中,接入单元当从通信模块获取的网络信号强度不大于第一阈值时,还可以自动将语音翻译服务切换到预先配置在电子设备100中的翻译引擎上。当接入单元检测到网络正常后,还可以重新切换到翻译服务器上进行语音翻译。During specific implementation, in some examples, if the coordination unit of the electronic device 100 determines that the voice acquisition module has voice input according to the voice detection result reported by the voice detection unit, but if the coordination unit does not receive a voice input within the preset first time period Notification of the local end's voice translation result, the coordination unit sends a notification of network signal strength detection to the access unit. After receiving the notification of network signal strength detection, the access unit acquires the network signal strength from the communication module. It should be understood that the network signal strength obtained by the access unit from the communication module is the signal strength of the network used by the electronic device 100 to communicate with the translation server. The translation server is used to translate user A's speech. Taking the network used by the electronic device 100 for communication with the translation server to be a mobile communication network as an example, if the network signal strength is greater than the first threshold, a notification that the network is normal is sent to the coordination unit. The control unit sends a notification prompting user A to reduce the speaking rate. After receiving the notification prompting user A to reduce the speaking rate, the main control unit prompts user A to reduce the speaking rate. When the network signal strength obtained from the communication module is not greater than the first threshold, the access unit may send a notification of network abnormality to the coordination unit, and then the coordination unit sends the notification of network abnormality to the main control unit. After receiving the notification of network abnormality, the main control unit prompts the user to switch the network, or automatically switches the network. For example, the main control unit may display the current network abnormality through the display screen 151 to prompt the user to switch the network information. In addition, in some embodiments, when the network signal strength obtained from the communication module is not greater than the first threshold, the access unit may also automatically switch the speech translation service to the translation engine preconfigured in the electronic device 100 . When the access unit detects that the network is normal, it can also switch to the translation server again for voice translation.
电子设备100当检测到长时间内无语音输入,但接收到用户A的语音的翻译结果时,也有可能是因为网络信号强度较差或者用户语速过快导致的。因此,在一些实施例中,电子设备100当检测到第二时长内无语音输入,但接收到用户A的语音的翻译结果时,获取当前电子设备100的网络信号强度,该网络信号强度为电子设备100用于与翻译服务器通信的网络的信号强度,该翻译服务器用于对用户A的语音进行翻译。具体的,电子设备100根据网络信号强度实现协调的方式,可以参见电子设备100当检测到有用户A的语音输入、第一时长内未接收到用户A的语音的翻译结果时,电子设备100根据网络信号强度实现协调的方式。When the electronic device 100 detects that there is no voice input for a long time, but receives the translation result of user A's voice, it may also be caused by poor network signal strength or the user speaking too fast. Therefore, in some embodiments, the electronic device 100 acquires the current network signal strength of the electronic device 100 when it detects that there is no voice input within the second time period, but receives the translation result of user A's voice, where the network signal strength is electronic The signal strength of the network used by the device 100 to communicate with the translation server for translating the user A's speech. Specifically, for the manner in which the electronic device 100 achieves coordination according to the network signal strength, see that when the electronic device 100 detects that the user A's voice is input and the translation result of the user A's voice is not received within the first time period, the electronic device 100 will The way network signal strength is coordinated.
在具体实现时,在一些实施例中,电子设备100的协调单元若根据语音检测单元上报的语音检测结果确定第二时长内语音采集模块未有语音输入,但是协调单元接收到本端语音翻译结果的通知,则协调单元向接入单元发送网络信号强度检测的通知。接入单元接收到网络信号强度检测的通知后的后续执行步骤,可以参见协调单元在语音采集模块有语音输入、但预设的第一时长内未接收到本端语音翻译结果的通知的情况下,接入单元接收到网络信号强度检测的通知后的后续执行步骤,在此不再赘述。In specific implementation, in some embodiments, if the coordination unit of the electronic device 100 determines that the speech acquisition module has no speech input within the second time period according to the speech detection result reported by the speech detection unit, but the coordination unit receives the local end speech translation result notification, the coordination unit sends a notification of network signal strength detection to the access unit. For the subsequent execution steps after the access unit receives the notification of network signal strength detection, please refer to the case where the coordination unit has voice input from the voice acquisition module, but does not receive the notification of the local end's voice translation result within the preset first time period , the subsequent execution steps after the access unit receives the notification of the network signal strength detection will not be repeated here.
需要说明的是,当电子设备100缓存的用户A的语音的翻译结果的数量超过预设数量时,则无需考虑电子设备100当前是否采集到用户A的语音或者接收到用户B的语音,直接播报用户A的语音的翻译结果。从而有助于避免电子设备100缓存的用户A的语音翻译结果溢出,造成信息的丢失。例如,第一队列用于缓存用户A的语音的翻译结果,预设数量为第一队列的最大能够存储翻译结果的数量。示例的,在具体实现时,本端翻译单元当检测到缓存的用户A的语音的翻译结果的数量超过预设数量时,向协调单元发送优先播报翻译结果的通知。协调单元接收到优先播报本端语音翻译结果的通知后,向播报控制单元发送播报本端语音翻译结果的通知,使得播报模块播报用户A的语音的翻译结果。It should be noted that when the number of translation results of user A's voice cached by the electronic device 100 exceeds the preset number, it is not necessary to consider whether the electronic device 100 currently collects the voice of user A or receives the voice of user B, and directly broadcasts the result. The translation result of user A's speech. This helps to avoid overflow of the voice translation result of user A cached by the electronic device 100, resulting in loss of information. For example, the first queue is used to cache the translation results of user A's speech, and the preset number is the maximum number of translation results that can be stored in the first queue. For example, in specific implementation, when the local translation unit detects that the number of buffered translation results of user A's speech exceeds a preset number, it sends a notification to the coordination unit to broadcast the translation results preferentially. After receiving the notification that the local end voice translation result is preferentially broadcast, the coordination unit sends a notification to the broadcast control unit to broadcast the local end speech translation result, so that the broadcast module broadcasts the translation result of user A's speech.
下面对用户B的语音的翻译结果的播报的控制方式进行具体介绍。The control method for the broadcast of the translation result of the user B's speech will be specifically introduced below.
通信模块用于接收电子设备200采集的用户B的语音,并将接收到的电子设备200采集的用户B的语音发送给对端翻译单元。由对端翻译单元将用户B的语音发送给接入单元。然后接入单元通过通信模块将用户B的语音发送给翻译服务器。翻译服务器对用户B的语音进行翻译后,将翻译结果返回给电子设备100。电子设备100由通信模块接收翻译服务器发送的用户B的语音翻译结果,并在通信模块接收到用户B的语音的翻译结果后,通过接入单元将用户B的语音的翻译结果发送给对端翻译单元。由对端翻译单元保存用户B的语音的翻译结果。例如,对端翻译单元可以将用户B的语音的翻译结果保存到预先设置的第二队列中。The communication module is configured to receive the voice of the user B collected by the electronic device 200, and send the received voice of the user B collected by the electronic device 200 to the peer translation unit. The translation unit of the opposite end sends the voice of user B to the access unit. Then the access unit sends the voice of user B to the translation server through the communication module. After the translation server translates the speech of user B, the translation result is returned to the electronic device 100 . The electronic device 100 receives the voice translation result of user B sent by the translation server by the communication module, and after the communication module receives the translation result of user B's voice, sends the translation result of user B's voice to the peer translation through the access unit. unit. The translation result of user B's speech is stored by the peer translation unit. For example, the peer translation unit may save the translation result of user B's speech into a preset second queue.
对端翻译单元在接收到用户B的语音的翻译结果后,向协调单元上报对端语音翻译结果通知,协调单元接收到对端语音翻译结果通知后,若根据语音检测单元上报的语音检测结果确定没有语音输入,则向播报控制单元发送允许播报语音翻译结果的通知。应理解,本申请实施例中协调单元可以直接向播报控制单元发送允许播报语音翻译结果的通知,也可以通过主控单元将允许播报语音翻译结果的通知发送给播报控制单元。After receiving the translation result of user B's voice, the peer translation unit reports the peer translation result notification to the coordination unit. If there is no voice input, a notification is sent to the announcement control unit allowing announcement of the result of the speech translation. It should be understood that, in this embodiment of the present application, the coordination unit may directly send a notification of allowing the broadcast of the voice translation result to the broadcast control unit, or may send the notification of allowing the broadcast of the voice translation result to the broadcast control unit through the main control unit.
播报控制单元接收到允许播报语音翻译结果的通知后,通知播报模块获取用户B的语音翻译结果进行播报。此外,协调单元若根据语音检测单元上报的语音检测结果确定没有语音输入,还通知通信模块向电子设备200发送用户B的语音的翻译结果。After the broadcast control unit receives the notification that the speech translation result is allowed to be broadcast, it notifies the broadcast module to obtain the speech translation result of user B and broadcast it. In addition, if the coordination unit determines that there is no voice input according to the voice detection result reported by the voice detection unit, it also notifies the communication module to send the translation result of user B's voice to the electronic device 200 .
协调单元当接收到对端语音翻译结果通知后,若根据语音检测单元上报的语音检测结果确定有语音输入,则向播报控制单元发送暂停播报翻译结果的通知。从而使得播报控制单元可以实现对播报模块对语音的翻译结果进行播报的控制。本申请实施例中,协调单元若根据语音检测单元上报的语音检测结果确定有语音输入,可以不向播报控制单元发送通知,再协调单元根据语音检测单元上报的语音检测结果确定没有到语音输入后,再向播报控制单元发送允许播报语音翻译结果的通知。此外,在一些实施例中,协调单元还可以当根据语音检测单元上报的语音检测结果确定有语音输入时,通信模块不向电子设备200发送用户A的语音的翻译结果。例如,协调单元可以通过向通信模块发送暂停向电子设备200发送对端语音翻译结果的通知来实现通信模块不向电子设备200发送用户B的语音的翻译结果,也可以通过通信模块未接收到允许向电子设备200发送对端语音翻译结果的通知,来实现通信模块不向电子设备200发送用户B的语音的翻译结果。After receiving the notification of the voice translation result from the opposite end, the coordination unit sends a notification to the broadcast control unit to suspend the broadcast of the translation result if it is determined that there is a voice input according to the voice detection result reported by the voice detection unit. Therefore, the broadcast control unit can realize the control of broadcast of the translation result of the speech by the broadcast module. In the embodiment of the present application, if the coordination unit determines that there is a voice input according to the voice detection result reported by the voice detection unit, it may not send a notification to the broadcast control unit, and the re-coordination unit determines according to the voice detection result reported by the voice detection unit that there is no voice input. , and then send a notification to the broadcast control unit to allow broadcast of the speech translation result. In addition, in some embodiments, the coordination unit may also not send the translation result of user A's voice to the electronic device 200 when it is determined that there is voice input according to the voice detection result reported by the voice detection unit. For example, the coordinating unit may send a notification to the communication module to suspend the transmission of the opposite-end voice translation result to the electronic device 200, so that the communication module does not send the translation result of user B's voice to the electronic device 200, or the communication module does not receive permission The notification of the voice translation result of the peer end is sent to the electronic device 200 , so that the communication module does not send the translation result of user B's voice to the electronic device 200 .
此外,电子设备100当通过翻译服务器实现用户B的语音翻译时,有可能会由于网络信号或者语速的原因,导致电子设备100可能无法获取到用户B的语音的翻译结果。例如若电子设备100与翻译服务器之间是通过网络建立通信连接的,有可能会由于网络信号较差时,会导致电子设备100无法将用户A的语音上传到翻译服务器,也有可能导致翻译服务器无法将用户B的语音的翻译结果及时返回给电子设备100。In addition, when the electronic device 100 implements user B's speech translation through the translation server, the electronic device 100 may not be able to obtain the translation result of user B's speech due to network signals or speech speed. For example, if the communication connection between the electronic device 100 and the translation server is established through the network, the electronic device 100 may not be able to upload the voice of user A to the translation server due to the poor network signal, or the translation server may not be able to The translation result of user B's speech is returned to the electronic device 100 in time.
因此,在另一些实施例中,电子设备100当接收到电子设备200发送的用户B的语音,但第三时长内未接收到用户B的语音的翻译结果时,获取当前电子设备100的网络信号强度,该网络信号强度为电子设备100用于与翻译服务器之前的通信的网络的信号强度,该翻译服务器用于对用户B的语音进行翻译。需要说明的是,第三时长可以预先配置在电子设备100 中,也可以由电子设备100根据预设算法确定。下面以电子设备100用于与翻译服务器之前的通信的网络为移动通信网络为例。电子设备100当网络信号强度小于或等于第一阈值时,则切换到预先配置在电子设备100中的翻译引擎中进行语音翻译,或者提示用户切换网络,或者自动切换到网络信号强度大于第一阈值的移动通信网络、或者自动切换到网络信号强度大于第一阈值的无线通信网络等。从而有助于降低网络信号变差导致语音翻译受阻的可能性。在另一些实施例中,电子设备100当网络信号强度大于第一阈值时,则提示用户B放慢语速。从而有助于降低因用户语速过快导致翻译紊乱的可能性。示例的,电子设备100可以通过在显示屏151上显示提示信息,来提示用户A通知用户B降低语速。由电子设备100将用户A 提示用户B的降低语速的语音的翻译结果发送给电子设备200,以达到提示用户B降低语速的目的。又示例的,电子设备100还可以在检测到电子设备100黑屏时,通过播放提示音来提示用户A通知用户B放慢语速。例如提示音可以为“滴滴”的提示音,也可以为“请放慢语速”的语音等。该提示音可以预先配置在电子设备100中。再示例的,电子设备100还可以通过自动将提示音发送给电子设备200,使得电子设备200能够播放提示音给用户B达到提示用户B降低语速的目的。Therefore, in some other embodiments, the electronic device 100 acquires the current network signal of the electronic device 100 when receiving the voice of the user B sent by the electronic device 200 but not receiving the translation result of the voice of the user B within the third time period strength, the network signal strength is the signal strength of the network used by the electronic device 100 to communicate with the translation server before, and the translation server is used to translate the voice of the user B. It should be noted that, the third duration may be pre-configured in the electronic device 100, or may be determined by the electronic device 100 according to a preset algorithm. In the following, the network used by the electronic device 100 for communication with the translation server is a mobile communication network as an example. When the network signal strength is less than or equal to the first threshold, the electronic device 100 switches to the translation engine pre-configured in the electronic device 100 for voice translation, or prompts the user to switch networks, or automatically switches to a network where the signal strength is greater than the first threshold. the mobile communication network, or automatically switch to a wireless communication network whose network signal strength is greater than the first threshold. This helps to reduce the possibility of speech translation being blocked due to poor network signal. In other embodiments, when the network signal strength is greater than the first threshold, the electronic device 100 prompts the user B to slow down the speech rate. This helps to reduce the possibility of translation disorder caused by the user speaking too fast. For example, the electronic device 100 may prompt the user A to notify the user B to reduce the speech rate by displaying prompt information on the display screen 151 . The electronic device 100 sends to the electronic device 200 the translation result of the speech of the user A prompting the user B to reduce the speech rate, so as to achieve the purpose of prompting the user B to reduce the speech rate. For another example, when the electronic device 100 detects that the screen of the electronic device 100 is black, the electronic device 100 may play a prompt tone to prompt the user A to notify the user B to slow down the speech rate. For example, the prompt sound may be the prompt sound of "DiDi", or the voice of "Please slow down". The prompt tone may be preconfigured in the electronic device 100 . For another example, the electronic device 100 can also automatically send the prompt tone to the electronic device 200, so that the electronic device 200 can play the prompt tone to the user B to achieve the purpose of prompting the user B to reduce the speaking rate.
在具体实现时,在一些示例中,电子设备100的协调单元若根据接收到语音检测单元上报的语音检测结果确定通信模块接收到来自电子设备200的语音,但是协调单元若预设的第三时长内未接收到对端语音翻译结果的通知,则协调单元向接入单元发送网络信号强度检测的通知。接入单元接收到网络信号强度检测的通知后,从通信模块获取网络信号强度,若网络信号强度大于第一阈值,则向协调单元发送网络正常的通知,协调单元接收到网络正常的通知后,向主控单元发送提示用户B降低语速的通知。主控单元接收到提示用户B降低语速的通知后,提示用户B降低语速。示例的,主控单元可以接收到提示用户B降低语速的通知后,自动通过通信模块向电子设备200发送提示音,来提示用户B降低语速。又示例的,主控单元还可以通过在显示屏151上显示提示信息或通过播报模块播放提示音给用户A,提示对端用户语速过快。用户A在查看到提示信息或听到提示音后,口头提示用户B降低语速,由电子设备100将用户A提示用户B的降低语速的语音的翻译结果发送给电子设备200,以达到提示用户B降低语速的目的。接入单元当从通信模块获取的网络信号强度不大于第一阈值时,可以向协调单元发送网络异常的通知,然后协调单元将网络异常的通知发送给主控单元。主控单元在接收到网络异常的通知后,向提示切换网络。例如,主控单元可以通过显示屏151在显示当前网络异常,提示用户切换网络的信息。另外,在一些实施例中,接入单元当从通信模块获取的网络信号强度不大于第一阈值时,还可以自动将语音翻译服务切换到预先配置在电子设备100中的翻译引擎上。当接入单元检测到网络正常后,还可以将语音翻译服务重新切换到翻译服务器上。In specific implementation, in some examples, if the coordination unit of the electronic device 100 determines that the communication module has received the voice from the electronic device 200 according to the voice detection result reported by the voice detection unit, but if the coordination unit presets the third duration If the notification of the voice translation result of the peer end is not received, the coordination unit sends a notification of network signal strength detection to the access unit. After receiving the notification of network signal strength detection, the access unit obtains the network signal strength from the communication module, and if the network signal strength is greater than the first threshold, it sends a notification that the network is normal to the coordination unit, and after the coordination unit receives the notification that the network is normal, Send a notification to the main control unit to prompt user B to reduce the speech rate. After receiving the notification prompting user B to reduce the speaking rate, the main control unit prompts user B to reduce the speaking rate. For example, after receiving the notification prompting user B to reduce the speaking rate, the main control unit may automatically send a prompt tone to the electronic device 200 through the communication module to prompt user B to reduce the speaking rate. As another example, the main control unit may also display prompt information on the display screen 151 or play a prompt sound to the user A through the broadcasting module to prompt the opposite-end user to speak too fast. After viewing the prompt information or hearing the prompt tone, user A verbally prompts user B to reduce the speaking rate, and the electronic device 100 sends the translation result of the voice that user A prompts user B to reduce the speaking rate to the electronic device 200, so as to achieve the prompt. User B's purpose of reducing the speaking rate. When the network signal strength obtained from the communication module is not greater than the first threshold, the access unit may send a notification of network abnormality to the coordination unit, and then the coordination unit sends the notification of network abnormality to the main control unit. After receiving the notification of network abnormality, the main control unit switches the network to the prompt. For example, the main control unit may display the current network abnormality through the display screen 151, prompting the user to switch the network information. In addition, in some embodiments, when the network signal strength obtained from the communication module is not greater than the first threshold, the access unit may also automatically switch the speech translation service to the translation engine preconfigured in the electronic device 100 . When the access unit detects that the network is normal, the voice translation service can also be switched to the translation server again.
电子设备100当检测到长时间内无语音输入,但接收到用户B的语音的翻译结果时,也有可能是因为网络信号强度较差或者用户语速过快导致的。因此,在一些实施例中,电子设备100当检测到第四时长内无语音输入,但接收到用户B的语音的翻译结果时,获取当前电子设备100的网络信号强度,该网络信号强度为电子设备100用于与翻译服务器通信的网络的信号强度。需要说明的是,第四时长可以预先配置在电子设备100中,也可以由电子设备 100根据预设算法确定。具体的,电子设备100根据网络信号强度实现协调的方式,可以参见电子设备100当检测到有用户A的语音输入、第一时长内未接收到用户A的语音的翻译结果时,电子设备100根据网络信号强度实现协调的方式。从而有助于提高通话过程中语音翻译的可靠性。When the electronic device 100 detects that there is no voice input for a long time, but receives the translation result of user B's voice, it may also be caused by poor network signal strength or the user speaking too fast. Therefore, in some embodiments, the electronic device 100 acquires the current network signal strength of the electronic device 100 when it detects that there is no voice input within the fourth time period, but receives the translation result of user B's voice, where the network signal strength is electronic The signal strength of the network used by the device 100 to communicate with the translation server. It should be noted that the fourth duration may be pre-configured in the electronic device 100, or may be determined by the electronic device 100 according to a preset algorithm. Specifically, for the manner in which the electronic device 100 achieves coordination according to the network signal strength, see that when the electronic device 100 detects that the user A's voice is input and the translation result of the user A's voice is not received within the first time period, the electronic device 100 will The way network signal strength is coordinated. This helps to improve the reliability of voice translation during calls.
在具体实现时,在一些实施例中,电子设备100的协调单元若根据语音检测单元上报的语音检测结果确定第四时长内通信模块为未接收到来自电子设备200的语音,但是协调单元接收到对端语音翻译结果的通知,则协调单元向接入单元发送网络信号强度检测的通知。接入单元接收到网络信号强度检测的通知后的后续执行步骤,可以参见协调单元在语音采集模块有语音输入、但预设的第一时长内未接收到本端语音翻译结果的通知的情况下,接入单元接收到网络信号强度检测的通知后的后续执行步骤,在此不再赘述。During specific implementation, in some embodiments, if the coordination unit of the electronic device 100 determines that the communication module within the fourth time period has not received the voice from the electronic device 200 according to the voice detection result reported by the voice detection unit, but the coordination unit has received Notification of the voice translation result of the peer end, the coordination unit sends a notification of network signal strength detection to the access unit. For the subsequent execution steps after the access unit receives the notification of network signal strength detection, please refer to the case where the coordination unit has voice input from the voice acquisition module, but does not receive the notification of the local end's voice translation result within the preset first time period , the subsequent execution steps after the access unit receives the notification of the network signal strength detection will not be repeated here.
需要说明的是,当电子设备100缓存的用户B的语音的翻译结果的数量超过预设数量时,无需考虑电子设备100当前是否采集到用户A的语音或者接收到用户B的语音,直接播报用户B的语音的翻译结果。从而有助于避免电子设备100缓存的用户B的语音翻译结果溢出,造成信息的丢失。例如,第二队列用于缓存用户B的语音的翻译结果,预设数量为第二队列的最大能够存储翻译结果的数量。示例的,在具体实现时,对端翻译单元向协调单元发送优先播报对端语音翻译结果的通知,协调单元接收到优先播报对端语音翻译结果的通知后,向播报控制单元发送播报对端语音翻译结果的通知,使得播报模块播报用户B的语音的翻译结果。It should be noted that when the number of translation results of user B's voice cached by the electronic device 100 exceeds the preset number, it does not need to consider whether the electronic device 100 currently collects the voice of user A or receives the voice of user B, and directly broadcasts to the user. The translation result of B's speech. This helps to avoid overflow of the voice translation result of user B cached by the electronic device 100, resulting in loss of information. For example, the second queue is used to cache the translation results of user B's speech, and the preset number is the maximum number of translation results that can be stored in the second queue. Exemplarily, when specifically implemented, the opposite end translation unit sends a notification to the coordination unit to broadcast the result of the opposite end voice translation first, and after the coordination unit receives the notice to broadcast the opposite end speech translation result preferentially, it sends a broadcast of the opposite end speech to the broadcast control unit. The notification of the translation result enables the broadcasting module to announce the translation result of user B's speech.
示例的,如图11所示,为本申请实施例播报语音的方法的流程示意图。由电子设备100 执行以下步骤。Illustratively, as shown in FIG. 11 , it is a schematic flowchart of a method for broadcasting voice according to an embodiment of the present application. The following steps are performed by the electronic device 100 .
步骤1101,接收到新的语音的翻译结果。应理解,新的语音的翻译结果可以包括用户A 的语音的翻译结果,也可以包括用户B的语音的翻译结果。其中,用户A的语音的翻译结果为本端语音的翻译结果,用户B的语音的翻译结果为对端语音的翻译结果。Step 1101, the translation result of the new speech is received. It should be understood that the translation result of the new speech may include the translation result of user A's speech, and may also include the translation result of user B's speech. The translation result of user A's speech is the translation result of the end-end speech, and the translation result of user B's speech is the translation result of the opposite end's speech.
步骤1102,判断缓存的语音的翻译结果是否超过预设阈值,若是,则执行步骤1104,否则执行步骤1103。Step 1102, it is judged whether the translation result of the cached speech exceeds a preset threshold, if so, go to step 1104, otherwise go to step 1103.
步骤1103,判断是否有语音输入,若是则执行步骤1105,否则执行步骤1104。应理解,有语音输入指的是电子设备100采集到用户A的语音和/或电子设备100接收到电子设备200 发送的用户B的语音。无语音输入指的是,电子设备100未采集到用户A的语音,也未接收到电子设备200发送的用户B的语音。Step 1103 , determine whether there is a voice input, if yes, go to Step 1105 , otherwise go to Step 1104 . It should be understood that having a voice input means that the electronic device 100 collects the voice of user A and/or the electronic device 100 receives the voice of user B sent by the electronic device 200 . No voice input means that the electronic device 100 neither collects the voice of the user A nor receives the voice of the user B sent by the electronic device 200 .
步骤1104,播报语音的翻译结果,本流程结束。示例的,播报的语音的翻译结果为最早缓存的语音的翻译结果。Step 1104, broadcast the translation result of the speech, and the process ends. For example, the translation result of the broadcast speech is the translation result of the earliest cached speech.
示例的,语音的翻译结果可以缓存到队列中。例如,用于缓存语音的翻译结果的队列图如图12所示,当队列为空时,电子设备100可以将先翻译好的未播报的语音的翻译结果存储到队列中的位置1,然后当在接收到新的语音的翻译结果后,若存储在队列中为位置1的语音的翻译结果还未播报,则将新的语音翻译结果存储到队列中的位置2,以此类推。电子设备从图12中所示的队列中的位置1开始播报语音翻译结果。For example, the translation result of the speech can be cached in a queue. For example, the queue diagram for buffering the translation results of speech is shown in FIG. 12 . When the queue is empty, the electronic device 100 can store the translation result of the unannounced speech translated first in position 1 in the queue, and then when the queue is empty, the electronic device 100 After receiving the translation result of the new speech, if the translation result of the speech stored in the queue at position 1 has not been broadcast, the new speech translation result is stored in the position 2 in the queue, and so on. The electronic device broadcasts the speech translation result starting from position 1 in the queue shown in FIG. 12 .
步骤1105,当输入的语音为对端语音时,则播报对端语音,并获取对端语音的翻译结果,重新执行步骤1101,当输入的语音为本端语音时,则获取本端语音的翻译结果,重新执行步骤1101,本流程结束。Step 1105, when the input voice is the voice of the opposite end, broadcast the voice of the opposite end, and obtain the translation result of the voice of the opposite end, and perform step 1101 again, when the input voice is the voice of the end, then obtain the translation of the voice of the local end As a result, step 1101 is re-executed, and the process ends.
此外,在又一些实施例中,电子设备100在用户A与用户B的通话过程中,在显示屏151 显示用户A和用户B的实时的通话记录的语音对应的文本以及对应的语音的翻译结果的文本。从而有助于用户A和用户B在语言不通的情况下的能够理解对方所表达的意思。在一些实施例中,电子设备100可以在用户界面800显示用户A和用户B的实时的通话的语音对应的文本以及对应的语音的翻译结果的文本。示例的,用户界面800可以包括通话记录文本显示区域804,通过通话记录文本显示区域804来显示用户A和用户B的实时的通话记录的文本。例如,电子设备100采集的用户A的语音为“你好,我想买张机票。”,接收到的电子设备 B的语音为“OK,which day do you prefer”以及获取的用户A的语音的翻译结果为“Hello,I want to buy a ticket”,获取的用户B的语音的翻译结果为“好的,你想订哪天的?”,则可以如图13所示,在通话记录文本显示区域804显示“你好,我想买张机票。”的文本、“Hello, I want to buy a ticket”的文本、“OK,which day do you prefer”的文本和“好的,你想订哪天的?”的文本。In addition, in some other embodiments, during the call between user A and user B, the electronic device 100 displays on the display screen 151 the text corresponding to the voice of the real-time call records of user A and user B and the translation result of the corresponding voice text. Therefore, it is helpful for user A and user B to be able to understand the meaning expressed by the other party in the case of different languages. In some embodiments, the electronic device 100 may display, on the user interface 800 , the text corresponding to the speech of the real-time conversation between user A and user B and the text of the translation result of the corresponding speech. For example, the user interface 800 may include a call record text display area 804, and the call record text display area 804 displays the real-time call record texts of user A and user B. For example, the user A's voice collected by the electronic device 100 is "Hello, I want to buy a flight ticket.", the received voice of the electronic device B is "OK, which day do you prefer", and the acquired voice of the user A is "OK, which day do you prefer". The translation result is "Hello, I want to buy a ticket", and the obtained translation result of user B's voice is "OK, what day do you want to book?", then as shown in Figure 13, it can be displayed in the call log text Area 804 displays the text of "Hello, I want to buy a ticket.", the text of "Hello, I want to buy a ticket", the text of "OK, which day do you prefer", and the text of "Ok, where do you want to book." God?" text.
需要说明的是,用户A和用户B的实时的通话记录的语音对应的文本以及对应的语音的翻译结果的文本可以由电子设备100基于语音识别获取的,也可以是电子设备100将用户A 和用户B的实时的通话记录的语音以及对应的语音的翻译结果上报给语音翻译服务器,由语音翻译服务器将语音转化为文本后发送给电子设备100的。本申请实施例对电子设备100获取文本的方式不作限定。It should be noted that the text corresponding to the voice of the real-time call records of user A and user B and the text of the translation result of the corresponding voice may be obtained by the electronic device 100 based on voice recognition, or the electronic device 100 may use the user A and the The voice of user B's real-time call record and the translation result of the corresponding voice are reported to the voice translation server, and the voice translation server converts the voice into text and sends it to the electronic device 100 . This embodiment of the present application does not limit the manner in which the electronic device 100 acquires text.
在另一些实施例中,为了便于用户A和用户B双方确定电子设备100开启了语音翻译服务,则预先在电子设备100中配置语音通话翻译功能已开启的提示音,例如,预先配置在电子设备100中的语音通话翻译功能已开启的提示音所使用的语言可以为系统语言,也可以为设置的本端语言,当系统语言或本端语言发生变化后,预先配置在电子设备100中的语音通话翻译功能已开启的提示音所使用的语言相应变化,电子设备100在检测到用户B接听用户 A的来电后,播报预先配置在电子设备100中的语音通话翻译功能已开启的提示音,以及向电子设备200发送语音通话翻译功能已开启的提示音的翻译结果。其中,语音通话翻译功能已开启的提示音的翻译结果的使用的语言为设置的对端语言。电子设备200接收到语音通话翻译功能已开启的提示音的翻译结果后,播放语音通话翻译功能已开启的提示音,以便于用户B获知电子设备100的语音通话翻译功能已开启。In other embodiments, in order to facilitate both user A and user B to determine that the electronic device 100 has enabled the voice translation service, the electronic device 100 is preconfigured with a prompt tone that the voice call translation function has been enabled, for example, preconfigured in the electronic device The language used for the prompt tone that the voice call translation function in 100 has been turned on can be the system language or the set local language. When the system language or local language changes, the voice pre-configured in the electronic device 100 The language used for the prompt tone that the call translation function has been turned on changes accordingly. After detecting that user B has answered a call from user A, the electronic device 100 broadcasts the prompt tone that the voice call translation function pre-configured in the electronic device 100 has been turned on, and The translation result of the prompt tone that the voice call translation function has been turned on is sent to the electronic device 200 . The language used for the translation result of the prompt tone whose voice call translation function has been enabled is the set language of the peer. After receiving the translation result of the prompt tone that the voice call translation function is enabled, the electronic device 200 plays the prompt tone that the voice call translation function has been enabled, so that user B can know that the voice call translation function of the electronic device 100 has been enabled.
电子设备100在检测到用户B接听用户A的来电后,还可以在显示屏151上显示语音通话翻译功能已开启提示音的文本。以语音通话翻译功能已开启的提示音的文本可以为“你好,欢迎使用语音通话翻译服务,请在语音播报完毕后开始通话。”为例,电子设备100在检测到用户B接听用户A的来电后,在用户界面800上下显示“你好,欢迎使用语音通话翻译服务,请在语音播报完毕后开始通话。”,如图14所示。After detecting that user B has answered the call from user A, the electronic device 100 may further display on the display screen 151 the text of the prompt tone that the voice call translation function has been turned on. Taking the text of the prompt tone that the voice call translation function has been turned on can be "Hello, welcome to use the voice call translation service, please start the call after the voice announcement is completed." For example, the electronic device 100 detects that user B answers user A's call. After the incoming call, the user interface 800 displays "Hello, welcome to use the voice call translation service, please start the call after the voice broadcast is completed.", as shown in FIG. 14 .
为了便于下次电子设备100对本端语言设置803和对端语言设置802进行设置,电子设备100在检测到与用户B的通话结束后,保存用户A和用户B本次通话对本端语言设置803 和对端语言设置802进行的设置。In order to facilitate the setting of the local language setting 803 and the remote language setting 802 by the electronic device 100 next time, the electronic device 100 saves the local language settings 803 and 802 of the current call between user A and user B after detecting the end of the call with user B. The setting made by the peer language setting 802.
本申请实施例中还可以在电子设备100上设置用于开启或关闭语音通话翻译功能的虚拟按钮。从而有助于用户能够控制开启或关闭语音通话翻译功能。用户可以通过对虚拟按钮操作开启或关闭语音通话翻译功能,也可以由电子设备100自动确定是否开启或关闭语音通话翻译服务对虚拟按钮进行设置。In this embodiment of the present application, a virtual button for enabling or disabling the voice call translation function may also be set on the electronic device 100 . This helps the user to control the voice call translation function on or off. The user can enable or disable the voice call translation function by operating the virtual button, or the electronic device 100 can automatically determine whether to enable or disable the voice call translation service to set the virtual button.
示例的,如图15所示,用户界面800包括虚拟按钮1400,虚拟按钮1400用于开启或关闭语音通话翻译功能。具体的,虚拟按钮1200关闭(OFF)时,电子设备100关闭语音通话翻译功能;虚拟按钮1200开启(ON)时,电子设备100开启语音通话翻译功能。另外,还需要说明的是,虚拟按钮1200OFF时,可以在用户界面800隐藏或置灰本端语言设置803和对端语言设置。又示例的,如图16所示,还可以在系统设置界面1600增加开启语音翻译设置按钮1601,其中开启语音翻译设置按钮1601用于开启或关闭语音通话翻译功能。其中,电子设备100可以响应于对设置图标操作,显示系统设置界面1600。Exemplarily, as shown in FIG. 15 , the user interface 800 includes a virtual button 1400 , and the virtual button 1400 is used to enable or disable the voice call translation function. Specifically, when the virtual button 1200 is turned off (OFF), the electronic device 100 turns off the voice call translation function; when the virtual button 1200 is turned on (ON), the electronic device 100 turns on the voice call translation function. In addition, it should also be noted that when the virtual button 1200 is OFF, the local language setting 803 and the remote language setting can be hidden or grayed out in the user interface 800 . As another example, as shown in FIG. 16 , an open voice translation setting button 1601 may also be added to the system setting interface 1600, wherein the open voice translation setting button 1601 is used to enable or disable the voice call translation function. The electronic device 100 may display a system setting interface 1600 in response to an operation on the setting icon.
需要说明的是,当电子设备100作为被叫端,电子设备200作为主叫端,在电子设备200 不具有语音通话翻译功能的情况下,电子设备100若具有语音通话翻译功能,则电子设备100 接收到用户B的来电后,可以执行基于语音通话的翻译过程。具体的,电子设备100执行基于语音通话的翻译方法,可参见电子设备100作为主叫端,电子设备200作为被叫端时执行基于语音通话的翻译方法,在此不再赘述。It should be noted that when the electronic device 100 is used as the called end and the electronic device 200 is used as the calling end, in the case where the electronic device 200 does not have a voice call translation function, if the electronic device 100 has a voice call translation function, the electronic device 100 After receiving the incoming call from user B, the translation process based on the voice call can be performed. Specifically, the electronic device 100 executes the voice call-based translation method, and reference may be made to the voice call-based translation method when the electronic device 100 acts as the calling end and the electronic device 200 acts as the called end, which will not be repeated here.
例如,如图17所示,电子设备100接收到用户B的来电后,可以在显示屏151显示用户界面1700。用户界面1700上包括语音翻译按钮1701。电子设备100可以响应于对语音翻译按钮1701的操作,在显示屏151显示图8所示的用户界面800。又例如,电子设备100还可以响应于对语音翻译按钮1701的操作,开启或关闭语音通话翻译功能。从而有助于用户开启语音通话翻译功能。For example, as shown in FIG. 17 , after receiving an incoming call from user B, the electronic device 100 may display a user interface 1700 on the display screen 151 . A speech translation button 1701 is included on the user interface 1700 . The electronic device 100 may display the user interface 800 shown in FIG. 8 on the display screen 151 in response to the operation of the voice translation button 1701 . For another example, the electronic device 100 may also enable or disable the voice call translation function in response to the operation of the voice translation button 1701 . This helps the user to turn on the voice call translation function.
此外,本申请实施例基于语音通话的翻译方法还可应用于其它可以进行实时语音通信的应用中,例如微信等。另外,本申请上述实施例仅以两人通话为进行的说明,本申请实施例还可以应用于多人通话的应用场景,例如电话会议等。In addition, the voice call-based translation method in the embodiment of the present application can also be applied to other applications that can perform real-time voice communication, such as WeChat and the like. In addition, the above embodiments of the present application are only described by two people talking, and the embodiments of the present application can also be applied to application scenarios of multi-person calls, such as a conference call.
本申请涉及的各个实施例可以单独使用,也可以相互结合使用,以实现不同的技术效果。The various embodiments involved in this application can be used alone or in combination with each other to achieve different technical effects.
上述本申请提供的实施例中,从电子设备作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,电子设备可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。In the above-mentioned embodiments of the present application, the methods provided by the embodiments of the present application are introduced from the perspective of an electronic device as an execution subject. In order to implement the functions in the methods provided by the above embodiments of the present application, the electronic device may include a hardware structure and/or software modules, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is performed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
基于相同的构思,图18所示为本申请提供的一种电子设备1800。电子设备1800包括至少一个处理器1810、存储器1820和收发器1830。其中,处理器1810与存储器1820和收发器1830耦合,本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。Based on the same concept, FIG. 18 shows an electronic device 1800 provided by the present application. Electronic device 1800 includes at least one processor 1810 , memory 1820 and transceiver 1830 . The processor 1810 is coupled to the memory 1820 and the transceiver 1830, and the coupling in this embodiment of the present application is an indirect coupling or a communication connection between devices, units or modules, which may be electrical, mechanical or other forms, for the device , information exchange between units or modules.
具体的,存储器1820用于存储程序指令。Specifically, the memory 1820 is used to store program instructions.
收发器1830用于接收或发送数据。The transceiver 1830 is used to receive or transmit data.
处理器1810用于调用存储器1820中存储的程序指令,使得电子设备1800执行本申请实施例提供的基于语音通话的翻译方法。The processor 1810 is configured to invoke the program instructions stored in the memory 1820, so that the electronic device 1800 executes the voice call-based translation method provided by the embodiment of the present application.
应理解,该电子设备1800可以用于实现本申请实施例基于语音通话的翻译方法,相关特征可以参照上文,此处不再赘述。It should be understood that the electronic device 1800 may be used to implement the voice call-based translation method in this embodiment of the present application, and the relevant features can be referred to above, which will not be repeated here.
所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、电可擦可编程只读存储器(electrically erasableprogrammable read only memory,EEPROM)、只读光盘(compact disc read-Only memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(digital subscriber line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介质的定影中。如本申请实施例所使用的,盘(disk)和碟(disc) 包括压缩光碟(compact disc,CD)、激光碟、光碟、数字通用光碟(digital video disc,DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。Those skilled in the art can clearly understand that the embodiments of the present application may be implemented by hardware, firmware, or a combination thereof. When implemented in software, the functions described above may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage medium can be any available medium that a computer can access. Taking this as an example but not limited to: computer readable media may include RAM, ROM, electrically erasable programmable read only memory (EEPROM), compact disc read-Only memory (CD-ROM) ) or other optical disk storage, magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and that can be accessed by a computer. also. Any connection can be appropriately made into a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, Then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, wireless, and microwave are included in the fusing of the pertinent medium. As used in the embodiments of the present application, disks and discs include compact discs (CDs), laser discs, optical discs, digital video discs (DVDs), floppy disks, and Blu-ray discs, wherein Disks usually reproduce data magnetically, while discs use lasers to reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.
总之,以上所述仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。In a word, the above descriptions are merely examples of the present application, and are not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included within the protection scope of this application.
Claims (14)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811198715.7A CN109582976A (en) | 2018-10-15 | 2018-10-15 | A kind of interpretation method and electronic equipment based on voice communication |
| PCT/CN2019/111120 WO2020078330A1 (en) | 2018-10-15 | 2019-10-15 | Voice call-based translation method and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811198715.7A CN109582976A (en) | 2018-10-15 | 2018-10-15 | A kind of interpretation method and electronic equipment based on voice communication |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN109582976A true CN109582976A (en) | 2019-04-05 |
Family
ID=65920108
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811198715.7A Pending CN109582976A (en) | 2018-10-15 | 2018-10-15 | A kind of interpretation method and electronic equipment based on voice communication |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109582976A (en) |
| WO (1) | WO2020078330A1 (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110267309A (en) * | 2019-06-26 | 2019-09-20 | 广州三星通信技术研究有限公司 | Method and device for real-time translation of call voice |
| CN110765787A (en) * | 2019-10-21 | 2020-02-07 | 深圳传音控股股份有限公司 | Information interaction real-time translation method, medium and terminal |
| CN110956950A (en) * | 2019-12-02 | 2020-04-03 | 联想(北京)有限公司 | Data processing method and device and electronic equipment |
| WO2020078332A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Negotiation method based on voice call translation capability, and electronic devices |
| WO2020078330A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Voice call-based translation method and electronic device |
| CN111415665A (en) * | 2020-04-07 | 2020-07-14 | 浙江国贸云商控股有限公司 | Voice processing method and device for video call and electronic equipment |
| CN113885973A (en) * | 2020-07-02 | 2022-01-04 | 华为技术有限公司 | Translation result display method, device and electronic device |
| CN114095906A (en) * | 2021-10-14 | 2022-02-25 | 华为技术有限公司 | A short-range communication method and system |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104754536A (en) * | 2013-12-27 | 2015-07-01 | 中国移动通信集团公司 | Method and system for realizing communication between different languages |
| WO2015183707A1 (en) * | 2014-05-27 | 2015-12-03 | Microsoft Technology Licensing, Llc | In-call translation |
| CN106657543A (en) * | 2016-10-31 | 2017-05-10 | 北京小米移动软件有限公司 | Voice information processing method and device |
| US20170149961A1 (en) * | 2015-11-25 | 2017-05-25 | Samsung Electronics Co., Ltd. | Electronic device and call service providing method thereof |
| CN107343113A (en) * | 2017-06-26 | 2017-11-10 | 深圳市沃特沃德股份有限公司 | Audio communication method and device |
| CN107465816A (en) * | 2017-07-25 | 2017-12-12 | 广西定能电子科技有限公司 | A kind of call terminal and method of instant original voice translation of conversing |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107247711B (en) * | 2017-06-28 | 2020-10-02 | 河南拓恒电子科技有限公司 | Bidirectional translation method, mobile terminal and computer readable storage medium |
| CN109582976A (en) * | 2018-10-15 | 2019-04-05 | 华为技术有限公司 | A kind of interpretation method and electronic equipment based on voice communication |
-
2018
- 2018-10-15 CN CN201811198715.7A patent/CN109582976A/en active Pending
-
2019
- 2019-10-15 WO PCT/CN2019/111120 patent/WO2020078330A1/en not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104754536A (en) * | 2013-12-27 | 2015-07-01 | 中国移动通信集团公司 | Method and system for realizing communication between different languages |
| WO2015183707A1 (en) * | 2014-05-27 | 2015-12-03 | Microsoft Technology Licensing, Llc | In-call translation |
| US20170149961A1 (en) * | 2015-11-25 | 2017-05-25 | Samsung Electronics Co., Ltd. | Electronic device and call service providing method thereof |
| CN106657543A (en) * | 2016-10-31 | 2017-05-10 | 北京小米移动软件有限公司 | Voice information processing method and device |
| CN107343113A (en) * | 2017-06-26 | 2017-11-10 | 深圳市沃特沃德股份有限公司 | Audio communication method and device |
| CN107465816A (en) * | 2017-07-25 | 2017-12-12 | 广西定能电子科技有限公司 | A kind of call terminal and method of instant original voice translation of conversing |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020078332A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Negotiation method based on voice call translation capability, and electronic devices |
| WO2020078330A1 (en) * | 2018-10-15 | 2020-04-23 | 华为技术有限公司 | Voice call-based translation method and electronic device |
| US11886830B2 (en) | 2018-10-15 | 2024-01-30 | Huawei Technologies Co., Ltd. | Voice call translation capability negotiation method and electronic device |
| CN110267309A (en) * | 2019-06-26 | 2019-09-20 | 广州三星通信技术研究有限公司 | Method and device for real-time translation of call voice |
| CN110267309B (en) * | 2019-06-26 | 2022-09-23 | 广州三星通信技术研究有限公司 | Method and device for real-time translation of call voice |
| CN110765787A (en) * | 2019-10-21 | 2020-02-07 | 深圳传音控股股份有限公司 | Information interaction real-time translation method, medium and terminal |
| WO2021077659A1 (en) * | 2019-10-21 | 2021-04-29 | 深圳传音控股股份有限公司 | Method for real-time translation in information exchange, medium, and terminal |
| CN110956950A (en) * | 2019-12-02 | 2020-04-03 | 联想(北京)有限公司 | Data processing method and device and electronic equipment |
| CN111415665A (en) * | 2020-04-07 | 2020-07-14 | 浙江国贸云商控股有限公司 | Voice processing method and device for video call and electronic equipment |
| CN113885973A (en) * | 2020-07-02 | 2022-01-04 | 华为技术有限公司 | Translation result display method, device and electronic device |
| CN114095906A (en) * | 2021-10-14 | 2022-02-25 | 华为技术有限公司 | A short-range communication method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2020078330A1 (en) | 2020-04-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110138937B (en) | A calling method, device and system | |
| CN109766066B (en) | Message processing method, related device and system | |
| CN110087012B (en) | A camera control method and electronic device | |
| CN109582976A (en) | A kind of interpretation method and electronic equipment based on voice communication | |
| WO2021213120A1 (en) | Screen projection method and apparatus, and electronic device | |
| CN116360725B (en) | Display interaction system, display method and device | |
| CN109327613B (en) | Negotiation method based on voice call translation capability and electronic equipment | |
| CN110602315A (en) | Electronic equipment with foldable screen and display method | |
| WO2020173370A1 (en) | Method for moving application icons, and electronic device | |
| CN111371949A (en) | Application switching method, device, storage medium and touch terminal | |
| CN110198362B (en) | A method and system for adding smart home equipment to contacts | |
| US20220179827A1 (en) | File Sharing Method of Mobile Terminal and Device | |
| CN114115770A (en) | Display control method and related device | |
| CN110602312B (en) | Call method, electronic device, and computer-readable storage medium | |
| WO2021057673A1 (en) | Image display method and electronic device | |
| CN114489533A (en) | Screen projection method and device, electronic equipment and computer readable storage medium | |
| CN112789934A (en) | Bluetooth service query method and electronic equipment | |
| CN114185503A (en) | System, method, apparatus and medium for multi-screen interaction | |
| WO2020051852A1 (en) | Method for recording and displaying information in communication process, and terminals | |
| JP2023528384A (en) | CONTENT SHARING METHOD, APPARATUS AND SYSTEM | |
| CN111492678B (en) | A file transmission method and electronic device | |
| US20240340370A1 (en) | Red packet receiving and sending method and electronic device | |
| US12185024B2 (en) | Video communication method and video communications apparatus | |
| US12413660B2 (en) | Accessory theme adaptation method, apparatus, and system | |
| WO2022068654A1 (en) | Interaction method and apparatus for terminal device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| TA01 | Transfer of patent application right | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20210429 Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Applicant after: Honor Device Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Applicant before: HUAWEI TECHNOLOGIES Co.,Ltd. |
|
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190405 |