Evg*_*eny 6 speech-recognition voice-recognition android-source hexagon-dsp qualcomm
Hexagon DSP处理器允许在待机状态下激活您的设备https://qualcomm.com/videos/snapdragon-voice-activation.一些Android设备支持此功能,例如Google Pixel对关键词"Ok Google"做出反应.在android的源代码中,我找到了负责将关键短语加载到DSP处理器的代码(Hexagon DSP处理器内置于Qualcomm处理器中):
自由软件 :和安全网/system/sound_trigger.h
声音模型描述结构sound_trigger_sound_model传递方法stdev_load_sound_model.声音模型结构:
/*
* Base sound model descriptor. This struct is the header of a larger block passed to
* load_sound_model() and containing the binary data of the sound model.
* Proprietary representation of users in binary data must match information indicated
* by users field
*/
struct sound_trigger_sound_model {
sound_trigger_sound_model_type_t type; /* model type. e.g. SOUND_MODEL_TYPE_KEYPHRASE */
sound_trigger_uuid_t uuid; /* unique sound model ID. */
sound_trigger_uuid_t vendor_uuid; /* unique vendor ID. Identifies the engine the
sound model was build for */
unsigned int data_size; /* size of opaque model data */
unsigned int data_offset; /* offset of opaque data start from head of struct
(e.g sizeof struct sound_trigger_sound_model) */
};
Run Code Online (Sandbox Code Playgroud)
有谁知道如何生成声音模型的二进制数据或在哪里查找有关它的信息?
您可以通过以下链接下载关键短语"Ok Google"的声音模型:https://drive.google.com/open?id = 0B9jcQJRmjR0yaDJhOXN2M2ZLYm8.我将其加载到DSP处理器中并且可以正常工作.
有用的Android类:https : //android.googlesource.com/platform/frameworks/base/+/master/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java https://android.googlesource.com /platform/frameworks/base/+/master/core/java/android/hardware/soundtrigger/SoundTriggerModule.java https://android.googlesource.com/platform/frameworks/base/+/master/core/jni/android_hardware_SoundTrigger. cpp https://android.googlesource.com/platform/frameworks/av/+/master/soundtrigger/SoundTrigger.cpp https://android.googlesource.com/platform/frameworks/av/+/master/soundtrigger/ISoundTrigger. CPP
归档时间: |
|
查看次数: |
824 次 |
最近记录: |