I need help Im trying to have a trouble issue here like I dont want to use numbers to detect that speaker. I want to use names. This is my code. In the training part

2 ビュー (過去 30 日間)
clear all;
close all;
clc;
warning off
Fs=8000;%Sampling frequency in hertz
ch=1;%Number of channels--2 options--1 (mono) or 2 (stereo)
datatype='uint8';
nbits=16;%8,16,or 24
Nseconds=5;
%% Create a recorder object
recorder=audiorecorder(Fs,nbits,ch);
datatype='uint8';
%% Record user's voice for 7 sec
disp('Get Ready')
pause(3)
disp('Please Record your voice');
drawnow();
pause(1);
recordblocking(recorder,Nseconds);
disp('Recorded');
%%Play users voice
play(recorder);
data= getaudiodata(recorder);
%Store recorded audio signal in numeric array
data=getaudiodata(recorder,datatype);
plot(data)
figure;
%%Training Function
f = voiceFeatures(data);
%%Save Users data
user=input('Enter the users number:');
try
load database
F=[F;f];
C=[C;user];
save database
catch
F=f;
C=user;
save database F C
end
msgbox('Your voice is registered')
  1 件のコメント
kim
kim 2022 年 12 月 4 日
編集済み: kim 2022 年 12 月 4 日
In this code I want to register names not numbers in the database so that when I test it it will detect who the voice is that. anyone can help me what should I write in the code. Thank you

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2022 年 12 月 4 日
user = cellstr(input('Enter the users name:', 's'));
  11 件のコメント
kim
kim 2022 年 12 月 9 日
in this code I want to use names not numbers in detecting I have training. and this testing part is a continuation. how can I detect the name of the users voice? @Walter Roberson
Walter Roberson
Walter Roberson 2022 年 12 月 9 日
You cannot do that. There is no code in the world that can take recorded speech data and directly convert it into the name of the speaker, without going through a numeric step of analyzing coefficients and comparing against recorded coefficients to determine closest match.
As such, code is always going to arrive at an index of which match or matches are closest, and you would then always use that index to look into the list of names to pull out the name associated with the match.

サインインしてコメントする。


Image Analyst
Image Analyst 2022 年 12 月 9 日
It sounds like you might be able to use a dictionary

カテゴリ

Help Center および File ExchangeSpeech Recognition についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by