Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A)Determine the longest word (highest in terms of seconds) in the sentence you recorded B)Print the longest word and along with its duration in seconds

A)Determine the longest word (highest in terms of seconds) in the sentence you recorded

B)Print the longest word and along with its duration in seconds using fprintf()

matlab

%% Read audio data

% Clear Workspace

clear all; close all; clc;

% Load the audio along with Sampling frequency

[my_audio,fs]=audioread('my_sentence.wav');

% Play the same audio

soundsc(my_audio,fs)

% Visualize the Audio file

figure;

plot(my_audio);

xlabel('Sample Indices');

ylabel('Amplitude in Volts');

title('Original Audio');

%% Extract Each Word

% Word 'one'

one=my_audio(9878:1.375e4);

% Word 'two'

two=my_audio(1.705e4:2.056e4);

% Word 'three'

three=my_audio(2.282e4:2.681e4);

% Word 'four'

four=my_audio(2.857e4:3.216e4);

% Jumble the words

repeat_once=[one;one;two;two;three;three;four;four];

% Play the Jumbled audio

soundsc(repeat_once,fs);

% Write the Jumbled audio file

audiowrite('repeat_once.wav',repeat_once,fs);

%% Time Domain

% Time domain

time=(1:length(my_audio))./fs;

figure;

% Plot My audio in Time domain

plot(time,my_audio);

xlabel('Time in Seconds');

ylabel('Amplitude');

% Word Four in Seconds

time_four=length(four)/fs

% Word three in Seconds

time_three=length(three)/fs

% Word two in Seconds

time_two=length(two)/fs

% Word one in Seconds

time_one=length(one)/fs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

Differentiate the function. r(z) = 2-8 - 21/2 r'(z) =

Answered: 1 week ago

Question

1. Who should participate and how will participants be recruited?

Answered: 1 week ago

Question

3. How would this philosophy fit in your organization?

Answered: 1 week ago

Question

How would you assess the value of an approach like this?

Answered: 1 week ago