Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

use pwm to make speech synthesize

Status
Not open for further replies.

well

Junior Member level 1
Joined
Apr 30, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
pwm voice

I have some question about my pwm speech synthesize module.
I write a pwm module use verilog to make speech synthesize,
I test this module on FPGA, I can hear the voice that i want to play.
but there is some high frequence noice in the speech.
can anybody give me some suggestion?
I think there is some problem with my low filter, but I do not know how to change it.
 

alexadmin

Junior Member level 2
Joined
Jun 15, 2007
Messages
24
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,281
Location
Russia
Activity points
1,398
pwm speaker

well said:
I have some question about my pwm speech synthesize module.
I write a pwm module use verilog to make speech synthesize,
I test this module on FPGA, I can hear the voice that i want to play.
but there is some high frequence noice in the speech.
can anybody give me some suggestion?
I think there is some problem with my low filter, but I do not know how to change it.
Connect it to spectrum analyzer that able to work at low frequencies and check what kind of noise you hear. What sampling rate is used? What analog filter is used on FPGA output?
 

    well

    points: 2
    Helpful Answer Positive Rating

well

Junior Member level 1
Joined
Apr 30, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
how pwm speech

thanks for your reply!
the sampling rate is 8khz,and the precise is 8bit.
I don't have spectrum analyzer ,just have digital oscillograph.
I measure the output of pwm when I connect the speaker, there is a high pulse.
 

alexadmin

Junior Member level 2
Joined
Jun 15, 2007
Messages
24
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,281
Location
Russia
Activity points
1,398
how to synthesize your voice

well said:
thanks for your reply!
the sampling rate is 8khz,and the precise is 8bit.
I don't have spectrum analyzer ,just have digital oscillograph.
I measure the output of pwm when I connect the speaker, there is a high pulse.
It is difficult to estimate signal quality with oscilloscope only. Spectrum analyzer is better :)
Ok. Is any analog filter present between FPGA and speaker?
 

    well

    points: 2
    Helpful Answer Positive Rating

XNOX_Rambo

Advanced Member level 1
Joined
Jul 13, 2002
Messages
435
Helped
90
Reputation
180
Reaction score
2
Trophy points
1,298
Location
Far out, man!
Activity points
3,571
how pwm voice

8 kHz and 8 bits will give a bad voice quality but you can improve things by connecting a steep low-pass filter at your output.
The corner frequency should be lower than half your sampling frequency - you could try a 4-pole 3 kHz filter to start with.
Download FilterPro from TI and start experimenting: http://focus.ti.com/docs/toolsw/folders/print/filterpro.html
 

    well

    points: 2
    Helpful Answer Positive Rating

Iouri

Advanced Member level 2
Joined
Aug 17, 2005
Messages
682
Helped
87
Reputation
174
Reaction score
8
Trophy points
1,298
Activity points
4,814
filter between pwm and speaker

also look on freescale web site they are using this techniaues for the modem application, it is called poor man codec
 

    well

    points: 2
    Helpful Answer Positive Rating

well

Junior Member level 1
Joined
Apr 30, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
use a pwm to drive headphones

thanks! I will do experiment according to your suggestion!
I drawing my Waveform in the attachment.
figure 1: pwm waveform
figure 2: waveform when I connect speaker or earphone
I can hear voice clearly when I connect earphone and some high frequence noise in there .
but if I connect speaker ,I can't hear voice clearly and high frequence noise is bigger!
the frequence of pwm is 7.8khz-8khz
wait for yor your reply!
 

rsrinivas

Advanced Member level 1
Joined
Oct 10, 2006
Messages
415
Helped
50
Reputation
100
Reaction score
12
Trophy points
1,298
Location
bengalooru
Activity points
3,704
voice to pwm

have u bandlimited the signal prior????
as told 8 bits and 8 khz is not a good idea as u have speech BW to be very near to 4KHz and nyquist criterion will be 8 KHz.
may be u can put a LPF prior to synthesizing it.
 

    well

    points: 2
    Helpful Answer Positive Rating

XNOX_Rambo

Advanced Member level 1
Joined
Jul 13, 2002
Messages
435
Helped
90
Reputation
180
Reaction score
2
Trophy points
1,298
Location
Far out, man!
Activity points
3,571
how to create speech with pwm

Check this out: http://ww1.microchip.com/downloads/en/AppNotes/00538c.pdf

Your headphones probably have a higher impedance (32 ohms?) than your speaker (8 ohms?) and you cannot connect them directly to your PWM signal.
You need a power amplifier to drive the headphones/speaker.
 

    well

    points: 2
    Helpful Answer Positive Rating

alexadmin

Junior Member level 2
Joined
Jun 15, 2007
Messages
24
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,281
Location
Russia
Activity points
1,398
how to do synthesize

well said:
thanks! I will do experiment according to your suggestion!
I drawing my Waveform in the attachment.
figure 1: pwm waveform
figure 2: waveform when I connect speaker or earphone
I can hear voice clearly when I connect earphone and some high frequence noise in there .
but if I connect speaker ,I can't hear voice clearly and high frequence noise is bigger!
the frequence of pwm is 7.8khz-8khz
wait for yor your reply!
At first, 8 KHz is very small for PWM. 8 kHz 8bit is quite enough for voice (It is standard in communications) but if you operate with 1-bit signal you must oversample the signal. In the easy case PWM needs to work with Fs=8kHz*2^8=2 Mhz.
By the way find some articles about Sigma Delta Modulation. This is what you need. It is enough simple 1st order SDM for your task. Also you need lowpass filter between FPGA and speaker.

And the second, the figure 2 shoes that output capability is insufficient. Is any amplifier present between FPGA and load?
 

    well

    points: 2
    Helpful Answer Positive Rating

well

Junior Member level 1
Joined
Apr 30, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
outputting speech through pwm

thanks to all!
let me feel not alone!
please attention my post continue!
 

well

Junior Member level 1
Joined
Apr 30, 2007
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
pwm: 8 khz

I can hear the voice clearly.
there is no high frequency noise.
I just change the clock of counter.
but I don't why?


thanks to all !
 

rsrinivas

Advanced Member level 1
Joined
Oct 10, 2006
Messages
415
Helped
50
Reputation
100
Reaction score
12
Trophy points
1,298
Location
bengalooru
Activity points
3,704
pwm for voice

u r increasing the clock which may increase the Fs and hence u may have a better quality.
check the spectrum of the output and u will have ur exact results.
Regards
 

    well

    points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top