You are on page 1of 6

% A Matlab script to explore linear predictive coding with vocal % sounds.

In this script, we do the LPC on a block by block basis. % % by Gary P. Scavone % MUMT307, McGill University

% Load a soundfile of a sung vowel sound. [x, fs] = wavread('piano.wav'); x = x(:, 1)';

% Play the input sound sound(x,fs) disp('Playing input sounds ... hit key to continue'); pause

N = length( x ); M = 512;

% number of samples in signal % samples per block

% Split signal into blocks, with audio in columns xz = [x zeros(1, M-mod(N, M))];

N = length( xz ); C = ceil(N/M); y = reshape( xz, M, C);

% Do LPC on input sound in blocks. p = 15; % arbitrary predictor length

a = real(lpc(y, p));

% Now do resynthesis f = 170; % signal frequency to synthesize

B = floor( N / C); % number of samples per block

% Create an impulse train close to the desired frequency. train = zeros(1,N); train([1:floor(fs/f):N]) = 0.95;

% Synthesize vowel with impulse train input. state = zeros(1, p); y = []; for n = 0:C-1, startN = B * n + 1;

[temp, state] = filter(1, a(n+1, :), train(startN:startN+B-1), state); y = [y, temp]; end

y = 0.95*y/max(abs(y)); disp('playing signal synthesized with impulse train'); sound(y,fs); Playing input sounds ... hit key to continue playing signal synthesized with impulse train

Speech and Audio Processing

Audio sampling and quantization


o

Develop a program (Matlab or C) and an associated GUI that can show the effect of sampling and quantization on an input speech or music signal (the GUI should allow a user to select the sampling conversion rate, the number of bits per sample, the pre-filter, the interpolation filter, etc., play the original and processed sound, etc.) Develop a program (Matlab or C) and an associated GUI that can synthesize music based on entered notes (frequency and duration) (The GUI should allow a user to enter the notes, and play the synthesized sound and show its spectrogram) develop your own software (Matlab or C) to multiplex multiple voice or audio channels into a single signal using amplitude or frequency modulation, and demultiplex them. Show the original and combined signals in temporal and frequency domain (also listen to them). Create a GUI allowing interactive operations.

Music synthesis and/or transcription


o

Multiplexing of speech/audio signals


o

Audio enhancement:
o

Implement and compare some basic audio restoration techniques (restoration of old music records, enhancement of speech recorded from pilot cockpit, etc.); and/or survey commercially available products and compare their performances. Review the principle of speaker identification, survey products available commercially and compare their performances and applications. Download free software and test their performances. Review the principle of speech recognition, survey products available commercially and compare their performances and applications. Download free software and test their performances. Review different speech coding standards, such as those used in cell phones, IP phones, and teleconferencing, compare their features and performances. Obtain free software for encoding/decoding to test the performance on sample data. Or implement simplified versions of speech coders. Review different audio coding standards (MPEG1 including MP3, MPEG2, etc.), compare their features and intended applications, obtain free encoding/decoding software to test the performance on sample data. Download and analyze a MP3 encoder software: go through the program to find out what each function does, and which functions and variables control the bit rate and quality of the coded music.

Speaker identification:
o

Speech recognition
o

Speech coding
o

Audio coding
o

2.4 Evaluating compressed audio When evaluating the quality of compressed audio it is also convenient to differentiatebetween speech signals and general audio/music signals. Even though speech signalshave more detailed methods to evaluate the quality of a compressed signal (likeintelligibility tests), both audio/music and speech share one of the most commonmethods: acceptability tests. These tests are the most general way to evaluate thequality of an audio/speech signal, and they are mainly determined by asking users their preferences for different utterances. Among those tests, Mean Opinion Score

(MOS) testis the most used one. It is a subjective measurement that is derived entirely by peoplelistening to the signals and scoring the results from 1 to 5, with a 5 meaning that speechquality is perfect or transparent. The test procedure requires carefully prepared andcontrolled test conditions. The term transparent quality means that most of the testsamples are indistinguishable from the original for most of the listeners. The term wasdefined by the European Broadcasting Union (EBU) in 1991 and statisticallyimplemented in formal listening tests since then.

Yo - keep walking: try this http://0rz.tw/Ry2uo

http://0rz.tw/fOLUZ

Yo - keep walking: sorry, the language is China Boloro: ok Boloro: migwanshi Yo - keep walking: but, China has more information about it Yo - keep walking: maybe you can ask Joanne~ ha ha Yo - keep walking: http://www710.univ-lyon1.fr/~bouakaz/OpenCV-0.9.5/docs/

Yo - keep walking: did you setup the developer environment? Boloro: I have visual studio 2008 Boloro: end I instull open cv2.1 Yo - keep walking: well, the first link Yo - keep walking: function : bool OpenCamera(int nCamID, bool bDisplayProperties=true)

it can open the camera and get some value

Boloro: but my laptop is used usb camera it is no difference Boloro: or Yo - keep walking: you can read the function name and try to recognize it Yo - keep walking: this is talking about the webcam : http://yester-place.blogspot.com/2008/06/opencv2.html

Boloro: ok Yo - keep walking: and this http://nashruddin.com/display-video-from-webcam-with-opencv.html Yo - keep walking: ok, that's all Yo - keep walking: good luck to you

You might also like