本文主要是介绍基于QCC上Google Voice Assistant功能实现,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
基于QCC上Google Voice Assistant功能实现
/*!
\copyright Copyright (c) 2020-2022 Qualcomm Technologies International, Ltd.
All Rights Reserved.
Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief Implementation of voice assistant audio testing functions.
*/
#ifdef INCLUDE_VOICE_UI
#ifndef DISABLE_TEST_API
#include "va_audio_test.h"
#include "voice_audio_manager.h"
#include "ama_config.h"
#include <logging.h>
#include <operator.h>
#ifdef GC_SECTIONS
/* Move all functions in KEEP_PM section to ensure they are not removed during
* garbage collection */
#pragma unitcodesection KEEP_PM
#endif
static const va_audio_encode_config_t va_encode_config_table[] =
{
{.encoder = va_audio_codec_sbc, .encoder_params.sbc =
{
.bitpool_size = 24,
.block_length = 16,
.number_of_subbands = 8,
.allocation_method = sbc_encoder_allocation_method_loudness,
}
},
{.encoder = va_audio_codec_msbc, .encoder_params.msbc = {.bitpool_size = 24}},
{.encoder = va_audio_codec_opus, .encoder_params.opus = {.frame_size = 40}},
};
static bool vaTestPopulateVaEncodeConfig(va_audio_codec_t encoder, va_audio_encode_config_t *config)
{
unsigned i;
for(i = 0; i < ARRAY_DIM(va_encode_config_table); i++)
{
if (va_encode_config_table[i].encoder == encoder)
{
if (config)
{
*config = va_encode_config_table[i];
这篇关于基于QCC上Google Voice Assistant功能实现的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!