当前位置: 首页 > article >正文

ASRPRO 记事本2

id号使用图
0-2465时-分1点5分-24点60占用
3000-4231月-日1号-12月31号
5000-59995000-50605分-十分,15。。。60
5110 - 5340一点--24点
5401-5420一号-20号
5501-512一月-12月
6000-6999  
7000-7999   
8000-8999常用词 占用
9000-  
10000-   
2000-   
3000-   

播放词ID

62500-62510 数字 年月日占用

#include "asr.h"
extern "C"{ void * __dso_handle = 0 ;}
#include "setup.h"
#include "myLib/asr_event.h"
#include "HardwareSerial.h"

uint32_t snid;
void ASR_CODE();

//{speak:小蝶-清新女声,vol:10,speed:10,platform:haohaodada}
//{playid:10001,voice:你好,我是您的智能语音助手,请用天问五幺唤醒我}
//{playid:10002,voice:我休息了,用天问五幺唤醒我}

/*
id号使用图
0-2465	时-分	1点5分-24点60	占用
3000-4231	年-月	1号-12月31号
5000-5999	5000-5060	5分-十分,15。。。60
	5110 - 5340	一点--24点
	5401-5420	一号-20号
	5501-512	一月-12月
6000-6999			空
7000-7999
8000-8999	常用词		占用
9000-			空
10000-
2000-
3000-
*/

int num = 0;
//{ID:5401,keyword:"命令词",ASR:"一号",ASRTO:" "}
//{ID:5402,keyword:"命令词",ASR:"二号",ASRTO:" "}
//{ID:5403,keyword:"命令词",ASR:"三号",ASRTO:" "}
//{ID:5404,keyword:"命令词",ASR:"四号",ASRTO:" "}
//{ID:5405,keyword:"命令词",ASR:"五号",ASRTO:" "}
//{ID:5406,keyword:"命令词",ASR:"六号",ASRTO:" "}
//{ID:5407,keyword:"命令词",ASR:"七号",ASRTO:" "}
//{ID:5408,keyword:"命令词",ASR:"八号",ASRTO:" "}
//{ID:5409,keyword:"命令词",ASR:"九号",ASRTO:" "}
//{ID:5410,keyword:"命令词",ASR:"十号",ASRTO:" "}
//{ID:5420,keyword:"命令词",ASR:"二十号",ASRTO:" "}

//{ID:5501,keyword:"命令词",ASR:"一月",ASRTO:" "}
//{ID:5502,keyword:"命令词",ASR:"二月",ASRTO:" "}
//{ID:5503,keyword:"命令词",ASR:"三月",ASRTO:" "}
//{ID:5504,keyword:"命令词",ASR:"四月",ASRTO:" "}
//{ID:5505,keyword:"命令词",ASR:"五月",ASRTO:" "}
//{ID:5506,keyword:"命令词",ASR:"六月",ASRTO:" "}
//{ID:5507,keyword:"命令词",ASR:"七月",ASRTO:" "}
//{ID:5508,keyword:"命令词",ASR:"八月",ASRTO:" "}
//{ID:5509,keyword:"命令词",ASR:"九月",ASRTO:" "}
//{ID:5510,keyword:"命令词",ASR:"十月",ASRTO:" "}
//{ID:5511,keyword:"命令词",ASR:"十一月",ASRTO:" "}
//{ID:5512,keyword:"命令词",ASR:"十二月",ASRTO:" "}

//{ID:5005,keyword:"命令词",ASR:"五分",ASRTO:" "}
//{ID:5010,keyword:"命令词",ASR:"十分",ASRTO:" "}
//{ID:5015,keyword:"命令词",ASR:"十五",ASRTO:" "}
//{ID:5020,keyword:"命令词",ASR:"二十",ASRTO:" "}
//{ID:5025,keyword:"命令词",ASR:"二十五",ASRTO:" "}
//{ID:5030,keyword:"命令词",ASR:"三十",ASRTO:" "}
//{ID:5035,keyword:"命令词",ASR:"三十五",ASRTO:" "}
//{ID:5040,keyword:"命令词",ASR:"四十",ASRTO:" "}

//{ID:2305,keyword:"命令词",ASR:"二十三点五分",ASRTO:" "}
//{ID:2310,keyword:"命令词",ASR:"二十三点十分",ASRTO:" "}
//{ID:2315,keyword:"命令词",ASR:"二十三点十五",ASRTO:" "}
//{ID:2320,keyword:"命令词",ASR:"二十三点二十",ASRTO:" "}
//{ID:2325,keyword:"命令词",ASR:"二十三点二十五",ASRTO:" "}
//{ID:2330,keyword:"命令词",ASR:"二十三点三十",ASRTO:" "}
//{ID:2335,keyword:"命令词",ASR:"二十三点三十五",ASRTO:" "}
//{ID:2340,keyword:"命令词",ASR:"二十三点四十",ASRTO:" "}
//{ID:2345,keyword:"命令词",ASR:"二十三点四十五",ASRTO:" "}
//{ID:2350,keyword:"命令词",ASR:"二十三点五十",ASRTO:" "}
//{ID:2355,keyword:"命令词",ASR:"二十三点五十五",ASRTO:" "}
//{ID:2360,keyword:"命令词",ASR:"二十三点六十",ASRTO:" "}

//{ID:2405,keyword:"命令词",ASR:"二十四点五分",ASRTO:" "}
//{ID:2410,keyword:"命令词",ASR:"二十四点十分",ASRTO:" "}
//{ID:2415,keyword:"命令词",ASR:"二十四点十五",ASRTO:" "}
//{ID:2420,keyword:"命令词",ASR:"二十四点二十",ASRTO:" "}
//{ID:2425,keyword:"命令词",ASR:"二十四点二十五",ASRTO:" "}
//{ID:2430,keyword:"命令词",ASR:"二十四点三十",ASRTO:" "}
//{ID:2435,keyword:"命令词",ASR:"二十四点三十五",ASRTO:" "}
//{ID:2440,keyword:"命令词",ASR:"二十四点四十",ASRTO:" "}
//{ID:2445,keyword:"命令词",ASR:"二十四点四十五",ASRTO:" "}
//{ID:2450,keyword:"命令词",ASR:"二十四点五十",ASRTO:" "}
//{ID:2455,keyword:"命令词",ASR:"二十四点五十五",ASRTO:" "}
//{ID:2460,keyword:"命令词",ASR:"二十四点六十",ASRTO:" "}
//{ID:2465,keyword:"命令词",ASR:"二十四点六十五",ASRTO:" "}

//播报单 ID
//{playid:62500,voice:零}
//{playid:62501,voice:一}
//{playid:62502,voice:二}
//{playid:62503,voice:三}
//{playid:62504,voice:四}
//{playid:62505,voice:五}
//{playid:62506,voice:六}
//{playid:62507,voice:七}
//{playid:62508,voice:八}
//{playid:62509,voice:九}
//{playid:62510,voice:十}
//{playid:62511,voice:百}
//{playid:10012,voice:千}
//{playid:62513,voice:分}
//{playid:62514,voice:钟}
//{playid:62515,voice:点}
//{playid:62516,voice:年}
//{playid:62517,voice:月}
//{playid:62518,voice:周}
//{playid:62519,voice:日}
//{playid:62520,voice:号}
/*
//常用词 0xxxx

//{ID:9011,keyword:"命令词",ASR:"十分钟后叫我一下",ASRTO:" "}
//{ID:9021,keyword:"命令词",ASR:"二十分钟后叫我一下",ASRTO:" "}
//{ID:9031,keyword:"命令词",ASR:"三十分钟后叫我一下",ASRTO:" "}
//{ID:9041,keyword:"命令词",ASR:"四十分钟后叫我一下",ASRTO:" "}
//{ID:9001,keyword:"命令词",ASR:"倒计时一分钟",ASRTO:" "}
//{ID:9012,keyword:"命令词",ASR:"倒计时十分钟",ASRTO:" "}
//{ID:9022,keyword:"命令词",ASR:"倒计时二十分钟",ASRTO:" "}
//{ID:9032,keyword:"命令词",ASR:"倒计时三十分钟",ASRTO:" "}
//{ID:9061,keyword:"命令词",ASR:"倒计时一小时",ASRTO:" "}
//{ID:9120,keyword:"命令词",ASR:"两个小时后叫我一下",ASRTO:" "}
//{ID:9062,keyword:"命令词",ASR:"一小时后叫我一下",ASRTO:" "}
//{ID:9501,keyword:"命令词",ASR:"五点叫我一下",ASRTO:" "}

//{ID:60001,keyword:"命令词",ASR:"叫我一下",ASRTO:" "}
//{ID:60002,keyword:"命令词",ASR:"告诉叫我一下",ASRTO:" "}
//{ID:60003,keyword:"命令词",ASR:"提醒我一下",ASRTO:" "}
//{ID:60004,keyword:"命令词",ASR:"瓦力伊娃在哪里",ASRTO:" "}
*/
struct time2   //任务结构  时间 -任务
{
//char year; char month;char day;char hour;char minite;

};
struct project
{
char status;  //0停止 //1运行 //2
char freq; //1每天 2每星期 3每月 4每年

char ymw[4];
/*
char year;
char month;
char week;
char day;*/

char tm[2]; //时分秒
int event; //事件
};
project ts[50];

void numVoice(int num)  //播放数字
{
int n1 = num%10;
int n2 = num%100 -n1;
if(n2 !=0){
play_audio(62500+n2/10); //X
play_audio(62510);} //十
if(n1 !=0)
play_audio(62500+n1); //X
}

void numbVoice(int numb)  //播放号码 2014
{
char c[10] ;
itoa(numb,c,10);
char l = strlen(c);

for(int i=0;i<l;i++){
play_audio(62500+(c[i]-'0')); //X
Serial.print(62500+(c[i]-'0'));
}
}

void TimeVoice2(project ts)
{

if(ts.ymw[3] != 0)
{
numbVoice(ts.ymw[3]);
play_audio(62516);  //year
}
if(ts.ymw[2] != 0)
{
numVoice(ts.ymw[2]);
play_audio(62517);  //month
}
if(ts.ymw[1] != 0)
{
numVoice(ts.ymw[1]);
play_audio(62518);  //week
}
if(ts.ymw[0] != 0)
{
numVoice(ts.ymw[0]);
play_audio(62519);  //day
}

if(ts.tm[1] !=0)
{
numVoice(ts.tm[1]);
Serial.print("hour:");
Serial.println(ts.tm[1],DEC);

play_audio(62515);  //hour
}
if(ts.tm[0] !=0)
{
numVoice(ts.tm[0]);
Serial.print("min:");
Serial.println(ts.tm[0],DEC);
play_audio(62513);  //min
}

}
void TimeVoice(int num)  //播放时间 二十四时30分
{

int n1 = num%10;
int n2 = num%100-n1;

if(n2 !=0){
numVoice(n2);
play_audio(62513);
play_audio(62514); } //时
if(n1 !=0){
numVoice(n1);
play_audio(62513);} //分
}

//play_audio(42);  //任务已记录
//TimeVoice(_snid);  //播放时间

//播报 任务确认  2024年5月20号早上9点 开会

/*描述该功能...
*/
void ASR_CODE(){
  Serial.println(snid);
  int _sid = snid/10000;
  if(snid <6000)
  {
       if(snid <3000)  //时分
       {
  	ts[num].tm[1] = char(snid /100);
          ts[num].tm[0] = snid %100;
        }
       else if(snid<5000) //月 日
        {
           ts[num].ymw[2] = char((snid-3000) /100); //month
           ts[num].ymw[0] = snid %100; //day
          }
       else{  //正点
          if(snid <= 5060){ //min
            ts[num].tm[0]  =  char(snid-5000);
          }
          else if(snid <= 5340){  //1点-24点
            ts[num].tm[1] = snid%100;
         }
          else if(snid <= 5420){  //1号 -20号
            ts[num].ymw[0] = snid %100;
         }
          else if(snid <= 5512){  //1月-24月
            ts[num].ymw[2] = snid %100;
         }
        }

  }
  else
  {
  //结束词
  }

  char c[20];
  sprintf(c,"%d-%d-%d %d:%d",ts[num].ymw[3],ts[num].ymw[2],ts[num].ymw[0],ts[num].tm[1],ts[num].tm[0]);
  Serial.println(c);


}

//{ID:8001,keyword:"命令词",ASR:"倒计时一分钟",ASRTO:" "}
//{ID:8011,keyword:"命令词",ASR:"倒计时十分钟",ASRTO:" "}
//{ID:8022,keyword:"命令词",ASR:"倒计时二十分钟",ASRTO:" "}
//{ID:8031,keyword:"命令词",ASR:"倒计时三十分钟",ASRTO:" "}
//{ID:8061,keyword:"命令词",ASR:"倒计时一小时",ASRTO:" "}

//{ID:8010,keyword:"命令词",ASR:"十分钟后",ASRTO:" "}
//{ID:8020,keyword:"命令词",ASR:"二十分钟后",ASRTO:" "}
//{ID:8030,keyword:"命令词",ASR:"三十分钟后",ASRTO:" "}
//{ID:8040,keyword:"命令词",ASR:"四十分钟后",ASRTO:" "}
//{ID:8120,keyword:"命令词",ASR:"两个小时后",ASRTO:" "}
//{ID:8060,keyword:"命令词",ASR:"一小时后",ASRTO:" "}

//{ID:8100,keyword:"命令词",ASR:"明天早上",ASRTO:" "}
//{ID:8101,keyword:"命令词",ASR:"明天下午",ASRTO:" "}
//{ID:8102,keyword:"命令词",ASR:"明天晚上",ASRTO:" "}

//{ID:8200,keyword:"命令词",ASR:"后天早上",ASRTO:" "}
//{ID:8201,keyword:"命令词",ASR:"后天下午",ASRTO:" "}
//{ID:8202,keyword:"命令词",ASR:"后天晚上",ASRTO:" "}

//{ID:8301,keyword:"命令词",ASR:"周一",ASRTO:" "}
//{ID:8302,keyword:"命令词",ASR:"周二",ASRTO:" "}
//{ID:8303,keyword:"命令词",ASR:"周三",ASRTO:" "}
//{ID:8304,keyword:"命令词",ASR:"周四",ASRTO:" "}
//{ID:8305,keyword:"命令词",ASR:"周五",ASRTO:" "}
//{ID:8306,keyword:"命令词",ASR:"周六",ASRTO:" "}
//{ID:8307,keyword:"命令词",ASR:"周末",ASRTO:" "}
//{ID:8308,keyword:"命令词",ASR:"周日",ASRTO:" "}

//{ID:8401,keyword:"命令词",ASR:"下周一",ASRTO:" "}
//{ID:8402,keyword:"命令词",ASR:"下周二",ASRTO:" "}
//{ID:8403,keyword:"命令词",ASR:"下周三",ASRTO:" "}
//{ID:8404,keyword:"命令词",ASR:"下周四",ASRTO:" "}
//{ID:28405,keyword:"命令词",ASR:"下周五",ASRTO:" "}
//{ID:8406,keyword:"命令词",ASR:"下周六",ASRTO:" "}
//{ID:8407,keyword:"命令词",ASR:"下周日",ASRTO:" "}

//{ID:8508,keyword:"命令词",ASR:"每天",ASRTO:" "}
//{ID:8501,keyword:"命令词",ASR:"每周一",ASRTO:" "}
//{ID:8502,keyword:"命令词",ASR:"每周二",ASRTO:" "}
//{ID:8503,keyword:"命令词",ASR:"每周三",ASRTO:" "}
//{ID:8504,keyword:"命令词",ASR:"每周四",ASRTO:" "}
//{ID:8505,keyword:"命令词",ASR:"每周五",ASRTO:" "}
//{ID:8506,keyword:"命令词",ASR:"每周六",ASRTO:" "}
//{ID:8507,keyword:"命令词",ASR:"每周末",ASRTO:" "}

//{ID:8509,keyword:"命令词",ASR:"每月",ASRTO:" "}
//{ID:8510,keyword:"命令词",ASR:"每年",ASRTO:" "}

void hardware_init(){
  vol_set(1);
  vTaskDelete(NULL);
}

void setup()
{
  //{ID:0,keyword:"唤醒词",ASR:"天问五幺",ASRTO:"我在"}
  //{ID:1,keyword:"命令词",ASR:"今天天气",ASRTO:"杭州今天晴,空气良好,适合出去走走"}
  //{ID:9999,keyword:"命令词",ASR:"你几岁了",ASRTO:"我今年已经五岁了"}
  //{ID:3,keyword:"命令词",ASR:"你会做什么",ASRTO:"我可以陪你聊天哦"}
  //{ID:4,keyword:"命令词",ASR:"给我讲个笑话吧",ASRTO:"以前有一个人在睡觉,然后一只蚊子过来咬他了。他被叮醒正准备一只手啪下去的时候,蚊子对他说,求求你别杀我,今天是我的生日。那个人听说后,小心翼翼把蚊子放在手心,一边拍手一边唱生日快乐歌!"}
  setPinFun(13,SECOND_FUNCTION);
  setPinFun(14,SECOND_FUNCTION);
  Serial.begin(9600);
}

将用户 i'd号与任务 联系起来 提供外部接口 任务条件达成 执行指定任务 

规划 39000- 任务区 识别为任务 可执行 程序 

默认 播报

默认 内部定时器 时钟源 ; 串口 获 外部时间比对


http://www.kler.cn/a/377340.html

相关文章:

  • 汇聚全球前沿科技产品,北京智能科技产业展览会·世亚智博会
  • IT设备告警预测:运维团队的新导向
  • Jmeter命令监控CPU等指标
  • RK3568开发板静态IP地址配置
  • 单元测试(Junit)
  • 「C/C++」C/C++的区别
  • Linux——— 信号
  • Flutter加载本地HTML的优雅解决方案:轻松实现富文本展示
  • MATLAB 如何判断数据样本是否服从伽马分布(Gamma)
  • 『Linux学习笔记』如何在 Ubuntu 22.04 上安装和配置 VNC
  • ARM base instruction -- umaddl
  • Kafka 判断一个节点是否还活着有那两个条件?
  • 【代码随想录Day58】图论Part09
  • C/C++语言基础--C++模板与元编程系列三(变量模板、constexpr、萃取等…………)
  • Cpp::set map 的理解与使用(22)
  • Redis常见面试题总结(上)
  • yt-dlp下载视频
  • mac 安装tomcat
  • 从0开始学统计-数据类别与测量层次
  • Python软体中使用Pandas库读取数据并绘制柱状图的实用指南
  • 谷粒商城のsentinelzipkin
  • Blender进阶:着色器节点
  • 02- 模块化编程-002 DS1302数码显示时间与日期
  • 【AI开源项目】FastGPT- 快速部署FastGPT以及使用知识库的两种方式!
  • 探索无线网IP地址:定义、修改方法及实践指南
  • 搭建Apache web服务器实例