A kind of speech recognition engine voice docking calculationTechnical field
The present invention relates to a kind of speech recognition engine voice docking calculation, particularly relate to a kind of speech recognition engine voice docking calculation that is applicable to increase in intelligent TV set user's experience.
Background technology
Along with the development of voice technology, increasing voice vendors ship its speech recognition engine separately.For increasing user, experience, user, according to the demand of oneself, need to select different speech recognition engines in different application programs, and this is just related to the problem of docking of application program and speech engine.
According to these identification engines, develop miscellaneous voice program, meanwhile, it is inner that voice program is included in its application program by identification engine, and change identification engine need to be changed its source code, change docking mode.
The shortcoming of this mode is: 1. the interface difference of the speech recognition engine of each producer is very large, and voice program is changed identification engine need to dock exploitation again, and development amount and difficulty increase.2. the identification engine of each voice program docking is different, causes the effect of whole system the inside speech recognition variant, and user experiences variant.3. announced product, the identification engine that voice program more renews, needs upgrading.
Technical matters solved by the invention is exactly in Android system, and voice program is used different speech recognition engines separately, and recognition effect is experienced different; The problems such as the speech recognition engine of voice program change simultaneously need to dock again.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of speech recognition engine voice docking calculation that does not need again to dock exploitation.
The technical solution used in the present invention is as follows: a kind of speech recognition engine voice docking calculation, concrete grammar is: between speech application and speech recognition engine program, build an engine management program, in identification, speech application calls engine management program and identifies, and the speech recognition engine that engine management routine call user selects completes speech recognition.
As preferably, between described engine management program and speech recognition engine, define and have the speech recognition interface that comprises two above speech recognition engine recognition functions and data layout compatibility; Described speech recognition interface is packaged into independently speech recognition engine application by each speech recognition engine.
As preferably, between described speech application and engine management program, define and call speech engine supervisory routine voice application interface.
As preferably, concrete grammar step is: step 1, speech application in the time of need to carrying out speech recognition, call and engine management program between voice application interface; The speech recognition interface that step 2, engine management procedure Selection are called certain speech recognition engine application completes identification, and meanwhile, a new identification engine can be packaged into an independently speech engine application according to speech recognition interface, and is installed in system.
As preferably, described engine management program realizes voice application interface, and the binding that provides support.
Compared with prior art, the invention has the beneficial effects as follows: do not need again to dock the speech recognition engine of exploitation, voice program is used different speech recognition engines separately, realize the brand-new effect of user and experience.
Its further beneficial effect is: the present invention makes voice program only need to dock voice application interface one time, and the replacing of speech recognition engine, without care, does not need again to develop, and has reduced the workload of application development; Secondly, can guarantee that the identification engine that all voice programs call is all the same, guarantee user's experience effect; The 3rd, newly increase a kind of speech recognition engine, only need to be packaged into and independently identify engine application according to speech recognition interface, system just can be switched to this engine, guarantee that system need not be upgraded and just can use up-to-date speech recognition engine technology, there is very high practicality and economic worth.
Accompanying drawing explanation
Fig. 1 is the wherein principle schematic of an embodiment of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
Disclosed arbitrary feature in this instructions (comprising any accessory claim, summary and accompanying drawing), unless narration especially all can be replaced by other equivalences or the alternative features with similar object.That is,, unless narration especially, each feature is an example in a series of equivalences or similar characteristics.
This specific embodiment is bound speech engine supervisory routine by voice program, during identification, call the realization identification of voice application interface, and speech engine supervisory routine selects to bind certain speech engine program according to user, in offering the voice application interface that voice program calls, call speech recognition interface, thus the real identification work realizing.
Concrete grammar step is: step 1, speech application in the time of need to carrying out speech recognition, call and engine management program between voice application interface; The speech recognition interface that step 2, engine management procedure Selection are called certain speech recognition engine application completes identification, simultaneously, a new identification engine can be packaged into an independently speech engine application according to speech recognition interface, and be installed in system, speech engine supervisory routine can find this program and choose this program, realizes the automatic switchover of speech engine.
As shown in Figure 1, the identification engine of the A of producer and the B of producer is developed respectively to independently speech recognition engine program A and speech recognition engine program B, the name of engine is placed among its apply names.A service is set in speech recognition engine program, and its attribute is action_s.Other programs can be bound by the service name of its bag name and speech recognition engine program, and return to the handle of the binder of an AIDL type that realizes speech recognition interface, by these interfaces, complete identification.According to these other engine programs of rule exploitation.
Engine management program is by all speech applications in the action_s scanning system of appointment, find the speech recognition engine program with recognition function, and obtain it and wrap name, service name and application name (name is submitted to other programs, for user, select certain engine).After user selects certain engine according to demand, speech recognition engine supervisory routine is bound by bag name and service name, and obtains having the binder of recognition interface, just can access voice recognition interface by this binder.Simultaneously, engine management program provides a service to bind for voice program, its attribute is action_m, during binding, return to a binder handle of realizing the AIDL type of voice application interface, thereby the recognition interface that can call in the binder that engine program returns is realized real identification in the interface of this handle.
Voice program is bound the service of speech engine supervisory routine by the action_m of appointment, and obtains the binder handle of realizing voice application interface, calls the Interface realization speech recognition process of this handle the inside.
Obviously, the method is not limited to switching speech recognition engine, is equally applicable to the function that speech synthesis engine, image recognition engine etc. have a plurality of engines of the same type, all within protection scope of the present invention.