$34.99
Objectives
Design a simple speech recognition program in part I and design a transmitter and a receiver in part II.
• Part I: Write a simple program to distinguish between two simple words (speech sounds)
• Part II: Given a mysterious channel, design a transmitter and a receiver to minimize the bit error rate
• Submit your self-contained runnable MATLAB code using the MATLAB via virtual barn.
• Please test your code using the MATLAB via the virtual barn before submission. (note: some functions might not be supported! Toolbox is not allowed to use!)
• ALL the MATLAB codes should be uploaded to canvas in ONE zip file (project.zip).
All submit codes and reports will be processing for similarity check.
This project is divided into two parts.
Part I: Design a simple speech recognition program (15%)
Part II: Design a transmitter and a receiver (15%)
______________________________________________________________________________
Part I: A simple speech recognition program
Submission (online)
1. How to design your speech recognition program – a written report (≤ 1000 words)
2. Submit your self-contained runnable MATLAB code (should be able to run using the MATLAB via virtual barn)
The program can distinguish between two simple words spoken by you. Based on what you have learnt from the course, you will need to compute and interpret the signals in different domains. You can use FFT to extract useful information about the two different audio signals (two simple words, i.e., on/off), design a simple speech recognition program to distinguish the two simple words.
You can choose any English words with just ONE syllable.
1. [3%] Written report (≤ 1000 words): description of your program, technique/algorithm, testing, and accuracy
2. [2%] MATLAB code
3. [10%] Project demonstration: playback the spoken sound and display the correct output Note:
Output should not be provided with pre-set code (hardcode) or you will lose all the demonstration marks (lose 10%).
Instructions:
You can use the following codes to record your two ENGLISH words and save them in two separate wav files.
MATLAB codes:
% Pre-record your words and save into wav files: Fs = 44100; nBits = 16; nChannels = 2 ;
ID = -1; % default audio input device
recObj = audiorecorder(Fs,nBits,nChannels,ID);
disp('Start speaking.') recordblocking(recObj, 2); disp('End of Recording.'); y = getaudiodata(recObj);
filename = 'word1.wav'; % use word2.wav for the second word audiowrite(filename,y,Fs);
% load your wav file
[x, Fs] = audioread('word1.wav'); % change to word2.wav for the second word sound(x,Fs); % playback your pre-recorded sound
NOTE: Please make sure that you have two different wav files and you can hear your pre-recorded sound from these two wav files.
MATLAB codes:
ID = -1; % default audio input device
prompt = 'type 0 (record live), 1 (wav file 1) or 2 (wav file 2) then hit enter => '; x = input(prompt);
if x == 0 recObj = audiorecorder(Fs,nBits,nChannels,ID);
disp('Start speaking.') recordblocking(recObj, 2); disp('End of Recording.'); y = getaudiodata(recObj);
elseif x == 1
[y, Fs] = audioread('word1.wav'); sound(y,Fs); elseif x == 2
[y,Fs] = audioread('word2.wav');
sound(y,Fs); else
disp('Error!');
end
% y <= speech sound samples
Part II: Design a transmitter and a receiver
Introduction
By now, you have learnt many important concepts and theories about signals and communications. In this part, you will be given a mysterious communication channel. You will need to build your own transmitter and receiver to send and receive some text messages through this mysterious channel. The main goal is to minimize the bit error rate.
Submission (online)
1. How to design your transmitter and receiver – a written report (≤ 1000 words)
2. Submit your self-contained runnable MATLAB code (should be able to run using the MATLAB via virtual barn)
During the project demonstration, your codes will be run and tested with some unknown text messages. Your code should give the minimum bit error rate (≈ 0). Marking criteria:
1. [3%] Written report (≤ 1000 words): descriptions of your transmitter/receiver, problems/issues found, methodology used and testing method
2. [2%] MATLAB code
3. [10%] Project Demonstration: the bit error rate
Note: Bit error rate or the number of error bits should not be provided with pre-set code (hardcode) or you will lose all the demonstration marks (lose 10%).
Instructions: Download the txrx.p, compute_BER.p files and a sample message (txtext.mat) file from the canvas page.
Open MATLAB and make sure that you can find these files in the 'Current Folder'.
Note:
The length of the transmitted samples is limited by 𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐𝟐 samples.
The amplitude of the transmitted waveform should be between 0 and 1.
Exceed these two limits will lose all the demonstration points (10%). Instructions:
1. Double click txtext.mat files => textmsg should appear in the MATLAB Workspace Note: the length of the textmsg will be at most 500 characters.
Reserve the variable ‘textmsg’ in your code or your code cannot be run! DO NOT load the txtext.mat inside your transmitter function!
2. Implement your transmitter
3. Use the txrx function to transmit and receive your waveform => rx_wave = txrx(tx_wave); The given txrx function should be used in your transmitter.
4. The rx_wave will be saved to a rxwave.mat file.
5. Clear all the variable in your workspace >> clear all
6. Implement your receiver and run your receiver
7. Load your rxwave.mat file inside your receiver function so that rx_wave will appear in the workspace
8. Find the received bit sequence (rx_bs) and decode the bit sequence into text message
(rx_msg).
9. Use this function compute_BER(rx_bs, rx_msg). The given compute_BER function should be used in your receiver function.
This compute_BER function will display the transmitted and the received messages in text format; it will also compute the bit error rate; and calculate the number of error bits. Note: the transmitted messages should be stored in ‘txtext.mat’ when using the compute_BER function.
Note: The transmitter and receiver should be written/coded in two separate MATLAB functions/files.
Calculations:
Bit Error Rate (BER): use compute_BER(rx_bs, rx_msg);
where rx_bs => the decoded bit sequence received at the receiver rx_msg => the decoded text message from rx_bs
Project Demonstration:
*all parts should be able to run within this time slot, no extended time will be given!
If you do not show up, you will lose 10% (Project Demonstration) in each part.
Process:
Note: MATLAB code cannot be corrected or changed! Functions/files cannot be added!
NO changes can be made!
If your code give errors/cannot be run, you will lose the 10% (demonstration) in each part!
• In each run, your code should playback your pre-recorded sound/spoken sound and give the word detected as an output.
Note: your program should be able to load the correct wav file, record and play your prerecorded / spoken sound and give the correct output.
Possible mark deduction:
If your program CANNOT load the correct wav file/record your spoken sound, you will get zero marks in the demonstration (lose 10%).
If your program cannot playback your pre-recorded / spoken sound, you will lose 1% in each run.
If your program cannot show the correct output, you will lose 1% in each run.
(Max. 2 runs and count the best run only)
Marks* 10% 9% 8% 7% 6% 5% 4%
BER# 0 > 0 − 0.0014 > 0.0014 – 0.0025 > 0.0025
− 0.0039 > 0.0039 − 0.005 > 0.005
− 0.0075 > 0.0075
No. of error bits.# 0 1-5 6-10 11-15 16-20 21-30 > 30
*not including the mark deduction
#whichever lower Possible mark deduction:
Your code should follow the limit as stated.
Exceed the specified limit of either one will lose all the demonstration points (10%).
Project Report:
Please write your report including part I and part II and submit in ONE pdf file. NOTE: In each part, only the first 1000 words will be marked!
Part I: Design a simple speech recognition program
• descriptions of your program;
• technique/algorithm;
• testing and accuracy
Part II: Design a transmitter and a receiver
• descriptions of your transmitter/receiver;
• problems/issues found;
• methodology used and testing method
Submission Summary:
Project report – PDF format (ONE FILE)
Self-contained runnable MATLAB codes – in ONE zip file – project.zip (including all the necessary functions/files)
--- End of Project ---