The application belongs to the technical field of voice instructions, and specifically discloses a general voice
instruction distribution method, an electronic device and a storage medium. The method of the application realizes the API by accessing a
voice engine, converts returned semantic
callback instructions into unified entity classes, defines
two parameter variables, inputs the unified parameters into a semantic executor interface, instantiates the semantic executor interface through dynamic proxy, and the semantic executor interface obtains the
callback interface modified by
annotation, the semantic
callback instruction method and the unified parameters of the semantic callback instruction method through reflection. The parameter variables in the unified parameters are matched with the callback interface modified by
annotation and the parameters of the
annotation, and it is judged whether to execute. If it is judged to be callback, the callback semantic instruction is executed. Otherwise, it is prompted that the command is not supported. When the
voice engine is replaced, the new engine API can be flexibly accessed, the voice instructions of different voice engines are distributed and processed, and the research and development cost is reduced.