• Content Count

  • Joined

  • Last visited

About Junior_jessy

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. There is only one known pattern : signal . Maybe you need to know what are the input signal and template. I built signal by calculating the mfccs of a reference signal. Its only one word record such as "up" template is the mfccs calculate from an ad-hoc recorded signals. DTW is not my main function. I haven't considered that the amplitude can change cause the record will be made in the same condition. But you right I can manage real speech. I record only when I say a word . Then I remove noise, silence ,calculate mfcc of the record and I compare the result if the reference using DTW. function [mm,t,Matched,TEST_SMOOTHED ]= SpeechTry(TEST) % TEST is the ad-hoc record during 2secondes UP = wavread('avancero1.wav'); %1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DOWN = wavread('reculero1.wav'); %2 %% LEFT = wavread('montero1.wav'); %4 %%% signal reference RIGHT = wavread('descendrero1.wav'); %3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TEST_SMOOTHED = EndPointing(TEST); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UP = EndPointing(UP); %%% DOWN = EndPointing(DOWN); %% remove silence and noise from signals RIGHT = EndPointing(RIGHT); %% LEFT = EndPointing(LEFT); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% FeatureVectorsT =calculate_mfcc(TEST_SMOOTHED); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% FeatureVectorsUP =calculate_mfcc(UP); %% FeatureVectorsDOWN =calculate_mfcc(DOWN); %% calculate de mfcc FeatureVectorsRIGHT =calculate_mfcc(RIGHT); %% FeatureVectorsLEFT =calculate_mfcc(LEFT); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DUP =DTW(NFeatureVectorsT,NFeatureVectorsUP); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DDOWN =DTW(NFeatureVectorsT,NFeatureVectorsDOWN); %% calculate DTW DRIGHT =DTW(NFeatureVectorsT,NFeatureVectorsRIGHT); %% its return a real DLEFT =DTW(NFeatureVectorsT,NFeatureVectorsLEFT); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% [A,I] = min(M); %%%%%%%%%%%%%%%%%%%%%%%%%%%%% if(I==1) % Matched = UP; % end % if(I==2) % Matched = DOWN; % end % The min min of the dtw indicate the word if(I==3) % that is the nearest to the record Matched = RIGHT; % end % if(I==4) % Matched = LEFT; % end % t(1) = I; %%%%%%%%%%%%%%%%%%%%%%%%%%%% Junior Jessy
  2. Hi @zygot @[email protected] thank for your responses. I have done what you advice me and now I want to translate into VHDL. I don't know where to start cause I used to write simple VHDL code such as counter , multiplexer, ram memory, transcoder for display on 7-segment . ( I used to code a MP3 player ) However I don't know where to start and which methodology i need to use to translate this % dynamic time warping of two signals function totalDistance=DTW(signal,template) signalSize=size(signal,1); templateSize=size(template,1); if signalSize > 2*templateSize || templateSize > 2*signalSize error('Error in dtw(): the length difference between the signals is very large.'); end %% initialization distances=zeros(signalSize,templateSize)+Inf; % c3ache matrix distances(1,1)=norm(signal(1,:)-template(1,:)); %initialize the first row. for j = 2:templateSize cost = norm(signal(1,:)-template(j,:)); distances(1,j) = distances(1,j-1) + cost; end %initialize the first column. for i = 2:signalSize cost = norm(signal(i,:)-template(1,:)); distances(i,1) = cost+ distances(i-1,1); end %initialize the second row. for j = 2:templateSize cost = norm(signal(2,:)-template(j,:)); %distances(i,j)=cost+min( [ LEFT , CORNER ] ); distances(2,j)=cost+min( [distances(2,j-1), distances(1,j-1)] ); end %% begin dynamic programming for i=3:signalSize for j=2:templateSize cost=norm(signal(i,:)-template(j,:)); %distances(i,j)=cost+min( [ LEFT , CORNER , FAR_CORNER ] ); distances(i,j)=cost+min( [distances(i,j-1), distances(i-1,j-1), distances(i-2,j-1)] ); end end totalDistance=distances(signalSize,templateSize); end thank you in advance
  3. Hi @[email protected] @zygot @xc6lx45 Happy new year ☺️ . Looking up to my project, I'm trying to move the matlab code to VHDL and i'm using HDL coder. However, i have got some issues that i can't fix. I learnt that i have to modify the matlab code but in my case, i don't know how to do it . i will be greatful if you help me. Because i'm running out the time, is there a way to run matlab code on FPGA without turning it to vhdl? i attached my code to this message. THANKS YOU IN ADVANCE FOR YOUR RESPOSNSES test.zip
  4. @[email protected] Okay thank you maybe I will ask you when my algorithm will work. If you know someone who can help me it will be very kind. Thanks .
  5. Hi @[email protected] , @zygot, @xc6lx45 please look at my question above : https://forum.digilentinc.com/topic/16973-voice-activited/?do=findComment&comment=42558, I haven't find find a solution yet . thank you in advance .
  6. Hi @[email protected] I'm trying to make an order when once of these words is spell : In French "gauche", "droit", "haut", "bas" or English "up", "down", "left", "right" no matter. I find a way to code the voice-activated through five steps: 1 : remove signal silence , with an amplifier filter silenceremoval.m 2 : remove the noise, with a butterworth filter. silince_noise_remove.m 3: smooth the signal using a Simple gaussian smooth function smooth.m. EndPointing.m 4 : calculate the signal's mfcc ( Mel-frequency cepstral coefficients) calculate_mfcc.m 5: calculate the DTW : Dynamic time warping between the reference signal and the input signal. when the two signal are equal its return 0 if not a real positive number. DTW.m To identify a word , SpeechTry.m. gauchero2.wav. basro2.wav droitro2.wav hautro2.wav I have four reference signals one for each word command. After the input input signal has passed steps 1 to 4 i calculate le DTW between the result and each signal reference. The smallest DTW identifies the word I've got some issues, the algorithm is able to identify easily some word with nearly 90% of success such as "gauche" may be due to the fact that it's very different from the others words. But others such as "haut" words still hardly identifiable. THANKS YOU IN ADVANCE FOR YOUR RESPOSNSES
  7. Hi @[email protected] @zygot Thank for the response. I'm coding on octave as you advice me . Junior
  8. Thanks you @xc6lx45 @jpeyron I have to describe my architecture on VHDL , i'm not coding on matlab. I'm not sure i have understood what solution you suggested me. How can i make a comparison between to signal. One which has already recorded on the board another one which it's spell at a moment by a user please. Junior
  9. Hi @jpeyron Thanks for your response. Let me remind you that my project aim is to make a voice-activated with the pmod Mic3. The solution that i find it's to make a memory with the differnet word that i have to recognize. And therefore when the user speak i make an autocorrelation of his voice signal with What i record in the board. Is that solution Will run? If yes, i need please to make a memory To record the 12bits output at the same Time that they are generate with an acquisition frequency of 1seconde. Thanks again for your response. Junior
  10. Hi @jpeyron Yes i'm talking about the project done by @hamster. I think it's just the noise that turn on the three first leds, because i were not talking in front of the microphone. In that case how can i reduce noice's power and make a signal processing. thank you Junior
  11. hi @jpeyron Thanks for your response, i try the example and i have got some question please. When i displayed the 12bits of MIC3's output on the board's led i notice that the 11th bit is always ON and it's the same for the three first bits and i don't understand why. Why i want to know that , it's because i have to make a signal processing of the MIC3's output in order to recognize a word. Thank you in advance for your answer. junior
  12. Junior_jessy


    Hello, I'm trying to make a voice-activated on a nesys4 and i want to use the pmodMic3.To do si, I want to use the SPI protocol but i don't know how. So how can i choose the SPI protocol ? Furthermore, I got some issues when filling in the constraint's file. On the web-site of Diligent, the pin2 is not connected but, the protocol SPI show the opposite. So how to Well connect the in/out of the peripheral to the board in the constraint's file? Thank you in advance for your answer. Junior