how to map a kannada unicode value to a particular audio file from a speech database

조회 수: 2 (최근 30일)
Actually i am working on a project which converts kannada text to speech.As of now i am able to read the text document and able to generate unicode out of text document.now i have to map each obtained unicode to the speech database containing sounds of each kannada alphabet saved each audio file with the hex value of each unicode. can anyone suggest any solution to this problem.

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 19일
편집: Walter Roberson 2016년 1월 19일
If U holds the Unicode code point number, then
filename = sprintf('pronounce_%04X.wav', U)
this would produce, for example, 'pronounce_30DB.wav' for codepoint U+30DB (decimal 12507), ホ
  댓글 수: 6
Walter Roberson
Walter Roberson 2016년 1월 19일
projectdir = '/folder/where/files/are';
[data, fs] = wavread( fullfile(projectdir, filename) );
Or when you say "database" do you mean something like an SQL database? If so then you need to say more about what kind of database it is and what fieldname is going to be used and what the format of the key will be.
Swapna Havalgi
Swapna Havalgi 2016년 1월 21일
no database means just a folder containing speech files.Thank you so much walter my bit of code is working out.I am able to fetch one speech file from the folder but still two more steps to solve one is now can i fetch multiple files from the same folder?and another important step is to map the unicode value generated from the below code with the speech file contained in the folder.can u suggest anything for these?
fid = fopen('\path\of\text_document containing kannada unicode\message.txt', 'rb');
b = fread(fid, '*uint8')'; %'# read bytes
disp(b);
c=dec2hex(b);
disp(c);
fclose(fid);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Other Formats에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by