qcc更换语音提示的方法

embedded/2024/10/21 3:51:18/

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

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);

http://www.ppmy.cn/embedded/46762.html

相关文章

使用新的 NVIDIA Isaac Foundation 模型和工作流程创建、设计和部署机器人应用程序

使用新的 NVIDIA Isaac Foundation 模型和工作流程创建、设计和部署机器人应用程序 机器人技术的应用正在智能制造设施、商业厨房、医院、仓库物流和农业领域等各种环境中迅速扩展。该行业正在转向智能自动化&#xff0c;这需要增强机器人功能&#xff0c;以执行感知、绘图、导…

cesium学习6-相机camera

视角设置 viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(118.0658439,24.5915414,2500),//目的地orientation:{heading:Cesium.Math.toDegrees(0),//左右平移0pitch:Cesium.Math.toDegrees(90),//上下点头90roll:Cesium.Math.toDegrees(0),//歪头0}}) 相机…

Android状态栏适配问题

Android状态栏适配是一个老生常谈的问题&#xff0c;那么我又拿出来讲了&#xff0c;因为这个东西确实太重要了&#xff0c;基本上每个项目都用得到。状态栏总共有几种形态。第一&#xff0c;让状态栏颜色跟应用主色调一致&#xff0c;布局内容不占有状态栏的位置。第二&#x…

Scalable Membership Inference Attacks via Quantile Regression

我们使用以下六个分类标准: 动机: 隐私问题:许多研究背后的主要动机是对机器学习模型相关的隐私风险日益增长的担忧。例如,Shokri等人(2017)和Carlini等人(2022)专注于开发和改进成员推理攻击,以评估模型对隐私泄露的脆弱性。模型理解:一些研究深入了解机器学习模型的固有…

php: centos+apache 启动php项目

指导文件 &#xff1a;PHP: Apache 2.x on Unix systems - Manual 下载路径 &#xff1a;Index of /httpd configure: error: APR not found. 解决方案&#xff1a; APR&#xff08;Apache Portable Runtime&#xff09;库。APR是Apache HTTP服务器的可移植运行时环境&…

2024-06-05-记一次cnvd渗透

前言&#xff1a;挖src挖郁闷了&#xff0c;闲来无事选择挖一个cnvd来练练手&#xff0c;本次的漏洞都没啥难度&#xff0c;企查查资产过了5000万 说一下cnvd证书的下放标准 对于中危及中危以上通用型漏洞&#xff08;CVSS2.0基准评分超过4.0分&#xff09;&#xff0c;以及涉…

举例说明async 和 await 在 .NET Core 中的基本使用

异步编程在 .NET Core 中变得越来越重要&#xff0c;async 和 await 关键字是实现异步编程的基础。下面我们将通过一个示例来说明如何使用它们。 示例代码 下面是一个简单的示例&#xff0c;演示了如何使用 async 和 await 来执行异步操作&#xff1a; using System; using …

Java扩展机制:SPI与Spring.factories详解

一、SPI SPI全称Service Provider Interface,是Java提供的一套用来被第三方实现或者扩展的API,它可以用来启用框架扩展和替换组件。 整体机制图如下: Java SPI 实际上是“基于接口的编程+策略模式+配置文件”组合实现的动态加载机制。 系统设计的各个抽象,往往有很多不…