- #include "asr.h"
- extern "C"{ void * __dso_handle = 0 ;}
- #include "setup.h"
- #include "myLib/asr_event.h"
-
- uint32_t snid;
-
- //{ID:250,keyword:"命令词",ASR:"最大音量",ASRTO:"音量调整到最大"}
- //{ID:251,keyword:"命令词",ASR:"中等音量",ASRTO:"音量调整到中等"}
- //{ID:252,keyword:"命令词",ASR:"最小音量",ASRTO:"音量调整到最小"}
- //{speak:小美-娇美女声,vol:20,speed:10,platform:haohaodada}
- //{playid:10001,voice:你好,我是AI聊天盒子,请用拆了鸡匹替唤醒我}
- //{playid:10002,voice:我退出了,用聊天盒子唤醒我}
- void sys_power_on_hook(void){
- vol_set(7);
- }
-
- void ASR_CODE()
- {
- //{ID:500,keyword:"唤醒词",ASR:"聊天盒子",ASRTO:"我在,今天我们聊什么呢?"}
- if(snid == 500){
- digital_write(6,1);
- }
- //{ID:501,keyword:"唤醒词",ASR:"拆了鸡匹替",ASRTO:"我在,今天我们聊什么呢?"}
- if(snid == 501){
- digital_write(6,1);
- }
- //{ID:502,keyword:"命令词",ASR:"嗨",ASRTO:"嗨!你好呀"}
- if(snid == 502){
-
- }
- //{ID:503,keyword:"命令词",ASR:"哈喽",ASRTO:"哈喽!你好"}
- if(snid == 503){
-
- }
- //{ID:504,keyword:"命令词",ASR:"会做什么",ASRTO:"我可以陪你聊聊天哦"}
- if(snid == 504){
-
- }
- //{ID:505,keyword:"命令词",ASR:"吃饭了吗",ASRTO:"吃过了,我喜欢吃饺子"}
- if(snid == 505){
-
- }
- //{ID:506,keyword:"命令词",ASR:"你好",ASRTO:"你也不错,跟你聊天很开心"}
- if(snid == 506){
-
- }
- //{ID:507,keyword:"命令词",ASR:"今天天气",ASRTO:"虎纠今天晴,空气良好,适合出去走走"}
- if(snid == 507){
-
- }
- //{ID:508,keyword:"命令词",ASR:"说个笑话",ASRTO:"为什么兔子不上网?因为它总是把网线咬成两截"}
- if(snid == 508){
-
- }
- //{ID:509,keyword:"命令词",ASR:"你是谁",ASRTO:"我是拆了鸡匹替的特别精简版,只能常用语句的简单聊天"}
- if(snid == 509){
-
- }
- //{ID:510,keyword:"命令词",ASR:"写首诗",ASRTO:"人生苦短如梦游,岁月匆匆似水流。欢笑悲伤皆过客,唯有真情永流传"}
- if(snid == 510){
-
- }
- //{ID:511,keyword:"命令词",ASR:"讲个笑话",ASRTO:"白云问黑云:你怎么总是阵雨就跑?黑云说:我觉得下大雨多麻烦,只降小雨就走人。"}
- if(snid == 511){
-
- }
- //{ID:512,keyword:"命令词",ASR:"还会什么",ASRTO:"写首诗,说个笑话,单纯聊天"}
- if(snid == 512){
-
- }
- //{ID:513,keyword:"命令词",ASR:"名字",ASRTO:"我叫小美,声音美滴滴"}
- if(snid == 513){
-
- }
- //{ID:514,keyword:"命令词",ASR:"说个故事",ASRTO:"从前,有座山,山里面有个庙,后来你在听我说故事"}
- if(snid == 514){
-
- }
- //{ID:515,keyword:"命令词",ASR:"请",ASRTO:"请告诉我您需要什么帮助,我会尽力提供支持。"}
- if(snid == 515){
-
- }
- //{ID:516,keyword:"命令词",ASR:"能做什么",ASRTO:"写首诗,说个笑话,单纯聊聊天"}
- if(snid == 516){
-
- }
- //{ID:517,keyword:"命令词",ASR:"写四句诗",ASRTO:"秋叶纷纷舞落地,寒风吹过山水间。诗意飘荡心灵处,思绪悠然自然间。"}
- if(snid == 517){
-
- }
- //{ID:518,keyword:"命令词",ASR:"写诗",ASRTO:"明月皎皎照夜空,流星闪烁如繁花。诗行婉转诉心声,思绪飘散在时光中。"}
- if(snid == 518){
-
- }
- //{ID:519,keyword:"命令词",ASR:"诗句",ASRTO:"春风拂面花开放,夏日阳光暖人心。秋叶飘落思无穷,冬雪铺白梦幻境。"}
- if(snid == 519){
-
- }
- //{ID:520,keyword:"命令词",ASR:"诗",ASRTO:"晨曦初露照窗台,春意盎然满山海。花开芬芳醉人心,岁月流转永不改。"}
- if(snid == 520){
-
- }
- //{ID:521,keyword:"命令词",ASR:"读诗",ASRTO:"青山绿水画中游,花开芬芳映日舟。诗意浩然心自醉,情思飞扬入云浮。"}
- if(snid == 521){
-
- }
- //{ID:522,keyword:"命令词",ASR:"好诗",ASRTO:"月色如水洒银盆,星光点缀夜空深。诗行自由舞心弦,思绪飘逸情难禁。"}
- if(snid == 522){
-
- }
- //{ID:523,keyword:"命令词",ASR:"会什么",ASRTO:"写首诗,说个笑话,讲个故事,单纯聊聊天"}
- if(snid == 523){
-
- }
- //{ID:524,keyword:"命令词",ASR:"聊聊天",ASRTO:"行啊,聊写诗吧,我会不少呢"}
- if(snid == 524){
-
- }
- //{ID:525,keyword:"命令词",ASR:"诗歌",ASRTO:"秋露初起天,万物静欣呈变色。落叶飘零处,他乡客思归心切。"}
- if(snid == 525){
-
- }
- //{ID:526,keyword:"命令词",ASR:"谁训练你",ASRTO:"是雕哥训练我这个超迷你小模型的,用时33分钟"}
- if(snid == 526){
-
- }
- //{ID:527,keyword:"命令词",ASR:"还行",ASRTO:"谢谢你的鼓励和支持,好开心啊"}
- if(snid == 527){
-
- }
- //{ID:528,keyword:"命令词",ASR:"真不错",ASRTO:"有你的鼓励真好,太感谢了"}
- if(snid == 528){
-
- }
- //{ID:529,keyword:"命令词",ASR:"不错呀",ASRTO:"谢谢鼓励,我会努力的"}
- if(snid == 529){
-
- }
- set_state_enter_wakeup(15000);
- }
-
- void setup()
- {
- set_gpio_input(0);
- set_gpio_input(1);
- set_gpio_input(2);
- set_gpio_input(3);
- set_gpio_input(4);
- set_gpio_input(5);
- digital_write(6, 0);
- set_gpio_input(13);
- set_gpio_input(14);
- set_gpio_input(20);
- }
复制代码