author2code.m
资源名称:speech.rar [点击查看]
上传用户:ay_070428
上传日期:2014-12-04
资源大小:11427k
文件大小:2k
源码类别:
语音合成与识别
开发平台:
Matlab
- % This script takes author.txt, syllable2num.txt and word2syllable.txt to
- % generate author-code table
- % Connect to a database.
- %feature('dispatchjava',1);
- %timeoutA = logintimeout(5);
- %connA = database('DBauthor','','');
- % Open cursor and execute a SQL statement.
- %cursorA = exec(connA,'select CoverName from Author');
- % Import three rows of data.
- %fprintf('Reading data from database ......please wait...n');
- %cursorA = fetch(cursorA);
- %Getting data you imported.
- %Data = cursorA.data;
- %将字转换为音节序号
- fprintf('Collecting author names from author.txt...n');
- Data = textread('author.txt','%s');
- index = 1;
- for i = 1:length(Data),
- name = Data{i};
- name(find(name==';')) = [];
- Ascii = double(name);%变为ASCII码
- %