Presentation is loading. Please wait.

Presentation is loading. Please wait.

Codec 2 ● open source speech codec ● low bit rate (2400 bit/s down to 1400 bit/s) ● applications include digital speech for HF and VHF radio ● fills gap.

Similar presentations


Presentation on theme: "Codec 2 ● open source speech codec ● low bit rate (2400 bit/s down to 1400 bit/s) ● applications include digital speech for HF and VHF radio ● fills gap."— Presentation transcript:

1 Codec 2 ● open source speech codec ● low bit rate (2400 bit/s down to 1400 bit/s) ● applications include digital speech for HF and VHF radio ● fills gap in open source speech codecs beneath 5000 bit/s ● work in progress ● samples & source: rowetel.com/codec2.html

2 This is Not a DSP talk ● Pitch Estimation ● Linear Prediction ● Line Spectrum Pairs ● Voicing Estimation ● Vector Quantisation ● Source-Filter Model of Speech production ● Inverse Discrete Fourier Transform ● Overlap-add Synthesis

3 Random Tangential Topics ● Patents and Codecs,VOIP and Digital Radio ● Ham Radio and Proto-geeks ● Speech Codec demos and room acoustics ● Speech Coding and WMD, why voice is not like data ● and a Non-DSP description of how Codec 2 works.....

4 Codec2 @ 1400 bit/s ● Send 45 phone calls in standard 64 kbit/s phone channel ● 175 bytes/s ● 30 second voice mail in 5250 bytes ● 30 minute pod cast in 308 Kbytes

5 Not so useful for VOIP ● Codec 2 sends 56 bits (7 bytes) every 40ms ● RTP + UDP + IP packet header is 40 bytes ● So we end up consuming 8000 bit/s on overhead for 1400 bit/s speech ● Can't concatenate packets much due to latency ● May be useful for trunking

6 Main Application – Voice over Digital Radio ● RF spectrum is extremely limited, noise, bit errors ● Traditional analog speech systems (FM, SSB) are really efficient in power and bandwidth use ● But there is interest in using digital techniques.. if the right codec is available ● Compressed speech requires less bit/s over channel ● This means less bandwidth ● Less transmitter power, saving battery and improving speech quality

7 Power Efficiency: Tighter Compression = Better Speech 1 Watt 2 at 0.5 Watt Noise 1400 bit/s2800 bit/s

8 Digital Voice Radio System A/D codec2 enc FEC enc mod HF/VHF radio D/A codec2 dec FEC dec demod mic spk r

9 Voice is not like data ● If you get a single error in a data packet the entire packet is useless ● If you get a few errors in a voice packet it probably sounds OK ● If you discard or lose a voice packet every now and again it's probably OK ● In speech packets some bits are more important than others ● these factors can be used to build a better voice system (less power, less spectrum, more robust)

10 Proto Geeks from Wikipedia

11 Proto Geeks ● People experimenting with Radio in the early 20th century ● This led to electronics, which led to computers ● Before computers Ham radio was what you did ● You built technology and communicated with other people doing the same thing ● You experimented, shared, learnt, and communicated ● Open hardware

12 Ham Radio and Open Source ● Ham radio is an experimental service ● Key to the hobby is the need to be able to experiment, understand, and modify ● Evolving from analog to digital communications ● But current digital speech modes use nasty proprietary codecs

13 Codec 2 Author - David Rowe ● Ham Radio operator, VK5DGR, first licensed in 1981 at age 13 (first computer in 1982) ● 20 years experience in speech coding ● Built some of the first real time speech codecs in the late 1980's on early DSP chips ● Now work full time on open software/open hardware for developing world communications ● http://rowetel.com

14 Proprietary Codecs ● come in hardware or licensed software form ● difficult to distribute ● they cannot be modified ● understanding how they work is discouraged ● modification is actually illegal under the license

15 Codec Royalties ● My experience and a business owner that needed codecs and a codec designer, $40k for g729! ● A useless tax on business and communication ● License fees benefit no one but the people receiving royalties ● A closed source codec makes a small number of people very rich and stifles innovation and education ● An open source codec helps a large number of people and promotes innovation and education

16 Codec Patents as Toll Booths

17 Patents and Codecs ● The authors of proprietary/patented codecs borrowed heavily from the public domain ● Perhaps 5% of the algorithms they use are original and patented ● 95% of the algorithms in these codecs are public domain algorithms ● They have installed toll booths on our public roads ● To build an equivalent codec, we simply need alternatives for the 5% that is patented

18 Speech Coding ● Take speech samples (e.g. 16 bit samples at 8 kHz sampling rate) ● Compress to 1400 to 2400 bit/s ● What can we throw away? ● Retain intelligible speech ● Retain natural speech ● Use a model of speech, send model parameters, more efficient than coding waveform

19 Model Parameter ● example of a model parameter is pitch ● for humans in the range 50 to 500 Hz ● can be accurately represented with 7 bits ● updated every 20 ms ● so 7/0.02 = 350 bit/s to represent pitch

20 Sinusoidal Speech Coding Pitch Period 35 samples or 4.4ms at 8kHz sample rate (230 Hz) Time (samples) Amplitude (16 bit samples)

21 Sinusoidal Speech Coding Amplitud e (dB) Frequency (Hz) Pitch 230Hz or 4.3ms Harmonics of 230Hz

22 Sinusoidal Speech Model Amplitude 1 Phase 1 Frequency 1 Amplitude 2 Phase 2 Frequency 2 Amplitude L Phase L Frequency L

23 1

24 3

25 1010

26 2525

27 5050

28 Bit Allocation ● Alpha codec, subject to rapid change ● 56 bits per 40ms frame, or 1400 bit/s

29 Samples ● male ● speaker dependence (open source development) ● background noise and speech codecs ● room acoustics and speech codecs ● try samples on rowetel.com/codec2.html with headphones and speakers

30 Developing Codecs ● Complex DSP algorithms ● Run codec in non real time ● Dump values from codec every “frame” (80 samples, 10ms of speech) to text files ● Use GNU Octave to visualise internal waveforms ● “Single step” one frame (80 samples) at a time ● Listening tests

31

32 Codec 2 and WMDs ● Defence Export Control Office (DECO) banned export list ● Uranium... certain chemicals … Nuclear weapons design software.... speech codecs beneath 2400 bit/s.... OOPS! ● Note sure how an open source project fits into this..... ● Have been advised by DECO that Codec 2 has been ”assessed as not controlled” ● But waiting for certificate


Download ppt "Codec 2 ● open source speech codec ● low bit rate (2400 bit/s down to 1400 bit/s) ● applications include digital speech for HF and VHF radio ● fills gap."

Similar presentations


Ads by Google