Title: Voice Activated Switch
1Voice Activated Switch
- ECE345 Senior Design Project
- By
- Brad Griffis
- Sung Kim
- Ronald Roth
- November 30, 2001
2Introduction
- Meet needs of handicapped UHS student
- Replace the original switch with our product
- Clip-on microphone with digital signal processing
- Switch-controlled power strip
3Objectives
- Reliability for Matts voice-training
- Sensitivity for voice-activating
4Overall Design
                   Â
Â
Lavalier MX185
SCM268 Mixer
DSK 5402
Power Supply Device
Electronic Device
5Algorithm Development
- X referring to the spectrum of the observed
speech signal - E to the excitation component
- V to the vocal tract shaping of the excitation
spectrum
6DSP Flowchart - Input
7DSP Flowchart - FFT
8DSP Flowchart Log Magnitude
9DSP Flowchart Cepstral Coeffs
10Simulation on Cep. Coef.
11Euclidean Distance
- Ci represents the ith cepstral coefficient of the
windowed signal - ?i represents the ith cepstral coefficient of the
template
12Simulation on Euclidean Dist.
13Template (ah trimmed ah)
14Percent Passing for ah, iy, oh
15Percent Passing for shoe bench
16Percent Ratio of ah to oh shoe bench
17Threshold and Percent Passing
- Optimal percent passing chosen conservatively at
0.30
18Number of Cepstral Coeffs
- Trial and error
- 13 worked best
19Ah Detection
- Three Ahs detected from ThreeAhs.wav at 1.61
2.20 sec., 5.78 6.09 sec., and 8.35 8.94 sec.
20Detecting Matts Ah
- One of Matts ahs
- detected by the
- Algorithm
21Software Flowchart
C
Update Percent Passing Ah
Get Input
Ahs_state0
Ahs_state1
Depend on the cond.
Cepstrum( )
No Signal
Generate Sinusoidal Signal
Compare Cep. Coeffs. to template, getting
Euclidean Dist.
C
- I/O interrupt is called whenever the input buffer
is full. After this, DSP continues its operation.
22Bit Reverse
Replace oldest 10 ms samples with newest in
buffer
FFT
Normalize input to -1, 1
LogFFT
Replace the newest samples in buffer with the
normalized input
Bit Reverse
Hamming Window
IFFT
Zero Padding
Get first N Coeffs.
Convert to q15
23A
No
Yes
Cond2
No
Cond1
Cond3
Cond4
Yes
No
No
Yes
Update ahs buffer
Yes
Ah_state 1
Ah_state 0
Increment ah
Update ahs buffer
A
- Cond1 Euclidean distance lt Threshold
Cond3 ah_state 0 - Cond2 Percent_ahs gt Percent_ahs_Threshold
Cond4 ah_state 1
24Reverse-engineering
- Reverse-engineering of the original switch from
enabling device Corp - Output of the switch
- -When there is an input
- No output for 23 seconds
- -When there is no input
- 60 Hz 50 mVpp sinusoidal signal generated
25DSP Board
26Mixer Setup
1 should be plugged into standard outlet 3
should be set to mic 4 should be connected to
the DSP input 7 phantom power should be turned
on for a condenser mic (e.g. lavalier) 8 XLR
input from condenser mic (lavalier) plugs in here
27I/O
- Codec
- Serial Port
- DMA
- Memory
- CPU
- Threading/interrupts
28Verification
- Module testing
- Incremental coding
29Challenges
- Memory Mapping
- Compiler Issues
- Performing an IFFT using an FFT
30Successes
- Consistent cepstral results
- Determining optimal parameter values
- Getting Matlab to detect ahs in a file
- Reverse engineering power strip input
- Implementing I/O involving overlapping windows
- Calculation/Verification up to IFFT
31Recommendations
- Use C5409 DSP Chip
- Case for DSP Board
- Detection of other phonemes
32Acknowledgements
- Donation from Shure
- SCM268 mixer
- MX185 cardioid lavalier microphone
- Support from ECE department
- C5402 DSK board
- Prof. Hasegawa-Johnson