91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.01MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2024-01-19
  • 語言: 其他
  • 標簽:

資源簡介

Windows CE環境下的語音朗讀。訊飛移動語音平臺是基于訊飛公司已有的ISP 和IMS 產品,開發出的一款符合移動互 聯網用戶使用的語音應用開發平臺,提供語音合成、語音聽寫、語音識別、聲紋識別等服務, 為語音應用開發愛好者提供方便易用的開發接口,使得用戶能夠基于該開發接口進行多種語 音應用開發。

資源截圖

代碼片段和文件信息

//?asrdemo.c?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdlib.h“
#include?“stdio.h“
#include?
#include?
#include?

#include?“../../include/qisr.h“
#include?“../../include/msp_cmn.h“
#include?“../../include/msp_errors.h“


#ifdef?_WIN64
#pragma?comment(lib“../../lib/msc_x64.lib“)//x64
#else
#pragma?comment(lib“../../lib/msc.lib“)//x86
#endif

#define??BUFFER_NUM??4096?
#define?MAX_KEYWORD_LEN?4096
char?GrammarID[128];

const?char*??get_audio_file(void)
{
char?key?=?0;
while(key?!=?27)//按Esc則退出
{
system(“cls“);//清屏
printf(“請選擇音頻文件:\n“);
printf(“1.科大訊飛\n“);
printf(“2.阿里山龍膽\n“);
printf(“3.齊魯石化\n“);
printf(“4.一二三四五六七八九十\n“);
printf(“注意:第三條的音頻故意結巴說出來的,用于展示效果。\n??????關鍵字列表中沒有第四條,展示如果用戶說的詞語不在列表中,會得到什么結果。\n“);
key?=?getchar();
switch(key)
{
case?‘1‘:
printf(“1.科大訊飛\n“);
return?“wav/iflytek01.wav“;???????????????????????????????//iflytek01對應的音頻內容“科大訊飛”
case?‘2‘:
printf(“2.阿里山龍膽\n“);
return?“wav/iflytek02.wav“;???????????????????????????????//iflytek02對應的音頻內容“阿里山龍膽”
case?‘3‘:
printf(“3.齊魯石化\n“);
return?“wav/iflytek03.wav“;???????????????????????????????//iflytek03對應的音頻內容“齊魯石化”
case?‘4‘:
printf(“4.一二三四五六七八九十\n“);
return?“wav/iflytek04.wav“;???????????????????????????????//iflytek04對應的音頻內容“一二三四五六七八九十“
default:
continue;
}
}
exit(0);
return?NULL;
}

int?get_grammar_id(?int?upload)
{
int?ret?=?MSP_SUCCESS;
const?char?*?sessionID?=?NULL;
char?UserData[MAX_KEYWORD_LEN];
unsigned?int?len?=?0;
const?char*?testID?=?NULL;
FILE?*fp?=?NULL;
memset(UserData?0?MAX_KEYWORD_LEN);
if?(0?==?upload)

{
strcpy(GrammarID?“e7eb1a443ee143d5e7ac52cb794810fe“);
//這個ID是我上傳之后記錄下來的。語法上傳之后永久保存在服務器上,所以不要反復上傳同樣的語法
return?ret;
}
//如果想要重新上傳語法,傳入參數upload置為TRUE,就可以走下面的上傳語法流程
fp?=?fopen(“asr_keywords_utf8.txt“?“rb“);//關鍵字列表文件必須是utf8格式
if?(fp?==?NULL)
{???
ret?=?-1?;
printf(“keyword?file?cannot?open\n“);
return?ret;
}
len?=?(unsigned?int)fread(UserData?1?MAX_KEYWORD_LEN?fp);
UserData[len]?=?0;
fclose(fp);
????testID?=?MSPUploadData(“userword“?UserData?len?“dtt?=?userword?sub?=?asr“?&ret);//?sub?參數必需,否則返回空串
if(ret?!=?MSP_SUCCESS)
{
printf(“UploadData?with?errorCode:?%d?\n“?ret);
return?ret;
}
memcpy((void*)GrammarID?testID?strlen(testID));
printf(“GrammarID:?\“%s\“?\n“?GrammarID);//將獲得的GrammarID輸出到屏幕上
return?ret;
}

int?run_asr(const?char*?asrfile???const?char*?param)
{
char?rec_result[1024*4]?=?{0};
const?char?*sessionID;
FILE?*f_pcm?=?NULL;
char?*pPCM?=?NULL;
int?lastAudio?=?0?;
int?audStat?=?MSP_AUDIO_SAMPLE_CONTINUE?;
int?epStatus?=?MSP_EP_LOOKING_FOR_SPEECH;
int?recStatus?=?MSP_REC_STATUS_SUCCESS?;
long?pcmCount?=?0;
long?pcmSize?=?0;
int?errCode?=?0?;
sessionID?=?QISRSessionBegin(GrammarID?param?&errCode);?//開始一路會話
f_pcm?=?fopen(asrfile?“rb“);
if?(NULL?!=?f_pcm)?{
fseek(f_pcm?0?SEE

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-05-14?06:00??Examples\
?????目錄???????????0??2015-02-27?04:42??Examples\ttsdemo_with_speechmark\
?????文件????????1435??2014-05-14?06:39??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.vcproj.dpweng-PC.dpweng.user
?????文件????????7386??2014-01-20?05:56??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.vcproj.bak
?????文件????????4935??2015-02-27?04:42??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.c
?????文件???????10865??2014-01-09?09:34??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.vcxproj
?????文件????????7450??2014-05-14?06:09??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.vcproj
?????文件?????????613??2014-05-14?06:22??Examples\ttsdemo_with_speechmark\ttsdemo_with_speechmark.vcxproj.user
?????目錄???????????0??2015-02-27?04:42??Examples\iatdemo\
?????文件????????3728??2015-02-27?04:42??Examples\iatdemo\iatdemo.c
?????文件????????7402??2014-05-14?06:09??Examples\iatdemo\iatdemo.vcproj
?????文件?????????613??2014-05-14?06:22??Examples\iatdemo\iatdemo.vcxproj.user
?????文件????????1435??2014-05-14?06:39??Examples\iatdemo\iatdemo.vcproj.dpweng-PC.dpweng.user
?????文件???????10779??2014-01-18?08:14??Examples\iatdemo\iatdemo.vcxproj
?????文件????????7338??2014-01-20?05:56??Examples\iatdemo\iatdemo.vcproj.bak
?????目錄???????????0??2015-02-27?04:42??Examples\iatdemo_with_user_vocabulary\
?????文件????????7461??2014-05-14?06:09??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.vcproj
?????文件???????10815??2013-12-17?02:09??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.vcxproj
?????文件????????1435??2014-05-14?06:39??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.vcproj.dpweng-PC.dpweng.user
?????文件????????7397??2014-01-20?05:58??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.vcproj.bak
?????文件????????4193??2015-02-27?04:42??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.c
?????文件?????????613??2014-05-14?06:22??Examples\iatdemo_with_user_vocabulary\iatdemo_with_user_vocabulary.vcxproj.user
?????目錄???????????0??2015-02-27?04:42??Examples\asrdemo\
?????文件????????9569??2014-01-20?05:41??Examples\asrdemo\asrdemo.vcxproj
?????文件?????????613??2014-05-14?06:22??Examples\asrdemo\asrdemo.vcxproj.user
?????文件????????5966??2015-02-27?04:42??Examples\asrdemo\asrdemo.c
?????文件????????1435??2014-05-14?06:39??Examples\asrdemo\asrdemo.vcproj.dpweng-PC.dpweng.user
?????文件????????7338??2014-01-20?05:52??Examples\asrdemo\asrdemo.vcproj.bak
?????文件????????7402??2014-05-14?06:17??Examples\asrdemo\asrdemo.vcproj
?????目錄???????????0??2015-02-27?04:42??Examples\ttsdemo\
?????文件?????????613??2014-05-14?06:22??Examples\ttsdemo\ttsdemo.vcxproj.user
............此處省略64個文件信息

評論

共有 條評論

相關資源