MELP algorithm - Iskon Internet

Download Report

Transcript MELP algorithm - Iskon Internet

Mixed-Excitation Linear Predictive Coder - MELP

MELP codec demonstration

Subject:

Voice Coding

Scientific Postgraduate Study of Electronics, FESB, University of Split Professor:

dr. sc. Dinko Begušić

Student:

Zoran Sambol

Voice coding – Study Subject

 Subject program  Literature   Digital Telephony – J. Bellamy Speech Coding – Tutorial Review – A. S. Spanias  E-mail Communication  Professor in Texas and student’s permanent employment  Three phases  Voice Coding overall – Contents   MELP algorithm Seminar document MELP demonstration – Real coding

MELP web & resources

 US DoD Voice Processor Consortium  DDVPC Homepage  MELP at 2.4 Kbps  Performance Measures  Sound Samples   Source Code   Non-real-time fixed and floating point versions Real time ‘C50 DSP version – software development ASPI Digital – web site copy – Polycom  MELP Demo for Windows 95  Texas Instruments   Embedded development Noam Amir – Educational – web site copy

MELP – speech compression

 New 2400 bps Federal Standard  Selection test ( DDVPC )  Intelligibility, Voice quality, Talker recognizability and Communicability  Hardware parameters  Processing power  Memory usage  Delay  Commercial and military use   Robust in difficult noise environments Efficient in computational requirements…

MELP – speech…

 Traditional LPC parametric model includes four additional features:     Mixed-excitation Aperiodic pulses Pulse dispersion Adaptive spectral Filtering  Introduction (ASPI)  Atlanta Signal Processor, Inc.

 Specifications (May 28, 1998 - Draft)  Specifications for the Analog to Digital Conversion of Voice by 2,400 Bit/Second Mixed Excitation Linear Prediction  MELP at lower bit rates

Lets code!

Waves and formats

    How to get pure samples for MELP?

 Learn about wave files – understand technology  Get programming routines  Make applications Books – Programming ‘Knowledge base’  Petzold – Chapter 22 – Sound & Music   Waveform audio device (*.WAV) API – low level (wave*, midi*) and high level (mci*) interfaces   MIDI, CD Audio, MCI Leinecker, Archer – Chapter 16 - Sound  Waveform, MIDI, CD Audio MSDN Library Audio Samples – Platform SDK Utilities – RIFF Walk and RIFF Add ACM

Wave format & RIFF

Offset

0x0000 0x0004 0x0008 0x000C 0x0010 0x0014 0x0016 0x0018 0x001C 0x0020 0x0022 0x0024 0x0028 0x002C

Bytes Data

4 "RIFF" 4 size of waveform chunk (file size minus 8) 4 "WAVE" 4 "fmt " 4 size of format chunk (16 bytes) 2 wf.wFormatTag = WAVE_FORMAT_PCM = 1 2 wf.nChannels

4 wf.nSamplesPerSec

4 wf.nAvgBytesPerSec

2 wf.nBlockAlign

2 wf.wBitsPerSample

4 "data" 4 size of waveform data waveform data

Bit digging Waveopt

Files and Extensions

Name

Wave Binary CCL MELP CCS MELP MELP

Description Ext Usage

WAVE_FORMAT_PCM But with RIFF header For MELP input must be: nChannels:1, nSamplesPerSec: 8000, nAvgBytesPerSec:16000, nBlockAlign:2 Pure voice samples. File without RIFF header which has additional 48 bytes Channel Coded Long MELP is MELP file but depending on OS (4bytes for short) is 4 times longer. Bit rate = 4*3200 bit/s.

Channel Coded Short MELP file is real Channel Coded MELP file. Bit rate = 3200 bit/s.

Ccl Ccs Real MELP file with bit rate = 2400 bit/s. It is used only as a secondary output in additional Synthesis.

Wav Bin Mlp Original wave file which can be recorded and played on PC sound card. Check with

RiffWalk

utility:

RiffWalk.Exe -f2 -j *.wav

Input file for

Waveopt

program:

Waveopt.exe *.wav

I/O for ConsoleMelp(A/S)

ConsoleMelp –a –i *.bin –o*.ccl

ConsoleMelp –s –i *.ccl –o*.bin

Input for

CCRemover CCRemover.exe *.ccl

Output from

CCInserter

Input for

CCInserter CCInserter.exe *.ccs

Output from

CCRemover

Internal produced with

ConsoleMelp –s –i *.ccs –o *AS.ccs

See melp.c, melp_syn.c and melp_chn.c files!

melp_syn() and melp_chn_read() methods.

Waveopt utility

 C++ Console application  Waveform structure (RIFF)  Analysis  Synthesis  Stream I/O routines Wave file 16 bit, 8000 Hz, Mono *.wav

Binary file without RIFF chunks *AS.bin

Synthesis Analysis Waveopt.exe

Waveopt.exe *.wav

Binary file without RIFF chunks *.bin

Wave file 16 bit, 8000 Hz, Mono *AS.wav

What with binary file?

Non-real time TI MELP demo

      Link Texas Instruments (97KB) !

Self-Extracting MELP 1.2 Source Code Operating system – SunOS4 – MELP Read me My development  OSs – Win 95, Win 98SE, WinNT  Compilers & IDEs   Borland C++ for DOS – Char 8, Short & Integer 16, Long 32 Microsoft Visual C++ – Char 8, Short 16, Integer 32, Long 32 Hardware resources  Sound card – Creative Sound Blaster Audio PC128  Microphone, Processor (Pentium3 450 MHz), RAM (192 MBy) Console application – floating point –

ConsoleMelp

Input and output files

ConsoleMelp application

ConsoleMelp outputs

What I’ve got?

File which produces back playable Wave file after Analysis Synthesis and procedure  Synthesized file has great number of zeros (silence) and every 54 bit is frame bit (0x80)  Bit rate is 10 times least than original wave

What I want to get?

MELP file which bit rate is 2400 bit/s and can be used for Synthesis procedure to produce playable Wave file

See CCL file!

CCRemover & CCInserter

CCRemover utility

What I get with it?

 File which can be used after bit insertion (CCInserter) for Synthesis procedure to produce playable Wave file   Bit rate of generated file is 3200 bit/s which leads to conclusion that this is channel coded MELP algorithm!! More about channel coding for 1.6 Kb/s MELP Coder For Wireless Communications Channel coded MELP file *.ccl

(4 times larger integer dependent of compiler & OS)

CCRemover.exe

Channel coded MELP file 3200 bit/s *.ccs

See CCS file!

Channel Coded Short - CCS

CCInserter utility

Channel coded MELP file 3200 bit/s *.ccs

CCInserter.exe

Channel coded MELP file *AS.ccl

(4 times larger integer dependent of compiler & OS)

What I get with it?

 CCL file which is input file for ConsoleMelp application Synthesis  After RIFF header insertion produces playable Wave file (

Waveopt *.bin

)

Channel Coded Long - CCL

My MELP at 2.4 Kbps

     Little trick with digging on original source New (real 2.4 kbps MELP) file with *.mlp extension Inverse procedure – MELP is produced during the

additional synthesis

melp_chn_read() method - accessing MELP bit buffer Can’t be used for synthesis!

SYNTHESIS melp_syn() melp_chn_read() unpack_code() Channel coded MELP file 3200 bit/s *.ccs

ConsoleMelp.exe

ConsoleMelp.exe -s -i *.ccs -o *AS.ccs

melp_ch_read() MELP file 2400 bit/s *.mlp

Why I’m using Synthesis?

Subroutine UNPACK_CODE: Unpack bit code from channel.

Return 1 if erasure, otherwise 0.

( melp_chn.c Line 319 )

There is no file for writing pure MELP!

Additional code lines in melp_chn_read() method after all unpack_code() methods calls ( melp_chn.c Line 154 ).

Additional file created in main ( melp.c Line 82 ) and synthesis procedure file ( melp_syn.c

)

MELP flowchart

Wave file 16 bit, 8000 Hz, Mono *.wav

Waveopt.exe

Waveopt.exe *.wav

Binary file without RIFF chunks *.bin

Channel coded MELP file *.ccl

CCRemover.exe

Channel coded MELP file 3200 bit/s *.ccs

ConsoleMelp.exe

ConsoleMelp.exe -a -i *.bin -o *.ccl

CCInserter.exe

SYNTHESIS melp_syn() melp_chn_read() unpack_code()

ConsoleMelp.exe

ConsoleMelp.exe -s -i *.ccs -o *AS.ccs

melp_ch_read() Channel coded MELP file *AS.ccl

ConsoleMelp.exe

ConsoleMelp.exe -s -i *AS.ccl -o *AS.bin

MELP file 2400 bit/s *.mlp

Binary file without RIFF chunks *AS.bin

Waveopt.exe

Waveopt.exe *AS.bin

Wave file 16 bit, 8000 Hz, Mono *AS.wav

Run complete MELP?

MLP file for Synthesis

Wave file 16 bit, 8000 Hz, Mono *.wav

Waveopt.exe

Waveopt.exe *.wav

Binary file without RIFF chunks *.bin

ConsoleMelp.exe

ConsoleMelp.exe -a -i *.bin -o *.ccl

Channel coded MELP file *.ccl

SYNTHESIS melp_syn() melp_chn_read() unpack_code() melp_ch_read() ConsoleMelp.exe

ConsoleMelp.exe -s -i *.ccs -o *AS.ccs

Channel coded MELP file *AS.ccl

CCRemover.exe

Waveopt.exe

Waveopt.exe *AS.bin

ANALYSIS melp_ana() melp_chn_write() pack_code() Channel coded MELP file 3200 bit/s *.ccs

MELP file 2400 bit/s *.mlp

ConsoleMelp.exe

melp_ch_write() ConsoleMelp.exe

ConsoleMelp.exe -a -i *AS.ccs -o *.ccs

ConsoleMelp.exe -s -i *AS.ccl -o *AS.bin

Binary file without RIFF chunks *AS.bin

Wave file 16 bit, 8000 Hz, Mono *AS.wav

CCInserter.exe

Additional Synthesis

Useful Effort?

Real MELP – Processing

Wave file 16 bit, 8000 Hz, Mono *.wav

Waveopt.exe

Waveopt.exe *.wav

Binary file without RIFF chunks *.bin

ConsoleMelp.exe

ConsoleMelp.exe -a -i *.bin -o *.ccl

Channel coded MELP file *.ccl

CCRemover.exe

Channel coded MELP file 3200 bit/s *.ccs

Analysis + Synthesis

melp_ch_read() MELP file 2400 bit/s *.mlp

melp_ch_write() Channel coded MELP file 3200 bit/s *AS.ccs

ConsoleMelp.exe

ConsoleMelp.exe -s -i *AS.ccl -o *AS.bin

CCInserter.exe

Binary file without RIFF chunks *AS.bin

Waveopt.exe

Channel coded MELP file *AS.ccl

Waveopt.exe *AS.bin

Wave file 16 bit, 8000 Hz, Mono *AS.wav

2 Analyses & Syntheses

Batch – Console applications

 Four different console application integrated using DOS Batch files  Waveopt, ConsoleMelp, CCRemover and CCInserter  Console applications with input and output parameters – files 

ConsoleMelp –a –i dam9.bin –o dam9.ccl

 

Waveopt

syntax:  Waveopt.exe [*.bin | *.wav] Easy deleting, renaming, directory creating…(see notes!)

Windows – MelpPlayer

    Statistics – MOS, DAM, DRT measurement Database Connection – Access, MySQL Internet Connection – IP, Web based Visualization, Skins…  Opening WAV and MLP (CCS) files  Playing files  Recording and storing waves in MELP useful format  Recording CCS and MLP files  Size comparison Explorer utility

MelpCodec For…

Education

      Laboratory exercise – Voice Coding subject Gathering measurement results Symposium article (IEEE, SoftCOM, ELMAR, MiPRO) Experience for some other voice and no-voice LP algorithms Digital Signal Adaptive Processing - Subject My Postgraduate Work Theme

And

Let’s think farther!

Business

    Cooperation FESB University of Split and Siemens d.d Croatia and Siemens AG PSE PRO TCS RCD department Projects – Signal Processing, Communication, Software Development Links:  PSE Siemens d.d

 Siemens AG

Thanks for your attention!

Contact:

Zoran Sambol, Siemens d.d. Put Brodarice 6, 21000 Split Tel. +385 21 390 936

[email protected]

, [email protected]