How to convert Speech to Text

조회 수: 80 (최근 30일)
nemala srinivasa rao
nemala srinivasa rao 2015년 5월 1일
댓글: Gabriele Bunkheila 2023년 11월 16일
I am doing project on speech signal analysis.how to convert speech to text any one help me

채택된 답변

Gabriele Bunkheila
Gabriele Bunkheila 2018년 1월 16일
Hi Nemala,
I work at MathWorks and I noticed this old question of yours just now. In case it was useful to others, I thought I'd leave a link to our recent MATLAB Central sumbission speech2text:
That enables to leverage 3rd party speech-to-text web services (so far including from Google, Microsoft and IBM) directly from MATLAB using a simple MATLAB Function. The syntax looks like the following:
>> [samples, fs] = audioread('helloaudioPD.wav');
>> soundsc(samples, fs)
>> speechObject = speechClient('Google','languageCode','en-US');
>> outInfo = speech2text(speechObject, samples, fs);
>> outInfo.TRANSCRIPT =
ans =
'hello audio product Developers'
>> outInfo.CONFIDENCE =
ans =
0.9385
Please refer to the html folder in the submission for a step-by-step getting started guide.
Thanks,
Gabriele.
  댓글 수: 11
batool
batool 2023년 11월 16일
Hello, I want to do a project for arabic speech to text conversion using matlab. Can I use wav2vec?
Gabriele Bunkheila
Gabriele Bunkheila 2023년 11월 16일
As of R2023b, all pre-trained speech-to-text models available with MATLAB via Audio Toolbox (including wav2vec) only support the English language.
For different languages, including Arabic, you want to use one of the cloud services supported by speech2text. Please remember that this workflow requires first creating an account with one of 4 supported services (Amazon Transcribe™ is also part of the mix since R2022b) and then downloading a credentials files onto a local folder on your MATLAB path. You can refer to the accompanying examples of speech2text for the details.
For Arabic specifically, you want to ensure you read the documentation of the service of your choice and identify the language localization most closely related to the content you need to transcribe.

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

추가 답변 (1개)

Image Analyst
Image Analyst 2015년 5월 1일
Not an answer for you, but in case anyone is interested in the reverse direction (text to speech).....If you have Windows, try .Net. Try this MATLAB code snippet:
% Program to do text to speech.
% Get user's sentence
userPrompt = 'What do you want the computer to say?';
titleBar = 'Text to Speech';
defaultString = 'Hello World! MATLAB is an awesome program!';
caUserInput = inputdlg(userPrompt, titleBar, 1, {defaultString});
if isempty(caUserInput)
return;
end; % Bail out if they clicked Cancel.
caUserInput = char(caUserInput); % Convert from cell to string.
NET.addAssembly('System.Speech');
obj = System.Speech.Synthesis.SpeechSynthesizer;
obj.Volume = 100;
Speak(obj, caUserInput);
Speech to text is a lot more complicated of course.
  댓글 수: 4
Nikos Korobos
Nikos Korobos 2022년 3월 23일
Hi, is there any possibility to function STT without an internet connection?
Asking because it makes use of various SAPIs
Gabriele Bunkheila
Gabriele Bunkheila 2022년 3월 23일
Please see the response provided to this same question in the main thread

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

카테고리

Help CenterFile Exchange에서 AI for Audio에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by