基于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];
       
  • 25
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值