Voice processing method and device, equipment and storage medium
Patent Information
- Application Number
- CN202410648957.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-11-01
AI Technical Summary
[0003]相关技术中,面向车载系统的唤醒或控制一般为唯一语种集,构建多语种的车控指令集往往占用资源较高,并且随着客户国家种类的增多,后续维护成本较高
[0010] In the embodiment of the present application, the text processing process includes matching processing and model processing. If the matching processing fails, the second control instruction is generated by processing the model, so that the control instruction can be generated more efficiently and accurately.
Smart Images

Figure CN118887952A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile technology, and in particular to a speech processing method, device, equipment and storage medium. Background Art
[0002] With the development of business, there are more and more demands for going abroad in the field of vehicle control, and often involve several different countries. At this time, a voice processing solution that can quickly adapt to different countries is needed.
[0003] In the related technology, the wake-up or control of the vehicle system is generally a unique language set. Building a multi-language vehicle control instruction set often takes up a lot of resources, and as the number of customer countries increases, the subsequent maintenance cost is high. Summary of the invention
[0004] Based on the above problems, the embodiments of the present application provide a speech processing method, apparatus, device and storage medium.
[0005] The technical solution provided by the embodiment of the present application is as follows:
[0006] An embodiment of the present application first provides a voice processing method, which includes: obtaining a first text in a first language generated based on a user voice; performing a matching process on the first text to obtain a first control instruction; if the matching process does not hit, generating a second control instruction based on the first text and a processing model; wherein the first control instruction or the second control instruction is used to control a vehicle.
[0007] An embodiment of the present application also provides a speech processing device, which includes: a first acquisition module, used to acquire a first text in a first language generated based on user speech; a first processing module, used to match the first text to obtain a first control instruction; a second processing module, used to generate a second control instruction based on the first text and a processing model when the matching process does not hit; wherein the first control instruction or the second control instruction is used to control a vehicle.
[0008] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the speech processing method described in the embodiment of the present application are implemented.
[0009] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the speech processing method described in the embodiment of the present application are implemented.
[0010] In an embodiment of the present application, the text processing process includes matching processing and model processing. When the matching processing does not hit, a second control instruction is generated by processing the model, thereby enabling a control instruction to be generated more efficiently and accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 A flowchart of a speech processing method according to an embodiment of the present application;
[0012] Figure 2 This is a flow chart of another speech processing method according to an embodiment of the present application;
[0013] Figure 3 A flowchart of another speech processing method according to an embodiment of the present application;
[0014] Figure 4 A flowchart of another speech processing method according to an embodiment of the present application;
[0015] Figure 5 A flowchart of a speech processing method according to an embodiment of the present application is provided;
[0016] Figure 6 A flowchart of a speech processing method according to an embodiment of the present application is provided;
[0017] Figure 7 A flowchart of a speech processing method according to an embodiment of the present application is provided;
[0018] Figure 8 A schematic diagram of the structure of a speech processing device according to an embodiment of the present application;
[0019] Fig. 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0021] Figure 1 A flow chart of a speech processing method according to an embodiment of the present application is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0022] Step 102: Obtain a first text in a first language generated based on user speech;
[0023] Among them, since there are more and more demands for going abroad in the field of vehicle control, and it often involves several different countries, it is possible to provide a voice processing method that can quickly adapt to multiple different countries and support multi-language recognition of drivers and passengers. Since there are often no cloud servers overseas, the voice processing method can be designed as an offline voice mode.
[0024] The user voice may be the voice uttered by the vehicle's driver and passengers for controlling the vehicle, and the first language may be the target language that the vehicle's on-board system can recognize and convert into control instructions; the first language may be Chinese, English, etc.; the language used by the driver and passengers may or may not be the first language. When the language used by the driver and passengers is not the first language, the user voice may be recognized to generate a user text in the corresponding language, and then the user text may be translated into the first text in the first language.
[0025] Step 104: performing matching processing on the first text to obtain a first control instruction;
[0026] Step 106: if the matching process fails to find a hit, generating a second control instruction based on the first text and the processing model;
[0027] Among them, in the text processing stage, it can be divided into fast processing and model processing. Fast processing can be matching processing, that is, determining the first control instruction that matches the first text. In the case of a match failure (i.e., the match cannot be successful), the first text can be input into the processing model to obtain the second control instruction output by the processing model. During model processing, the model can be trained using the open source model BERT. Considering the limitations of the car system, the Tiny version can be used, and the Android deployment solution used can be PyTorch Mobile.
[0028] The first control instruction or the second control instruction is used to control the vehicle.
[0029] The first control instruction or the second control instruction may be to open a car window, open a car door, navigate to a hospital, adjust the air conditioner to 19 degrees, etc.
[0030] In an embodiment of the present application, during the text processing, matching processing and model processing are combined, and when the matching processing does not hit, a second control instruction is generated by processing the model, thereby enabling a more efficient and accurate generation of a control instruction.
[0031] In some embodiments, the method further comprises:
[0032] Step 1011: Acquire the user voice;
[0033] Step 1012: performing speech recognition processing on the user speech to obtain a second text in a second language;
[0034] Among them, the user's voice can be converted into the second language used by the user through automatic speech recognition (Automatic Speech Recognition, ASR), and the second language supported by the vehicle system for translation can be set in advance, such as at least one of English, Korean, Chinese, Japanese, French, and Spanish; after the vehicle system obtains the user's voice, the second text in the second language corresponding to the user's voice can be automatically recognized.
[0035] Step 1013: When the second language is different from the first language, translate the second text into the first text.
[0036] If the second language is the same as the first language, no translation is required and the text processing stage is directly entered to match the second text. If the first language is Chinese and the second language is Thai, if the result of the second text obtained by speech recognition is (Navigate to a gas station), then the corresponding first text obtained after translation may be "Navigate to a nearby gas station".
[0037] In the embodiment of the present application, by performing speech recognition processing on the user's speech, a second text in a second language is obtained, so that the text corresponding to the user's speech can be determined more accurately.
[0038] In some embodiments, in step 1013, "translating the second text into the first text" includes the following steps:
[0039] Step 10131: performing language conversion processing on the second text to obtain the first text;
[0040] The language conversion process may be to realize the conversion between texts in different languages, such as converting Thai into Chinese, converting English into Chinese, or converting English into Korean.
[0041] Step 10132: When the language conversion process fails to produce a hit, the first text is generated based on the second text and a translation model.
[0042] Among them, in the translation stage, it can be divided into fast translation and model translation. Fast translation can be language conversion processing, that is, determining the first text in the first language corresponding to the second text in the second language. In the case where the language conversion processing fails to hit (that is, it cannot be successfully converted and there is no first text corresponding to the second text), the second text can be input to the translation model to obtain the first text output by the translation model. After the translation stage, a text processing stage (also known as the post-translation processing stage) can be carried out. When using model translation, a model obtained by secondary training using some open-source translation models can be used for translation.
[0043] The voice processing solution provided by the embodiments of the present application can support countries in different languages. In the two stages of the fast translation stage of translation and the fast processing of post-translation processing, unrecognized voices can be quickly processed. If a new instruction from the user is recognized, only by adding a translation conversion table and a fast matching table can the requirements be met.
[0044] In some embodiments, step 10131 "performing language conversion processing on the second text to obtain the first text" includes the following steps:
[0045] Step 101311: Based on the second text, and the language conversion table between the first language and the second language, determining the first part of the first text corresponding to the second text and the first slot to be determined;
[0046] Table 1 Thai-Chinese conversion table
[0047]
[0048] Among them, as shown in Table 1 above, the language conversion table can be a Thai-Chinese conversion table, that is, Thai can be converted into Chinese. When the second text is Thai (Navigate to the gas station), the first data of the first text (that is, the first part of the first text) can be matched, and the first text obtained is the Chinese "Navigate to ${SLOT1}", where ${SLOT1} represents a slot, and it can be known by regular expression matching (Navigate to) means "Navigate to", and the remaining part (the gas station) is the first slot to be determined, and it is matched with the first slot table in Table 2 below.
[0049] Step 101312: Based on the first slot table, determining the second part of the first text corresponding to the first slot to be determined;
[0050] Table 2 First slot table
[0051]
[0052] According to Table 2 above, the first slot to be determined can be matched. The first text corresponding to (gas station) is "gas station".
[0053] Step 101313: Generate the first text based on the first part and the second part.
[0054] Among them, by splicing the first part "navigation to" and the second part "gas station", the translation result (ie, the first text) can be obtained as "navigation to gas station".
[0055] In an embodiment of the present application, the first part of the first text can be determined according to the language conversion table, and then the second part of the first text can be determined according to the first slot table. Finally, the first text can be generated according to the first part and the second part, thereby improving the generalization ability of language conversion and determining the first text corresponding to the second text more accurately and efficiently.
[0056] In some embodiments, step 104 of "matching the first text to obtain a first control instruction" includes the following steps:
[0057] Step 1041: determining information points, fields, and intentions that match the first text based on the matching table;
[0058] Step 1042: Generate a first control instruction based on the information point, the domain and the intention.
[0059] Table 3 Quick Match Table
[0060]
[0061] Among them, when the translation result is "Navigate to the gas station", the information point (poi) can be obtained as "gas station", the domain (domain) is "navi", and the intent (intent) is "navi_to_poi" according to the quick matching table shown in Table 3. The first control instruction {"slots":{"poi":"gas station"},"domain":"navi","intent":"navi_to_poi"} is generated based on the information point, domain and intent, indicating that the user wants to navigate to the gas station. At this time, it can return directly without calling subsequent model processing.
[0062] When the translation result is "open the car window", according to the quick matching table shown in Table 3, it can be obtained that the information point (poi) is empty, the domain (domain) is "car_command", and the intent (intent) is "open_window". Based on the information point, domain and intent, the first control instruction {"asr":"open the car window","domain":"car_command","intent":"open_window"} is generated, indicating that the user wants to open the car window.
[0063] When the translation result is "open the car door", according to the quick matching table shown in Table 3, it can be obtained that the information point (poi) is empty, the domain (domain) is "car_command", and the intent (intent) is "door_open_auto_door". Based on the information point, domain and intent, the first control instruction {"asr":"open the car door {\"domain":"car_command\",\"intent\":\"door_open_auto_door\"} is generated, indicating that the user wants to open the car door.
[0064] When the translation result is "seat heating to level 2", according to the quick matching table shown in Table 3, the information point (poi) is {"number":2}, the domain (domain) is "car_command", and the intent (intent) is "set_seat_heating". Based on the information point, domain and intent, the first control instruction {"slots":"poi"{"number":2},"domain":"car_command","intent":"set_seat_heating"} is generated, indicating that this sentence (Seat temperature is level 2) The user wants to set it as heating, and sets the heating level to 2.
[0065] In an embodiment of the present application, the information points, fields and intentions matching the first text can be first determined based on a matching table, and then a first control instruction can be generated based on the information points, the fields and the intentions, thereby enabling the first control instruction to be generated more accurately and efficiently.
[0066] In some embodiments, the processing model includes a classification model and a named entity recognition (NER) model, and step 106 of "generating a second control instruction based on the first text and the processing model" includes the following steps:
[0067] Step 1061: inputting the first text into the classification model so that the classification model outputs a first character string;
[0068] Step 1062: Determine the domain and intent corresponding to the first character string based on the first character string and domain intent comparison table;
[0069] Among them, after inputting the first text, the classification model can output a first string "0010056". The result can be obtained by querying the domain intent comparison table. "001" represents the domain, and "0056" represents the intent. The intent can be obtained as "set_seat_heating", so the intent is {"domain":"car_command","intent":"set_seat_heating"}, as shown in the domain intent comparison table in Table 4 below:
[0070] Table 4: Domain intent comparison table
[0071]
[0072] Step 1063: inputting the first text into the NER model so that the NER model outputs a second character string;
[0073] Step 1064: Determine a non-zero second slot to be determined based on the second character string and the second slot table;
[0074] After inputting the first text, the NER model can output the second string "0,0,0,0,0,0,0,3,0." The position of the non-zero number in the second string can be considered as the second slot to be determined. When the Chinese text is "Adjust the seat heating to gear 2", the number 3 is in the second to last position of the second string, so it can be known that the two in "gear 2" is the corresponding second slot to be determined. By querying the second slot table in Table 5, it can be known that 3 represents a number, so the second slot to be determined is {"slots":{"number":2}}.
[0075] Table 5: Second slot table
[0076] number Slot Name 3 NUMBER 19 POI (location information) 23 COLOR
[0077] Step 1065: Generate a second control instruction based on the domain, the intention and the second slot to be determined.
[0078] Among them, a second control instruction can be generated based on the domain, the intent and the second slot to be determined: "{"slots":"poi"{"number":2},"domain":"car_command","intent":"set_seat_heating"}".
[0079] In some embodiments, the second slot to be determined includes at least one of a number, position information, and a color.
[0080] In an embodiment of the present application, the field and intention corresponding to the first text can be determined based on the classification model, and then the second slot to be determined corresponding to the first text can be determined based on the NER model. Then, the field, intention and the second slot to be determined can be sorted out to obtain the second control instruction, so that the second control instruction can be determined more accurately and efficiently.
[0081] With the development of business, there are more and more demands for going abroad in the field of vehicle control, and it often involves several different countries. At this time, a voice processing solution that can quickly adapt to different countries is needed. Because there are often no cloud servers overseas, it is necessary to design an offline voice mode. Generally speaking, the offline solution does not need to support very rich content, but only needs to meet basic daily use. Of course, the solution's standardization and processing capabilities can meet basic usage scenarios without any pressure.
[0082] In some embodiments, Figure 7 As shown, the basic flow of the speech processing method may be: ASR (speech recognition) stage 21, translation stage 22, post-translation processing stage 23 and result return stage 24.
[0083] The solution of the embodiment of the present application performs different special processing on the translation stage 22 and the post-translation processing stage 23, and adopts the design of the strategy pattern in the code to adapt to the support of different countries.
[0084] The translation stage 22 mainly consists of two parts: fast translation and model translation. Fast translation can serve as a backup. Once a new ASR result that is not supported is identified, it can be quickly configured.
[0085] The post-translation processing stage 23 is also divided into two parts: fast processing and model processing. Since model processing is slow or recognition is sometimes not accurate enough, fast processing can be used as a backup.
[0086] The ASR stage 21 of speech processing converts the binary stream into text;
[0087] Translation stage 22: Quick translation: If it is a Chinese strategy, no translation is required here, and it is directly given to stage 3. If it is Thai (similar to English), assume that the result of ASR is (navigation to gas station), as shown in Table 1 below:
[0088] Table 1 Thai-Chinese conversion table
[0089]
[0090] According to the above Table 1, (Navigation to gas station) can match the first data, and get the Chinese as navigation to ${SLOT1}. It can be known from the regular expression matching (navigation go) means "navigation go", the rest (Gas station) should be a slot, and the first slot table in Table 2 below is used for matching:
[0091] Table 2 First slot table
[0092]
[0093] Can match (Gas station) is a gas station, so the translation result is "Navigate to the gas station".
[0094] Model translation can be achieved by using some open source translation models and performing secondary training.
[0095] In the post-translation processing stage 23, there is a quick matching table as shown in Table 3 below.
[0096] Table 3 Quick Match Table
[0097]
[0098] For example, if the translation result is "navigate to gas station", then according to Table 3, the result can be {"slots":{"poi":"gas station"},"domain":"navi","intent":"navi_to_poi"}, which is returned directly without calling subsequent model processing.
[0099] Model processing is divided into two models. The model can be trained using the open source model BERT. Considering the limitations of the car system, the tiny version can be used. The Android deployment solution used can be pytorch mobile.
[0100] Classification model: A string of "0010056" can be obtained. This result needs to be obtained by querying the domain comparison table. "001" represents the domain, and "0056" represents the intent. The intent can be obtained as "set_seat_heating", so the intent is {"domain":"car_command","intent":"set_seat_heating"}, as shown in the domain intent comparison table in Table 4 below:
[0101] Table 4: Domain intent comparison table
[0102]
[0103]
[0104] NER model: "0,0,0,0,0,0,3,0," can be obtained, and the corresponding Chinese is "seat heating adjusted to gear 2." The number 3 is in the second-to-last position, so it can be known that the second of "gear 2" is the corresponding slot. By querying the second slot table in Table 5, it can be known that 3 represents a number, so the slot {"slots":{"number":2}} is obtained.
[0105] Table 5: Second slot table
[0106] number Slot Name 3 NUMBER 19 POI (location information) 23 COLOR
[0107] Explain the result "{"slots":{"number":2},"domain":"car_command","intent":"set_seat_heating"}" to mean this sentence (Seat temperature is level 2) The user wants to set it as heating, and sets the heating level to 2.
[0108] The speech processing scheme provided by the embodiment of the present application can support different countries, can quickly adapt to different countries, and quickly add different countries, only need to configure Thai Chinese conversion table, slot table and other information. In the two stages of fast translation stage of translation and fast processing of post-translation processing, it can be used as a backup, and can quickly process unrecognized speech. If the user's new instructions are recognized, only need to add the translation conversion table and the fast matching table to meet the needs. The scheme of the embodiment of the present application has a fast processing speed. The full set of schemes can be processed at the fastest speed of about 50ms each time, and the slowest is no more than 500ms. The response speed can fully meet the daily use needs.
[0109] The model used by the vehicle (Android) can be exactly the same as the model used by the server, which can basically ensure that the results on the server and the vehicle are consistent, saving development costs and avoiding inconsistent data from both ends. The embodiment of the present application occupies a small system. Due to the use of the tiny version, the total size of the model does not exceed 100M. The embodiment of the present application solves the overseas network problem. This solution does not require an overseas cloud server, and all operations are performed locally on the vehicle.
[0110] It should be noted that in the embodiment of the present application, if the above-mentioned voice processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a mobile phone, a tablet computer, a desktop, a personal digital assistant, a navigator, a digital phone, a video phone, a television, a sensor device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0111] Figure 8 FIG. 1 is a schematic diagram of the structure of a speech processing device according to an embodiment of the present application. Figure 8 As shown, the speech processing device 300 includes: a first acquisition module 301, a first processing module 302 and a second processing module 303, wherein:
[0112] A first acquisition module 301, used to acquire a first text in a first language generated based on a user voice;
[0113] A first processing module 302 is used to perform matching processing on the first text to obtain a first control instruction;
[0114] A second processing module 303 is used to generate a second control instruction based on the first text and the processing model when the matching process does not hit the target;
[0115] The first control instruction or the second control instruction is used to control the vehicle.
[0116] In some embodiments, the device further includes: a second acquisition module for acquiring the user voice; a recognition module for performing voice recognition processing on the user voice to obtain a second text in a second language; and a translation module for translating the second text into the first text when the second language is different from the first language.
[0117] In some embodiments, the translation module includes: a conversion submodule, used to perform language conversion processing on the second text to obtain the first text; and a translation submodule, used to generate the first text based on the second text and a translation model when the language conversion processing does not hit the target.
[0118] In some embodiments, the conversion submodule includes: a first determination unit, used to determine the first part of the first text and the first to-be-determined slot corresponding to the second text based on the second text and the language conversion table between the first language and the second language; a second determination unit, used to determine the second part of the first text corresponding to the first to-be-determined slot based on the first slot table; and a generation unit, used to generate the first text based on the first part and the second part.
[0119] In some embodiments, the first processing module 302 includes: a first determination submodule, used to determine the information points, fields and intentions that match the first text based on a matching table; and a first generation submodule, used to generate a first control instruction based on the information points, the fields and the intentions.
[0120] In some embodiments, the processing model includes a classification model and a named entity recognition (NER) model, and the second processing module 303 includes: a first input submodule, used to input the first text into the classification model so that the classification model outputs a first character string; a second determination submodule, used to determine the domain and intention corresponding to the first character string based on the first character string and the domain intention comparison table; a second input submodule, used to input the first text into the NER model so that the NER model outputs a second character string; a third determination submodule, used to determine a non-zero second slot to be determined based on the second character string and the second slot table; a second generation submodule, used to generate a second control instruction based on the domain, the intention and the second slot to be determined.
[0121] In some embodiments, the second slot to be determined includes at least one of a number, position information, and a color.
[0122] Based on the above embodiments, the present application also provides an electronic device, Fig. 9 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Fig. 9 As shown, the hardware entity of the electronic device 400 includes: a memory 401 and a processor 402, wherein the memory 401 stores a computer program that can be run on the processor 402, and the processor 402 implements the steps of the speech processing method in the above embodiment when executing the program.
[0123] The memory 401 is configured to store instructions and applications executable by the processor 402, and can also cache data to be processed or processed by the processor 402 and various modules in the device 400 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0124] Based on the foregoing embodiments, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor of an electronic device, the speech processing method provided in any of the previous embodiments can be implemented.
[0125] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0126] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0127] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0128] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0129] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0130] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0131] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0136] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A speech processing method, It is characterized in that The method comprises: Obtaining a first text in a first language generated based on the user's voice; Performing matching processing on the first text to obtain a first control instruction; In the case where the matching process does not hit, generating a second control instruction based on the first text and the processing model; The first control instruction or the second control instruction is used to control the vehicle.
2. The method according to claim 1, It is characterized in that The method further comprises: Acquiring the user voice; Performing speech recognition processing on the user speech to obtain a second text in a second language; When the second language is different from the first language, the second text is translated into the first text.
3. The method according to claim 2, It is characterized in that The translating the second text into the first text comprises: Performing language conversion processing on the second text to obtain the first text; When the language conversion process fails, the first text is generated based on the second text and a translation model.
4. The method according to claim 3, It is characterized in that The performing language conversion processing on the second text to obtain the first text includes: Determine, based on the second text and a language conversion table between the first language and the second language, a first part of the first text and a first to-be-determined slot corresponding to the second text; Determine, based on the first slot table, a second part of the first text corresponding to the first to-be-determined slot; The first text is generated based on the first part and the second part.
5. The method according to any one of claims 1 to 4, It is characterized in that The matching process of the first text to obtain the first control instruction includes: Based on the matching table, determining information points, fields, and intentions that match the first text; Based on the information point, the domain and the intention, a first control instruction is generated.
6. The method according to any one of claims 1 to 4, It is characterized in that The processing model includes a classification model and a named entity recognition (NER) model, and the generating of a second control instruction based on the first text and the processing model includes: Inputting the first text into the classification model so that the classification model outputs a first character string; Determining the domain and intent corresponding to the first character string based on the first character string and domain intent comparison table; Inputting the first text into the NER model so that the NER model outputs a second character string; Determine a non-zero second to-be-determined slot based on the second character string and the second slot table; Based on the domain, the intention and the second slot to be determined, a second control instruction is generated.
7. The method according to claim 6, It is characterized in that The second slot to be determined includes at least one of a number, position information, and a color.
8. A speech processing device, It is characterized in that The device comprises: A first acquisition module, used to acquire a first text in a first language generated based on a user voice; A first processing module, used for performing matching processing on the first text to obtain a first control instruction; A second processing module, configured to generate a second control instruction based on the first text and a processing model when the matching process fails to hit the target; The first control instruction or the second control instruction is used to control the vehicle.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, It is characterized in that When the processor executes the program, the steps of the speech processing method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that Executable instructions are stored, which are used to cause a processor to execute the executable instructions to implement the speech processing method according to any one of claims 1 to 7.
