qcc更换语音提示的方法

这里就不做图片说明,按照步骤做出来更加有成就感。

1.用adk configuration tool添加语音,并且导出语音文件(会生成headers prompts两个文件夹)
2.使用packfile命令将生成的文件夹合并为xuv语音文件(比如vp.xuv)
3.使用nvscmd命令导出ptn文件(nvscmd dump xxx.ptn),可以看到分区,如果有原始项目不需要做此步骤,找到语音分区(这里默认是3)
4.使用nvscmd命令烧录语音分区,这里假设3是语音分区(默认ptn的3分区就是语音),命令为 nvscmd burn xxx.ptn 3

/*!
\copyright  Copyright (c) 2013 - 2023 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file       audio_i2s_SSM2518.c
\brief      Support for I2S audio output, implementing the 'Device' API defined
            in audio_i2s_common.h, with chip specific I2C commands to configure
            the SSM2518 external I2S amplifier.
*/
 
#ifdef INCLUDE_SSM2518_I2S_AMP
 
#include "audio_i2s_SSM2518.h"
 
#include <gain_utils.h>
#include <stdlib.h>
#include <panic.h>
#include <file.h>
#include <print.h>
#include <stream.h> 
#include <kalimba.h>
#include <kalimba_standard_messages.h>
#include <message.h>
#include <transform.h>
#include <string.h>
#include <i2c.h>
#include <pio_common.h>
#include <stdio.h>
 
#include "audio_i2s_common.h"
 
 
/*! Amp power state */
typedef enum
{
 
    standby = 0, /*!< Can be used during external amplifier in low power down mode */
    active,      /*!< Used when external amplifier is in running/active state */
    power_off    /*!< Used to denote external amplifier is powered off */
} amp_status_t;
 
/*! Collection of data representing current I2S hardware/software state */
typedef struct
{
 
    amp_status_t amp_status;
} state_t;
 
 
/*! Amplifier state */
static state_t state = { .amp_status = power_off };
 
/*! Default I2S configuration data for this chip */
const i2s_config_t device_i2s_config =
{
 
    .master_mode = 1,       /*!< Amp is only capable of operating as I2S Slave */
    .data_format = 0,       /*!< I2S left justified */
    .bit_delay = 1,         /*!< I2S delay 1 bit */
#ifdef ENABLE_I2S_OUTPUT_24BIT
    .bits_per_sample = 24,  /*!< 24-bit data words per channel */
#else
    .bits_per_sample = 16,  /*!< 16-bit data words per channel */
#endif
    .bclk_scaling = 256,    /*!< Allows full range of sample rates down to 8kHz */
    .mclk_scaling = 0,
    .enable_pio = PIN_INVALID
};
 
 
static void enableAmpPio(bool enable);
static void setAmpState(amp_status_t state);
 
 
/*! \brief Power on and configure the I2S device. */
bool AudioI2SDeviceInitialise(uint32 sample_rate)
{
 
    setAmpState(active);
  • 19
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值