Audio and speech processing with matlab paul r. hill - The full ebook version is ready for instant d

Page 1


Audio And Speech Processing With MATLAB Paul R. Hill

Visit to download the full and correct content document: https://textbookfull.com/product/audio-and-speech-processing-with-matlab-paul-r-hill/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Speech and Audio Processing A MATLAB based Approach 1st Edition Ian Vince Mcloughlin

https://textbookfull.com/product/speech-and-audio-processing-amatlab-based-approach-1st-edition-ian-vince-mcloughlin/

Instant Audio Processing with Web Audio 1st Edition

Khoo Chris

https://textbookfull.com/product/instant-audio-processing-withweb-audio-1st-edition-khoo-chris/

Conceptual Digital Signal Processing with MATLAB

Keonwook Kim

https://textbookfull.com/product/conceptual-digital-signalprocessing-with-matlab-keonwook-kim/

Differential Equations with Matlab 2nd Edition Brian R. Hunt

https://textbookfull.com/product/differential-equations-withmatlab-2nd-edition-brian-r-hunt/

Understanding Digital Signal Processing with MATLAB® and Solutions. First Edition. Edition Poularikas

https://textbookfull.com/product/understanding-digital-signalprocessing-with-matlab-and-solutions-first-edition-editionpoularikas/

Advances in Audio Watermarking Based on Matrix Decomposition SpringerBriefs in Speech Technology Dhar

https://textbookfull.com/product/advances-in-audio-watermarkingbased-on-matrix-decomposition-springerbriefs-in-speechtechnology-dhar/

Regularized Image Reconstruction in Parallel MRI with MATLAB 1st Edition Joseph Suresh Paul

https://textbookfull.com/product/regularized-imagereconstruction-in-parallel-mri-with-matlab-1st-edition-josephsuresh-paul/

Digital Signal Processing-A Primer With MATLAB® 1st Edition Samir I. Abood (Author)

https://textbookfull.com/product/digital-signal-processing-aprimer-with-matlab-1st-edition-samir-i-abood-author/

Numerical Methods of Exploration Seismology With Algorithms in Matlab r Gary F. Margrave

https://textbookfull.com/product/numerical-methods-ofexploration-seismology-with-algorithms-in-matlab-r-gary-fmargrave/

Audio and Speech Processing with MATLAB ®

Audio and Speech Processing with MATLAB ®

CRC Press

Taylor & Francis Group

6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742

© 2019 by Taylor & Francis Group, LLC

CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works

Printed on acid-free paper

Version Date: 20181026

International Standard Book Number-13: 978-1-4987-6274-8 (Hardback)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Names: Hill, Paul (Researcher in image communication), author.

Title: Audio and speech processing with MATLAB / Paul Hill.

Description: First edition. | Boca Raton, FL : CRC Press/Taylor & Francis Group, 2018. | Includes bibliographical references and index.

Identifiers: LCCN 2018027155| ISBN 9781498762748 (hardback : acid-free paper) | ISBN 9780429444067 (ebook)

Subjects: LCSH: Speech processing systems. | Sound--Recording and reproducing--Digital techniques.

Classification: LCC TK7882.S65 .H55 2018 | DDC 006.4/5--dc23 LC record available at https://lccn.loc.gov/2018027155

Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com

and the CRC Press Web site at http://www.crcpress.com

TomyParentsandFriends

ManythankstomyDadforproofreadingthroughthefinal manuscript!

3.6TheDiscreteFourierTransform(DFT)..............

3.7ForwardandBackwardsTransformfortheFourTypesof FourierTransforms

3.8ExampleDiscreteFourierTransform

3.9TheFastFourierTransform:FFT

3.10WindowingtoDecreaseSpectralLeakageandImprove FrequencyResolution

3.11TheFastFourierTransform(FFT):ItsUsein Matlab

3.12ZeroPaddingtheFFT.......................

3.13Short-TermFourierTransform:STFT...............

3.14FrequencyDomainAudioProcessingUsingtheSTFTandthe InverseSTFT............................

3.15 Matlab ImplementationofPerfectReconstructionDiscrete STFT.................................

3.16AudioSpectrograms........................

3.19Exercises...............................

4.5WaveEquation:StringVibrationFixedatTwoEnds

4.6WaveEquation:VibratingAirColumn..............

4.7WaveEquation:VibratingColumnofAir(OpenatOneEnd) Solution...............................

5.1ThePeripheralAuditorySystem.................

5.5RelationshipBetweenFilterShapeandtheMaskingFunctions UsedforCompression.......................

5.6PropertiesoftheAuditoryNeurons

5.7Summary..............................

5.8Exercises...............................

6.5PerceptionofPitch.........................

6.6PsychoacousticsSummary....................

6.7Exercises...............................

7.1Introduction.............................

7.2FilterbanksforAudioCompression...............

7.3PerfectReconstructionFilter-Banks................

7.5MPEG1AudioCodecStructure..................

7.6MPEG1AudioCompressionPsychoacousticModels.....

7.7MPEG1AudioCompression:BitCoding............

7.8ContemporaryWidebandAudioCodecs............

7.9LosslessAudioCodecs.......................

7.10Summary..............................

8.5PhoneticAlphabets.........................

8.6DeterministicSequenceRecognition...............

8.7StatisticalSequenceRecognition.................

8.8LanguageandAuditoryModels.................

8.9SpeechRecognitionDatasets...................

8.10Summary..............................

9AudioFeaturesforAutomaticSpeechRecognitionandAudioAnalysis

9.1SpeechFeatures:Introduction...................

9.4LPCFeatures............................

9.5FeatureExtractionforASR....................

9.6Perceptually-BasedFeatures:PLPandMFCCFeatures....

9.7PracticalImplementationsofPLPandMFCC..........

9.10Exercises...............................

10HMMs,GMMsandDeepNeuralNetworksforASR

10.1HiddenMarkovModels......................

10.2MathematicalFrameworkofHMMs...............

10.3Non-DeterministicPatterns....................

10.4HiddenMarkovModels(HMMs)................

10.5HiddenMarkovModels:MathematicalDefinition.......

10.7HiddenMarkovModels:Evaluation...............

10.8HiddenMarkovModels:Decoding................

10.9HMMs:Learning..........................

10.10Example Matlab HMMCode..................

10.11HiddenMarkovModelsforSpeech...............

10.12HMMEmissionProbabilityEstimationforASR........

10.13Single-WordSpeechRecognitionSystem............

10.14HMMsforASR:Summary....................

10.15EmissionProbabilityEstimationusingGaussianMixture Models(GMMs)..........................

10.16ASRusingDeepNeuralNetworks(DNNs)..........

10.17MovingForward:HMM-FreeASR...............

10.18HMM,GMMsandDNNs:Summary..............

11SpeechCoding

11.1SpeechCoding:Introduction...................

11.2WaveformCodecs.........................

11.3SpeechVocoders..........................

11.4HybridCodecs:AnalysisbySynthesis(AbS)..........

11.5LPCParametersforSpeechEncoding..............

11.6SpeechCodingStandards.....................

11.7ComparisonofSpeechCodingStandards............

11.8SpeechCoding:Summary.....................

12MusicalApplications

12.1MusicalSynthesis:BriefHistory.................

12.2AdditiveSynthesis.........................

12.3TemporalEnvelopes:ADSR....................

Preface

Audioandspeechprocessingwithintheanalogueanddigitaldomainshasa longhistorygoingbackoveracenturytotheoriginofmechanicalrecording devicesandthefirstdaysoftelephony.Althoughcontemporaryspeechand audioapplicationscantracetheirmethodstothesehistoricaldevelopments, DSP-basedaudiotechnologieshavealsonecessarilyestablishedauniqueset ofalgorithmicandmathematicaltoolswithinthesubject.Thisadvancement ofaudio-basedDSPtechniquesandtechnologieshashadthemostprofound effectonmodernsociety.Theyhaveenabledtherealisationofthingspreviouslythoughtofassciencefiction,suchasentirerecordcollectionsbeing carriedinthepalmofyourhandandvoicerecognitionsystemsgivingdirectionstothenearestcafé.Theoverallaimofthisbookis,therefore,toexplore thebackgroundtospeechandaudioprocessingtogetherwithacomprehensiveanduptodateexplorationofcoreaspectsofthesubject.

Inordertounderstandallthedivergentareasofspeechandaudioprocessingtechnology,anunderstandingofapplicablephysics,physiology,psychoacoustics,digitalsignalprocessingandpatternrecognitionisrequired.A comprehensivecoverageoftheapplicableareasofthesesubjectsisincluded inthefirstchaptersofthisbook.Thisfoundationisthenusedasthecontextof thelaterchaptersthatinvestigatediverseapplicationssuchasspeechcoding andrecognitiontogetherwithwidebandaudiocoding.Manyreal-worldexampleapplicationsarealsoexplored.Specifically,musicalapplicationssuch astimestretchingandrecognitionareexaminedindetail.

Ihaveselectedthetopicscarefullyinordertoreachthefollowingaudience:

Studentsstudyingspeechandaudiocourseswithinengineeringandcomputersciencedepartments.

Generalreaderswithabackgroundinscienceand/orengineeringwho wantacomprehensivedescriptionofthesubjecttogetherwithdetailsof modernaudiostandardsandapplications.

Audioengineersandtechnically-basedmusicianswhorequirean overviewofcontemporaryaudiostandardsandapplications.

Thetextcontainsnumerousreal-worldexamplesbackedupbymany Matlab R functionsandcodesnippetsinordertoillustratethekeytopicswithineachchapter.Thebookandcomputer-basedproblemsattheend

xiv Preface ofeachchapterarealsoprovidedinordertogivethereaderanopportunity toconsolidatetheirunderstandingofthecontent.Finally,starredsections identifytextthatisnotkeytounderstandingfurthersections,butcanberead orreturnedtoforinteresttogetanexpandedunderstandingofthesubject. Althoughthisbookcontainsenoughmaterialtofillatwo-semestergraduatecourse,carefulselectionofmaterialwillenableittobesuitableforsuch acourse,fillingjustonesemester.

Bristol,U.K.

ListofAcroynms

AAC AdvancedAudioCodec.2,5,191

AbS AnalysisbySynthesis.viii,267,271

ADPCM AdaptiveDifferentialPulseCodeModulation.269

ADSR Attack,Decay,SustainandRelease.viii,285,291,292

AIFC AudioInterchangeFileFormat-Compressed.2,5

AIFF AudioInterchangeFileFormat.2,5

AM AmplitudeModulation.301

ASR AutomaticSpeechRecognition.vii,195,196,198,200,202,204

ATH AbsoluteThresholdofHearing.156

AU SunMicrosystemsAudioFileFormat.2,5

BM BasiliarMembrane.118

CD CompactDisc.165,166

CELP CodeExcitedLinearPrediction.272

CELT ConstrainedEnergyLappedTransform.281

CNNs ConvolutionalNeuralNetworks.262

COLA ConstantOverLap-Add.88

CQF ConjugateQuadratureFilters.170,172

CTFT ContinuousTimeFourierTransform.59

DAW DigitalAudioWorkstation.290

DNN DeepNeuralNetworks.238,263

DPCM DifferentialPulseCodeModulation.269

DSP DigitalSignalProcessing.xi

EM ExpectationMaximisation.257

ERBs EquivalentRectangularBandwidths.135

FEC ForwardErrorCorrection.279

FFT FastFourierTransform.vi,51,55,56,66,67

FLAC FreeLosslessAudioCodec.2,5

FM FrequencyModulation.302

GMM GaussianMixtureModels.238,255

HAS HumanAuditorySystem.117

HMMs HiddenMarkovModels.50,197

HTK HiddenMarkovModelToolkit.227

IDE IntegratedDevelopmentEnvironment.319

IETF InternetEngineeringTaskForce.280

LAR LogAreaRatios.280

LFO LowFrequencyOscillator.292

LPC LinearPredictiveCoding.vii,51,205,217,219,221,223

LSTM LongShort-TermMemory.261,262,328

LTP LongTimePrediction.280

MDCT ModifiedDiscreteCosineTransform.187,281

MFCC MelFrequencyCepstralCoding.225,227

MOS MeanOpinionScore.275

MP3 MPEG1AudioLayerIII.2,5

MPE MultiPulseExcited.271

MPEG MotionPicturesExpertGroup.2,5

ListofAcroynms

OGG OGGcompressionsystemorfile.2,5

PCM PulseCodeModulation.269

PLP PerceptualLinearPrediction.225

PQMF Pseudo-QMFFilterBank.173

PR PerfectReconstruction.168

PSD PowerSpectralDensity.80

QMF QuadratureMirrorFilters.169

RM RingModulation.304

RMS RootMeanSquare.36

RNNs RecurrantNeuralNetworks.50,238,260

RoEx RoundedExponential(filter).135

RPE RegularPulseExcited.272

SHM SimpleHarmonicMotion.14,16

SIL SoundIntensityLevel.151

SNR SignaltoNoiseRatio.36

SPL SoundPressureLevel.151

STFT ShortTermFourierTransform.vi,55,83,85

SVMs SupportVectorMachines.50

TIMIT TexasInstrumentsMITSpeechDataset.203

VCA VoltageControlledAmplifier.292

VCF VoltageControlledFilter.288,292

VCO VoltageControlledOscilator.288,292

VST VirtualStudioTechnology.290

WOLA WeightedOverLap-Add.86

Introduction

Theperceptionofsoundanditsinterpretationisakeyhumanfacility.It givessituationalandspatialawareness,cuesforvisualperceptionand,most importantly,theabilitytocommunicate.Communicationcanbeintheform ofsounds,musicor,mostimportantlytothisbook,speech.

Audioandspeechprocessingis,therefore,auniqueandvitallyimportant areaofengineering.WithinthecontextofapplicationssuchasShazam,MP3 encodingandrecognitionsystemssuchasSiri,speechandaudioprocessing currentlyformsakeycontemporaryengineeringresearcharea;nowand goingforwardintothefuture.

Overview

Figure0.1 illustratestheoverallstructureofthesubjectscoveredwithinthis book.Theleftofthisfigureshowstheanalysisofphysicalaudiosignals. Applicationscorrespondingtothistypeofaudioprocessingincludespeech recognitionsystems(e.g.,Siri),musicidentification(e.g.,Shazam)andautomaticmusictranscription.Therightofthisfigureillustratesthesynthesis ofaudiosignalsfromdigitalrepresentations.Applicationscorrespondingto thistypeofprocessingincludemusicalandspeechsynthesis.

Combiningboththeleftandrightsidesofthisfigureillustratescoding applicationsthatcombinetheanalysisandsynthesisofaudio.Thesemethods includethewidebandcodingofaudio(e.g.,MP3/AACcompression)and speechcoding(e.g.,CELP,SpeexandOpus).

Thisbookcoversallthreeaspectsofaudioandspeechprocessingillustratedin Figure0.1.Asmallnumberofspecificapplicationssuchasthephase vocoderforaudiotimedilationareincludedtoillustratethelearnttechniques beingappliedinrealworldapplications.

LearningObjectives

• Learncoreengineering,mathematicalandprogrammingskillstoprocess audioandspeechsignals

• Surveytopicsinsoundanalysisandprocessing

FIGURE0.1:Illustrationofvariouspartsofthebook

• Developanintuitionforsoundsignals

• Learnsomespecifictechnologies

• Beabletoquicklymanipulateandprocessaudiowith Matlab

BookFeatures

Asdenotedbythetitleofthisbook,theprogramscontainedarecodedin Matlab.Wherepossible,allthemethodsdescribedwithinthebookhave accompanyingcodewhichattemptstoexplainorillustratethemainpoints ofeachtechnique.However,thisisnotpossibleforallofthematerial.Furthermore,therearesomeaspectsofthebooksuchasdeeplearningspeech recognitionthatareeffectivelynotpossibletoillustratewith Matlab asthey aresointricatelylinkedwithotherlanguagesandtoolboxes(suchasC/HTK orPython/Tensorflow). Matlab codelistingsareshownenclosedinboxes. Commandlineinputsusing Matlab arealsoboxed.However,eachlinestarts withthecommandlineidentifier >>

Thisbookcanbereadfromcovertocovertogiveagoodoverviewofthe coremathematical,engineeringandprogrammingskillsrequiredforspeech andaudioprocessing.However,somecontainedelementscanbeconsidered

tobemoreforthereader’sinterestandreferenceandarenotkeytounderstandingtheoverallcontent.Thesereferenceorbackgroundsectionscan beeasilyomittedonafirstreadandwillnotinterferewiththeabilityof thereadertounderstandtherestofthebook.These“optional”sectionsare labelledwitha*symbolattheendofthesections’title.

BookPhilosophy

Thisbookdivesstraightintoadetailedcoverageofmanipulatingaudiowith Matlab fromthe firstchapter. Thisexemplifiesthephilosophyofitscreation inasmuchasthereismuchmoreemphasisonpracticalinsightsintothe subjectratherthanprosaicexplanationsarounditsbackground.Ahigh-level treatiseonaudioasahumanendeavourandattribute,etc.hasbeenomitted infavourofapracticalemphasisfromthefirstpage.Itishopedthatthis bookwillmostlyinformbutinsome(possiblyabstract)wayentertainand inspirethereader.Ithascertainlybeenentertainingandinspiringtobetotally immersedinthesubjectduringitscreation.

Notation

General

• Notequalto: =

• Equivalentto: ≡

• Approximatelyequalto: ≈

• Proportionalto: ∝

• Factorialof x: x!

• √ 1: i or j

• xT :Transformof x

Sets

• NaturalNumbers: N = {1, 2, 3,...}

• Integers: Z = {..., 3, 2, 1, 0, 1, 2, 3,...}

• RealNumbers: R

• PositiveRealNumbers: R+

• ComplexNumbers: C

• Inaset: ∈

• Range:(-1,1)

• Halfopenrange:[-1,1)

Calculus

• Firstderivative: ∂y ∂x : y

• Secondderivative: ∂2 y ∂x2 : y

• Gradient: ∇y

Probability

• Probability:P(w)

• Conditionalprobability:P(x|w)

• Normaldistribution: N

MATLAB R

Forproductinformation,pleasecontact:

TheMathWorks,Inc.

3AppleHillDrive

Natick,MA01760-2098USA

Tel:508-647-7000

Fax:508-647-7001

E-mail: info@mathworks.com

Web: www.mathworks.com

Matlab R andAudio

CONTENTS

Tome,it’salwaysajoytocreate musicnomatterwhatittakesto actuallygetthere.Therealevils arealwayswhateverstopsyou fromdoingthat–likeifyour CPUisspikingandyouhavetosit thereandbounceallyourMIDI toaudio.Nowthat’sannoying!

Skrillex

Matlab (MATrix LABoratory)isusedthroughoutthisbookforaudioprocessingandmanipulationtogetherwithassociatedvisualisations.Thischapterthereforegivesanintroductiontothebasiccapabilitiesof Matlab for audioprocessing.AppendixBalsogivesalistofcore Matlab functionsand commandsthatareapplicabletoaudioprocessingforthosestartingtouse thelanguage.Thischapter(andAppendixB)canbeskippedorskimmedif thereaderisfamiliarwiththebasicoperationsofthe Matlab programming languageanditsvisualisationcapabilities.

MoregeneralinformationisgivenontheMathworks(creatorsof Matlab) website www.mathworks.com andwithintheinnumerablehelpfiles,demos andmanualspackagedwith Matlab

R andAudio

TABLE1.1:Audioformatsavailabletobereadby Matlab command audioread

AudioFileFormatDescription Fileextension

WAVERawaudio .wav

OGGOGGvorbis .ogg

FLACLosslessaudiocompression .flac

AURawaudio .au

AIFFRawaudio .aiff,.aif

AIFCRawaudio .aifc

MP3MPEG1Layer3,lossycompressedaudio .mp3

MPEG4AACMPEG4,lossycompressedaudio .m4a, .mp4

1.1ReadingSounds

Audioisreadinto Matlab usingthefunction audioread whosebasicfunctionalityisasfollows. 1

>>audioread(filename);

Where filename inthiscaseisa Matlab variablecontainingastring(array of chars)definingtheentirenameoftheaudiofiletobereadincludingany fileextension(e.g.,mp3,wav,etc.).Atypicalexampleofacallto audioread wouldbe

>>[yFs]=audioread('exampleAudio.wav');

where y isthearrayormatrixofsampledaudiodataand Fs isthesamplingfrequencyoftheinputaudio. audioread isabletoreadtheformats shownin Table1.1.Inthisexample, filename is 'exampleAudio.wav',the filetobereadin(filename isrequiredtobeofa Matlab stringtype andisthereforedelimitedbysinglequotes '). filename canbea Matlab stringthatcanalsoincludeapath(definedintheformatofyouroperatingsystem)toanylocationonyourharddrive.Forexample, filename couldbe 'c:\mydirectory\mysubdirectory\exampleAudio.wav' (onwindows)or '~/mydirectory/mysubdirectory/exampleAudio.wav' (onOSX/Unix/Linux).Astatementin Matlab willautomaticallydisplayitsresults. Itisthereforecommontowanttosuppressthisoutputandthisisachieved byusingthesemicolonattheendofeachlinewherenooutputisrequired. Itisoftenusefultodeterminedetailedinformationaboutanaudiofile 1audioread replacesthemorecommon wavread functionforreadingaudioinpreviousversionsof Matlab. wavread hasnowbeenremoved.

TABLE1.2:Outputstructureofaudioread

StructureelementDescription

'Filename' Filename

'CompressionMethod' Descriptionofcompressionmethod

'NumChannels' Numberofaudiochannels(either1or2)

'SampleRate' Numberofsamplespersecond

'TotalSamples' Lengthofaudioinsamples

'Duration' Lengthofaudioinseconds

'Title'

'Comment'

'Artist'

'BitsPerSample'

'BitsRate'

before(orindeedafter)readingitusing audioread.Thisisachievedusing the audioinfo Matlab functionwhichhasthefollowingexampleusage:

>>information=audioinfo(filename);

where filename isdefinedasabove(i.e.,with audioread),andinformation isa Matlab structureillustratedin Table1.2.Anexampleouputis:

>>information=audioinfo('/Users/csprh/MUSIC/LocalMusic/02Down-to-Earth.mp3')

information=

Filename: '/Users/csprh/MUSIC/LocalMusic/02-Down-toEarth.mp3'

CompressionMethod: 'MP3'

NumChannels:2

SampleRate:44100

TotalSamples:14404608

Duration:326.6351

Title: 'DowntoEarth'

Comment:[]

Artist: 'PrairieDog'

BitRate:128

Onceanaudiosoundhasbeenloadedusing audioread itcanbeplayedeasily usingthe Matlab functions sound or soundsc. 2

2sound or soundsc areanalogoustoimageandimagescfromtheimageprocessingtoolbox.

1.2AudioDisplayandPlayback

Abasicinput(ofamonosource)anddisplayprogramusing audioread is shownbelow:

1 filename= 'paulhill.wav'; %Definethenameoftheaudiofile

2 [Y,Fs]=audioread(filename); %Inputthe(mono)signal

3 timeAxis=(1:length(Y))/Fs; %Convertsamplenumbertotime vector

4 plot(timeAxis,Y); %Plotthewaveform

5 xlabel('time(seconds)');

6 title('Waveform');

7 sound(Y,Fs); %Playbackthesound

Theoutputofthisprogramisdisplayedin Figure1.1.

FIGURE1.1:Basicdisplayofawaveformusing Matlab function audioread.

Asubsetoftheaudiosamplescanbereadinusing audioread usingthe followingcode:

1 filename= 'paulhill.wav'; %Definethenameoftheaudiofile

2 inputRange=4000:4200;

3

4 [Y,Fs]=audioread(filename,[inputRange(1)inputRange(end)]); % Inputthe(mono)signal

5 timeAxis=inputRange/Fs; %Convertsamplenumberottimevector

6 plot(timeAxis,Y); %Plotthewaveform

7 xlabel('time(seconds)');

8 title('Waveform');

9 sound(Y,Fs);

Another random document with no related content on Scribd:

copies of the works possessed in a physical medium and discontinue all use of and all access to other copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of any money paid for a work or a replacement copy, if a defect in the electronic work is discovered and reported to you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™ electronic work or group of works on different terms than are set forth in this agreement, you must obtain permission in writing from the Project Gutenberg Literary Archive Foundation, the manager of the Project Gutenberg™ trademark. Contact the Foundation as set forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend considerable effort to identify, do copyright research on, transcribe and proofread works not protected by U.S. copyright law in creating the Project Gutenberg™ collection. Despite these efforts, Project Gutenberg™ electronic works, and the medium on which they may be stored, may contain “Defects,” such as, but not limited to, incomplete, inaccurate or corrupt data, transcription errors, a copyright or other intellectual property infringement, a defective or damaged disk or other medium, a computer virus, or computer codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the “Right of Replacement or Refund” described in paragraph 1.F.3, the Project Gutenberg Literary Archive Foundation, the owner of the Project Gutenberg™ trademark, and any other party distributing a Project Gutenberg™ electronic work under this agreement, disclaim all liability to you for damages, costs and

expenses, including legal fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a defect in this electronic work within 90 days of receiving it, you can receive a refund of the money (if any) you paid for it by sending a written explanation to the person you received the work from. If you received the work on a physical medium, you must return the medium with your written explanation. The person or entity that provided you with the defective work may elect to provide a replacement copy in lieu of a refund. If you received the work electronically, the person or entity providing it to you may choose to give you a second opportunity to receive the work electronically in lieu of a refund. If the second copy is also defective, you may demand a refund in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied warranties or the exclusion or limitation of certain types of damages. If any disclaimer or limitation set forth in this agreement violates the law of the state applicable to this agreement, the agreement shall be interpreted to make the maximum disclaimer or limitation permitted by the applicable state law. The invalidity or unenforceability of any provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the trademark owner, any agent or employee of the Foundation, anyone providing copies of Project Gutenberg™ electronic works in accordance with this agreement, and any volunteers associated with the production, promotion and distribution of Project Gutenberg™ electronic works, harmless from all liability, costs and expenses, including legal fees, that arise directly or indirectly from any of the following which you do or cause to occur: (a) distribution of this or any Project Gutenberg™ work, (b) alteration, modification, or additions or deletions to any Project Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of Project Gutenberg™

Project Gutenberg™ is synonymous with the free distribution of electronic works in formats readable by the widest variety of computers including obsolete, old, middle-aged and new computers. It exists because of the efforts of hundreds of volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the assistance they need are critical to reaching Project Gutenberg™’s goals and ensuring that the Project Gutenberg™ collection will remain freely available for generations to come. In 2001, the Project Gutenberg Literary Archive Foundation was created to provide a secure and permanent future for Project Gutenberg™ and future generations. To learn more about the Project Gutenberg Literary Archive Foundation and how your efforts and donations can help, see Sections 3 and 4 and the Foundation information page at www.gutenberg.org.

Section 3. Information about the Project Gutenberg Literary Archive Foundation

The Project Gutenberg Literary Archive Foundation is a non-profit 501(c)(3) educational corporation organized under the laws of the state of Mississippi and granted tax exempt status by the Internal Revenue Service. The Foundation’s EIN or federal tax identification number is 64-6221541. Contributions to the Project Gutenberg Literary Archive Foundation are tax deductible to the full extent permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up to date contact information can be found at the Foundation’s website and official page at www.gutenberg.org/contact

Section 4. Information about Donations to the Project Gutenberg Literary Archive Foundation

Project Gutenberg™ depends upon and cannot survive without widespread public support and donations to carry out its mission of increasing the number of public domain and licensed works that can be freely distributed in machine-readable form accessible by the widest array of equipment including outdated equipment. Many small donations ($1 to $5,000) are particularly important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating charities and charitable donations in all 50 states of the United States. Compliance requirements are not uniform and it takes a considerable effort, much paperwork and many fees to meet and keep up with these requirements. We do not solicit donations in locations where we have not received written confirmation of compliance. To SEND DONATIONS or determine the status of compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where we have not met the solicitation requirements, we know of no

prohibition against accepting unsolicited donations from donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make any statements concerning tax treatment of donations received from outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation methods and addresses. Donations are accepted in a number of other ways including checks, online payments and credit card donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project Gutenberg™ electronic works

Professor Michael S. Hart was the originator of the Project Gutenberg™ concept of a library of electronic works that could be freely shared with anyone. For forty years, he produced and distributed Project Gutenberg™ eBooks with only a loose network of volunteer support.

Project Gutenberg™ eBooks are often created from several printed editions, all of which are confirmed as not protected by copyright in the U.S. unless a copyright notice is included. Thus, we do not necessarily keep eBooks in compliance with any particular paper edition.

Most people start at our website which has the main PG search facility: www.gutenberg.org.

This website includes information about Project Gutenberg™, including how to make donations to the Project Gutenberg Literary Archive Foundation, how to help produce our new eBooks, and how to subscribe to our email newsletter to hear about new eBooks.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.