Multi-language conversion method, device, computer equipment and storage medium

文档序号:1406190 发布日期:2020-03-06 浏览:12次 中文

阅读说明:本技术 多语言转换方法、装置、计算机设备及存储介质 (Multi-language conversion method, device, computer equipment and storage medium ) 是由 王金生 王志敏 周起如 王英明 蒋誉 于 2019-11-15 设计创作,主要内容包括:本发明涉及多语言转换方法、装置、计算机设备及存储介质,该方法包括获取语音信息及接收方所设置的接收语言;对语音信息进行识别以得到待转换语言;整合待转换语言及接收方所设置的接收语言以得到第一检索条件;并在第一数据库内检索以得到第一检索结果;判断第一检索结果是否是匹配成功;若否,则设置好评规定数,与第一检索条件整合得到第二检索条件;并在第二数据库内检索得到第二检索结果;判断第二检索结果是否是匹配成功;若否,则调用翻译程序对待转换语言进行翻译得到目标语言文字;获取音色、音调及响度得到待整合条件;根据待整合条件将目标语言文字进行语音转换得到目标语言;并发送至接收方。本发明提高语言转换效率以及准确率。(The invention relates to a multilingual conversion method, a device, a computer device and a storage medium, wherein the method comprises the steps of acquiring voice information and a receiving language set by a receiver; recognizing the voice information to obtain a language to be converted; integrating the language to be converted and the receiving language set by the receiver to obtain a first retrieval condition; and searching in the first database to obtain a first search result; judging whether the first retrieval result is matched successfully or not; if not, setting a specified number of good comments, and integrating the specified number with the first search condition to obtain a second search condition; searching in a second database to obtain a second search result; judging whether the second retrieval result is matched successfully; if not, calling a translation program to translate the language to be converted to obtain target language characters; obtaining timbre, tone and loudness to obtain conditions to be integrated; carrying out voice conversion on the target language characters according to the conditions to be integrated to obtain a target language; and sent to the recipient. The invention improves the language conversion efficiency and accuracy.)

1. A multilingual conversion method, comprising:

acquiring voice information from a sender and a receiving language set by a receiver;

identifying the voice information of a sender to obtain a language to be converted;

integrating the language to be converted and the receiving language set by the receiver to obtain a first retrieval condition;

searching in a first database according to the first searching condition to obtain a first searching result;

judging whether the first retrieval result is matched successfully or not;

if the first retrieval result is not matched successfully, setting a specified number of good comments, and integrating the specified number with the first retrieval condition to obtain a second retrieval condition;

searching in a second database according to the second searching condition to obtain a second searching result;

judging whether the second retrieval result is matched successfully or not;

if the second retrieval result is not matched successfully, calling a translation program to translate the language to be converted so as to obtain target language characters;

acquiring tone, tone and loudness set by a sender to obtain a condition to be integrated;

performing voice conversion on the target language characters according to the conditions to be integrated to obtain target voice;

and sending the target voice to a receiving party.

2. The multilingual conversion method of claim 1, wherein the first database comprises a sender-customized language library.

3. The multilingual conversion method of claim 1, wherein the determining whether the first search result is a successful match comprises:

and if the first search result is successfully matched, acquiring characters which are in accordance with the first search condition in the first database to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

4. The multilingual conversion method of claim 1, wherein the determining whether the second search result is a successful match comprises:

and if the second retrieval result is successfully matched, acquiring characters with the number of good comments being not less than the specified number of good comments and the number of good comments being the highest to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

5. The multilingual conversion method of claim 1, wherein, prior to the obtaining of the speech information from the sender and the receiving language set by the receiver, the method further comprises:

judging whether the sender is in a dormant state or not;

if the sender is in a dormant state, adopting a voice awakening technology to awaken the sender so as to obtain an awakening result;

judging whether the awakening is successful or not according to the awakening result;

if the awakening is successful, entering the receiving language set by the receiving party and acquiring the voice information from the sending party;

and if the sender is not in the dormant state, entering the receiving language set by the receiver and acquiring the voice information from the sender.

6. A multilingual conversion apparatus, comprising:

an acquisition unit configured to acquire voice information from a sender and a receiving language set by a receiver;

the recognition unit is used for recognizing the voice information of the sender to obtain the language to be converted;

a first retrieval condition obtaining unit, configured to integrate the language to be converted and a receiving language set by the receiving party to obtain a first retrieval condition;

the first retrieval unit is used for retrieving in the first database according to the first retrieval condition to obtain a first retrieval result;

the first judging unit is used for judging whether the first retrieval result is matched successfully or not;

a second retrieval condition obtaining unit, configured to set a specified number of good comments if the first retrieval result is not matched successfully, and integrate the specified number with the first retrieval condition to obtain a second retrieval condition;

the second retrieval unit is used for retrieving in the second database according to the second retrieval condition to obtain a second retrieval result;

a second judging unit, configured to judge whether the second search result is a successful match;

the translation unit is used for calling a translation program to translate the language to be converted to obtain target language characters if the second retrieval result is not matched successfully;

the device comprises a to-be-integrated condition acquisition unit, a to-be-integrated condition acquisition unit and a to-be-integrated condition acquisition unit, wherein the to-be-integrated condition acquisition unit is used for acquiring tone, tone and loudness set by a sender so as to obtain a to-be-integrated condition;

the voice conversion unit is used for carrying out voice conversion on the target language characters according to the conditions to be integrated so as to obtain target voice;

and the sending unit is used for sending the target voice to a receiving party.

7. The multilingual conversion apparatus of claim 6, further comprising:

and the first character acquisition unit is used for acquiring characters which are in accordance with the retrieval conditions in the first database to obtain target language characters if the first retrieval result is successfully matched, and acquiring the tone, the tone and the loudness set by the sender to obtain the conditions to be integrated.

8. The multilingual conversion apparatus of claim 7, further comprising:

and the second character acquisition unit is used for acquiring characters with the number of good comments being not less than the specified number of good comments and the highest number of good comments to obtain target language characters if the second search result is successfully matched, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

9. A computer arrangement, characterized in that the computer arrangement comprises a memory having stored thereon a computer program and a processor implementing the method according to any of claims 1-5 when executing the computer program.

10. A storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.

Technical Field

The present invention relates to a computer, and more particularly, to a multi-language conversion method, apparatus, computer device, and storage medium.

Background

With the rapid development of society, people want to see the outside world, but the language of each place is different, which causes the situations of language incoherence and difficult communication; still others, for physical reasons, cannot use body language, but are eager to communicate with the outside world.

Disclosure of Invention

The invention aims to overcome the defects of the prior art and provides a multi-language conversion method, a device, a computer device and a storage medium.

In order to achieve the purpose, the invention adopts the following technical scheme: a multi-language conversion method comprising:

acquiring voice information from a sender and a receiving language set by a receiver;

identifying the voice information of a sender to obtain a language to be converted;

integrating the language to be converted and the receiving language set by the receiver to obtain a first retrieval condition;

searching in a first database according to the first searching condition to obtain a first searching result;

judging whether the first retrieval result is matched successfully or not;

if the first retrieval result is not matched successfully, setting a specified number of good comments, and integrating the specified number with the first retrieval condition to obtain a second retrieval condition;

searching in a second database according to the second searching condition to obtain a second searching result;

judging whether the second retrieval result is matched successfully or not;

if the second retrieval result is not matched successfully, calling a translation program to translate the language to be converted so as to obtain target language characters;

acquiring tone, tone and loudness set by a sender to obtain a condition to be integrated;

performing voice conversion on the target language characters according to the conditions to be integrated to obtain target voice;

and sending the target voice to a receiving party.

The further technical scheme is as follows: the first database comprises a sender-customized language library.

The further technical scheme is as follows: the judging whether the first retrieval result is successfully matched includes:

and if the first search result is successfully matched, acquiring characters which are in accordance with the first search condition in the first database to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

The further technical scheme is as follows: the judging whether the second retrieval result is successfully matched includes:

and if the second retrieval result is successfully matched, acquiring characters with the number of good comments being not less than the specified number of good comments and the number of good comments being the highest to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

The further technical scheme is as follows: before the acquiring the voice information from the sender and the receiving language set by the receiver, the method further comprises the following steps:

judging whether the sender is in a dormant state or not;

if the sender is in a dormant state, adopting a voice awakening technology to awaken the sender so as to obtain an awakening result;

judging whether the awakening is successful or not according to the awakening result;

if the awakening is successful, entering the receiving language set by the receiving party and acquiring the voice information from the sending party;

and if the sender is not in the dormant state, entering the receiving language set by the receiver and acquiring the voice information from the sender.

The present invention also provides a multilingual language-conversion apparatus, comprising:

an acquisition unit configured to acquire voice information from a sender and a receiving language set by a receiver;

the recognition unit is used for recognizing the voice information of the sender to obtain the language to be converted;

a first retrieval condition obtaining unit, configured to integrate the language to be converted and a receiving language set by the receiving party to obtain a first retrieval condition;

the first retrieval unit is used for retrieving in the first database according to the first retrieval condition to obtain a first retrieval result;

the first judging unit is used for judging whether the first retrieval result is matched successfully or not;

a second retrieval condition obtaining unit, configured to set a specified number of good comments if the first retrieval result is not matched successfully, and integrate the specified number with the first retrieval condition to obtain a second retrieval condition;

the second retrieval unit is used for retrieving in the second database according to the second retrieval condition to obtain a second retrieval result;

a second judging unit, configured to judge whether the second search result is a successful match;

the translation unit is used for calling a translation program to translate the language to be converted to obtain target language characters if the second retrieval result is not matched successfully;

the device comprises a to-be-integrated condition acquisition unit, a to-be-integrated condition acquisition unit and a to-be-integrated condition acquisition unit, wherein the to-be-integrated condition acquisition unit is used for acquiring tone, tone and loudness set by a sender so as to obtain a to-be-integrated condition;

the voice conversion unit is used for carrying out voice conversion on the target language characters according to the conditions to be integrated so as to obtain target voice;

and the sending unit is used for sending the target voice to a receiving party.

The further technical scheme is as follows: further comprising:

and the first character acquisition unit is used for acquiring characters which are in accordance with the retrieval conditions in the first database to obtain target language characters if the first retrieval result is successfully matched, and acquiring the tone, the tone and the loudness set by the sender to obtain the conditions to be integrated.

The further technical scheme is as follows: further comprising:

and the second character acquisition unit is used for acquiring characters with the number of good comments being not less than the specified number of good comments and the highest number of good comments to obtain target language characters if the second search result is successfully matched, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

The invention also provides computer equipment which comprises a memory and a processor, wherein the memory is stored with a computer program, and the processor realizes the method when executing the computer program.

The invention also provides a storage medium storing a computer program which, when executed by a processor, is operable to carry out the method as described above.

Compared with the prior art, the invention has the beneficial effects that: the invention converts the voice information sent by the sender to form a language to be converted, and carries out multi-party conversion in the first database, the second database and the third translation tool according to the receiving language set by the receiver, so as to improve the accuracy of the language conversion, and translates the voice into the voice which can be received by the receiver according to the tone, the tone and the loudness, thereby realizing the improvement of the efficiency and the accuracy of the language conversion and meeting different user requirements.

The invention is further described below with reference to the accompanying drawings and specific embodiments.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

FIG. 1 is a diagram illustrating an application scenario of a multi-language transformation method according to an embodiment of the present invention;

FIG. 2 is a flowchart illustrating a multilingual conversion method according to an embodiment of the present invention;

FIG. 3 is a flowchart illustrating a multilingual conversion method according to another embodiment of the present invention;

FIG. 4 is a schematic block diagram of a multi-language conversion apparatus according to an embodiment of the present invention;

FIG. 5 is a schematic block diagram of a multi-language conversion apparatus according to another embodiment of the present invention;

FIG. 6 is a schematic block diagram of a computer device provided by an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

Referring to fig. 1 and fig. 2, fig. 1 is a schematic view illustrating an application scenario of a multi-language conversion method according to an embodiment of the present invention. FIG. 2 is a schematic flow chart of a multilingual conversion method according to an embodiment of the present invention. The multi-language conversion method is applied to a server, the server performs data interaction with a sender and a receiver, wherein the sender and the receiver are both terminals, and the server performs language conversion according to contents sent and received by the sender and the receiver, converts a certain language into another language and presents the language in a voice mode.

FIG. 2 is a flowchart illustrating a multilingual conversion method according to an embodiment of the present invention. As shown in fig. 2, the method includes the following steps S110 to S240.

S110, acquiring the voice information from the sender and the receiving language set by the receiver.

In this embodiment, an APP is installed on an interface of the sender, and a user can send a voice message through the terminal of the sender, and the receiving language set by the receiver refers to a type of voice received by the receiver, such as english, chinese, and the like.

And S120, identifying the voice information of the sender to obtain the language to be converted.

In this embodiment, the language to be converted refers to the text information after the voice information sent by the sender is converted.

In this embodiment, a voice recognition technology is specifically used to recognize voice information input by a sender, and convert the voice information into text information.

S130, integrating the language to be converted and the receiving language set by the receiving party to obtain a first retrieval condition.

In the present embodiment, the first search condition refers to the band conversion language that needs to be converted and the reception language set by the receiving side.

And S140, searching in the first database according to the first searching condition to obtain a first searching result.

In this embodiment, the first search result is a result of whether the search is successful or not, which is obtained by searching in the first database according to the first search condition.

In this embodiment, the first database comprises a sender-customized language library.

S150, judging whether the first retrieval result is matched successfully.

In this embodiment, first, the search is performed in the first database, and when the search in the first database is unsuccessful, the search is performed again in the second database, so as to improve the accuracy of the whole language conversion.

S160, if the first search result is successfully matched, obtaining the characters in the first database that meet the first search condition to obtain the target language characters, and entering step S220.

In this embodiment, the target language text refers to a language that can be received by the receiving party after the language conversion to be performed.

S170, if the first search result is not matched successfully, setting a specified evaluation number, and integrating the specified evaluation number with the first search condition to obtain a second search condition.

In the present embodiment, the second search condition is a condition including the set number of good comments and the first search condition in combination, that is, the first search condition and the number of good comments must be satisfied.

And S180, searching in the second database according to the second searching condition to obtain a second searching result.

In this embodiment, the second database is referred to as the citizens public database. The people public library is a database for people to participate in translation, and particularly provides for users using the system globally to participate in translation. Such as: hello, translate to english; chinese: hello, english: hello; chinese: hello, english: hi; for the people-wide library, in order to reduce the storage amount of data on one hand and avoid some users from submitting irrelevant data maliciously on the other hand, the system can automatically screen at regular intervals and process the data with low vote number.

Certainly, the user-defined language library refers to a database formed by user-defined translation, so that a set of communication rule libraries belonging to the user can be translated by the user, the system searches the libraries firstly during character conversion, and if the user does not call a translation tool, the speech synthesis is directly carried out.

In this embodiment, the second search result is a result of whether the search was successful or not, which is obtained by performing the search in the second database according to the second search condition.

S190, judging whether the second retrieval result is matched successfully or not;

s200, if the second search result is successfully matched, obtaining characters with the number of good comments being not less than the specified number of good comments and the number of good comments being the highest to obtain characters of the target language, and entering the step S220.

The number of good comments of each piece of matched data is greater than the number of good comments, so that the artificial malicious translation can be prevented as much as possible, for example, the number of good comments is 100, the number of good comments of the piece of matched target language characters is greater than 100 to be selected for use, and then a piece of information with the highest number of good comments and the number of good comments greater than the number of good comments is acquired as the target language characters.

And S210, if the second retrieval result is not matched successfully, calling a translation program to translate the language to be converted so as to obtain the target language characters.

And recognizing the voice information of the sender as voice to be converted by calling a translation module or using a third translation tool according to the language which can be received and is set by the receiver, and translating the voice converted words into the words which can be received by the receiver.

S220, obtaining the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

In this embodiment, the above-mentioned conditions to be integrated refer to the conditions required for converting the target language characters into voice.

For obtaining the tone set by the sender, the user is allowed to collect the tone of the user when using the system, so as to ensure that the receiver can distinguish the other party and achieve the purpose of real simultaneous voice barrier-free voice communication. The tone and loudness can be customized by the user to set the tone and loudness of the synthesized sound, and the system has default settings.

And S230, carrying out voice conversion on the target language characters according to the conditions to be integrated to obtain target voice.

In this embodiment, the target speech is a speech synthesized by synthesizing the translated text, the extracted tone, the set pitch, and the loudness by a speech synthesis technique into a sound that can be understood by the receiving party.

And S240, sending the target voice to a receiving party.

In the whole process, in the process of searching the first database and the second database, a large data searching and matching technology is adopted, and in a mechanism for providing translation for the whole people, a large amount of data exists, so that the mode storage of sub-tables and sub-bases is adopted, and the searching needs to be carried out in a distributed multi-thread mode when the matched data is searched.

In the whole process, in order to ensure the speed of data processing and to ensure the normal operation of the servers, high-performance cluster servers can be adopted, and a high-quality network is used, so that the delay of sending data is reduced.

The multi-language conversion method converts the voice information sent by the sender to form the language to be converted, performs multi-party conversion in the first database, the second database and the third translation tool according to the receiving language set by the receiver so as to improve the accuracy of the language conversion, and translates the voice into the voice which can be received by the receiver according to the tone, the tone and the loudness, thereby realizing the improvement of the efficiency and the accuracy of the language conversion and meeting different user requirements.

FIG. 3 is a flowchart illustrating a multilingual conversion method according to another embodiment of the present invention. As shown in fig. 3, the multilingual conversion method of the present embodiment includes steps S310 to S470. Steps S340 to S470 are similar to steps S110 to S240 in the above embodiments, and are not described herein again. The added steps S310 to S330 in the present embodiment are described in detail below.

S310, judging whether the sender is in a dormant state or not;

s320, if the sender is in a dormant state, adopting a voice awakening technology to awaken the sender so as to obtain an awakening result;

s330, judging whether the awakening is successful according to the awakening result;

if the awakening is successful, the step S340 is entered;

if the sender is not in the dormant state, the step S340 is entered.

The sender is set to be in a background running state in a standby state, when the voice input is identified to be a wake-up instruction by the server, the sender is automatically woken up, and voice prompt is carried out, for example: when the voice chat system is activated, please select the sending object or the receiving party by voice, and continue to perform voice prompt: the recipient of your selection is. At this time, the sender may input the ID number or nickname of the receiver by voice (both ID and nickname are unique), such as: 10000000 or zhang san, after the server receives the order, according to the default language set up by the sender, carry on speech recognition and turn into the characters, then the server searches and retrieves the friend's storehouse of the sender automatically, if there is this friend, carry on the voice prompt, if: "establishing connection with Zhang III and please chat in a bar as much as possible"; if no friend is searched, voice prompt is carried out, no friend is found, and voice prompt is continued: the receiver selected by you is until a friend is found, but if the server waits for 30s and does not receive the voice message, the sender is automatically in a dormant state, and if the sender is used again, the sender needs to be awakened again. Under the condition that the friend is searched, the sender can send the voice message to the friend at any time, and after the sender says a sentence, if the server does not receive the voice message again after 3s, the server can automatically send the voice message. If the friend does not send the message again at the time interval of 5 minutes from the last message sending time, the conversation connection with Zhang III is automatically disconnected, and the sender is in a dormant state; if the friend is required to be switched, a friend switching instruction is input through voice, and the friend is switched. When the server receives the voice information of the sender, the language set by the receiver is firstly acquired, then the voice information is compared with the language set by the sender, if the voice information is the same as the language set by the sender, the voice information is directly sent, and if the voice information is not the same as the language set by the receiver, the server enters a voice information processing module, processes the information into the voice information of the language set by the receiver, and then automatically sends the voice information to the receiver.

The sending party and the receiving party have two using modes in the interface running state, one using mode is the same as that in the standby state, and a friend mode can be selected by voice, and the friend mode can only communicate with one friend. One is that the sender manually selects friends, the voice input button is required to be pressed when the voice information is input, and the sender can automatically send the voice information by releasing the button after the voice information is input. And after receiving the voice message, the server compares the languages or enters a language processing module, and sends the processed target voice. After the receiver receives the information, the system can judge whether to play the voice information according to whether the voice information is automatically played or not set by the receiver.

When the sender is in a standby awakening state, voice chat is carried out by adopting a single channel, the single channel can only be in call connection with one friend, and if the friend is to be switched, the voice instruction is input again to switch the friend. The chat performed by the sender through the interface adopts multiple channels, and a plurality of friends can be manually selected to perform chat at the same time.

Fig. 4 is a schematic block diagram of a multi-language conversion apparatus 300 according to an embodiment of the present invention. As shown in fig. 4, the present invention also provides a multi-language converting apparatus 300 corresponding to the above multi-language converting method. The multilingual conversion apparatus 300 includes a unit for performing the above-described multilingual conversion method, and the apparatus may be configured in a server.

Specifically, referring to fig. 4, the multi-language conversion apparatus 300 includes:

an acquisition unit 304 for acquiring the voice information from the sender and the receiving language set by the receiver;

a recognition unit 305, configured to recognize voice information of a sender to obtain a language to be converted;

a first retrieval condition obtaining unit 306, configured to integrate the language to be converted and the receiving language set by the receiving party to obtain a first retrieval condition;

a first retrieving unit 307, configured to perform a retrieval in the first database according to the first retrieval condition to obtain a first retrieval result;

a first judging unit 308, configured to judge whether the first search result is a successful match;

a second search condition obtaining unit 309, configured to set a predetermined number of good evaluations if the first search result is not matched successfully, and integrate the predetermined number with the first search condition to obtain a second search condition;

a second retrieving unit 310, configured to perform a retrieval in the second database according to the second retrieving condition to obtain a second retrieving result;

a second judging unit 311, configured to judge whether the second search result is a successful match;

a translation unit 312, configured to, if the second search result is not matched successfully, invoke a translation program to translate the language to be converted, so as to obtain target language characters;

a to-be-integrated condition obtaining unit 313, configured to obtain a tone, and a loudness set by the sender, so as to obtain a to-be-integrated condition;

the voice conversion unit 314 is configured to perform voice conversion on the target language characters according to the condition to be integrated, so as to obtain a target voice;

a sending unit 315, configured to send the target voice to a receiving party.

In one embodiment, the method further comprises:

a first text obtaining unit 316, configured to, if the first search result is successfully matched, obtain a text that matches the search condition in the first database to obtain a target language text, and enter the obtaining of the tone, and the loudness set by the sender to obtain a condition to be integrated.

In one embodiment, the method further comprises:

a second character obtaining unit 317, configured to, if the second search result is successfully matched, obtain characters with the highest evaluation number that are not less than the specified evaluation number to obtain target language characters, and enter the tone, and the loudness set by the sender to obtain a condition to be integrated.

Fig. 5 is a schematic block diagram of a multi-language conversion apparatus 300 according to another embodiment of the present invention. As shown in fig. 5, the multi-language converting apparatus 300 of the present embodiment is added with a state determining unit 301, a wake-up unit 302 and a wake-up determining unit 303.

A state determining unit 301, configured to determine whether the sender is in a dormant state; and if the sender is not in the dormant state, entering the receiving language set by the receiver and acquiring the voice information from the sender.

A waking unit 302, configured to wake up the sender by using a voice wake-up technique if the sender is in a dormant state, so as to obtain a wake-up result;

a wake-up determining unit 303, configured to determine whether the wake-up is successful according to a wake-up result; and if the awakening is successful, entering the receiving language set by the receiving party and acquiring the voice information from the sending party.

It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation processes of the multi-language converting apparatus 300 and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.

The above-described multilingual conversion apparatus 300 may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 6.

Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a server, which may be an independent server or a server cluster composed of a plurality of servers.

Referring to fig. 6, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.

The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032 include program instructions that, when executed, cause the processor 502 to perform a multi-language translation method.

The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.

The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a multi-language conversion method.

The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation of the computer device 500 to which the present application may be applied, and that a particular computer device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

Wherein the processor 502 is configured to run the computer program 5032 stored in the memory to implement the following steps:

acquiring voice information from a sender and a receiving language set by a receiver; identifying the voice information of a sender to obtain a language to be converted; integrating the language to be converted and the receiving language set by the receiver to obtain a first retrieval condition; searching in a first database according to the first searching condition to obtain a first searching result; judging whether the first retrieval result is matched successfully or not; if the first retrieval result is not matched successfully, setting a specified number of good comments, and integrating the specified number with the first retrieval condition to obtain a second retrieval condition; searching in a second database according to the second searching condition to obtain a second searching result; judging whether the second retrieval result is matched successfully or not; if the second retrieval result is not matched successfully, calling a translation program to translate the language to be converted so as to obtain target language characters; acquiring tone, tone and loudness set by a sender to obtain a condition to be integrated; performing voice conversion on the target language characters according to the conditions to be integrated to obtain target voice; and sending the target voice to a receiving party.

Wherein the first database comprises a sender-defined language library.

In an embodiment, when the step of determining whether the first search result is a successful match is implemented by the processor 502, the following steps are specifically implemented:

and if the first search result is successfully matched, acquiring characters which are in accordance with the first search condition in the first database to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

In an embodiment, when the step of determining whether the second search result is a successful match is implemented by the processor 502, the following steps are specifically implemented:

and if the second retrieval result is successfully matched, acquiring characters with the number of good comments being not less than the specified number of good comments and the number of good comments being the highest to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

In one embodiment, the processor 502 further implements the following steps before implementing the steps of acquiring the voice message from the sender and the receiving language set by the receiver:

judging whether the sender is in a dormant state or not;

if the sender is in a dormant state, adopting a voice awakening technology to awaken the sender so as to obtain an awakening result;

judging whether the awakening is successful or not according to the awakening result;

if the awakening is successful, entering the receiving language set by the receiving party and acquiring the voice information from the sending party;

and if the sender is not in the dormant state, entering the receiving language set by the receiver and acquiring the voice information from the sender.

It should be understood that, in the embodiment of the present Application, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

It will be understood by those skilled in the art that all or part of the flow of the method implementing the above embodiments may be implemented by a computer program instructing associated hardware. The computer program includes program instructions, and the computer program may be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.

Accordingly, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program, when executed by a processor, causes the processor to perform the steps of:

acquiring voice information from a sender and a receiving language set by a receiver; identifying the voice information of a sender to obtain a language to be converted; integrating the language to be converted and the receiving language set by the receiver to obtain a first retrieval condition; searching in a first database according to the first searching condition to obtain a first searching result; judging whether the first retrieval result is matched successfully or not; if the first retrieval result is not matched successfully, setting a specified number of good comments, and integrating the specified number with the first retrieval condition to obtain a second retrieval condition; searching in a second database according to the second searching condition to obtain a second searching result; judging whether the second retrieval result is matched successfully or not; if the second retrieval result is not matched successfully, calling a translation program to translate the language to be converted so as to obtain target language characters; acquiring tone, tone and loudness set by a sender to obtain a condition to be integrated; performing voice conversion on the target language characters according to the conditions to be integrated to obtain target voice; and sending the target voice to a receiving party.

Wherein the first database comprises a sender-defined language library.

In an embodiment, when the processor executes the computer program to implement the step of determining whether the first search result is a successful match, the following steps are specifically implemented:

and if the first search result is successfully matched, acquiring characters which are in accordance with the first search condition in the first database to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

In an embodiment, when the processor executes the computer program to implement the step of determining whether the second search result is a successful match, the following steps are specifically implemented:

and if the second retrieval result is successfully matched, acquiring characters with the number of good comments being not less than the specified number of good comments and the number of good comments being the highest to obtain target language characters, and acquiring the tone, the tone and the loudness set by the sender to obtain the condition to be integrated.

In an embodiment, before the step of obtaining the voice information from the sender and the receiving language set by the receiver is implemented by executing the computer program, the processor further implements the following steps:

judging whether the sender is in a dormant state or not; if the sender is in a dormant state, adopting a voice awakening technology to awaken the sender so as to obtain an awakening result; judging whether the awakening is successful or not according to the awakening result; if the awakening is successful, entering the receiving language set by the receiving party and acquiring the voice information from the sending party; and if the sender is not in the dormant state, entering the receiving language set by the receiver and acquiring the voice information from the sender.

The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, which can store various computer readable storage media.

Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.

The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be merged, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention.

While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电子标签赋码系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!