1 / 47

“Speech Compression”

“Speech Compression”. Texas Instruments University Programme Teaching Materials. Speech Compression. Introduction. Speech compression is widely used in digital communications: A-Law in Europe μ-Law in North America and Japan

mindy
Download Presentation

“Speech Compression”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. “Speech Compression” Texas Instruments University Programme Teaching Materials

  2. Speech Compression

  3. Introduction • Speech compression is widely used in digital communications: • A-Law in Europe • μ-Law in North America and Japan • Compression increases the coding efficiency by reducing the number of bits in the transmitted signal.

  4. Objectives • To introduce A-Law and μ-Law audio compression. • To introduce companding. • To run the TMS320C5505 USB stick with and without audio compression.

  5. Audio Compression

  6. Diagram of Audio Compression Input Audio Compression Algorithm Output

  7. Uses of Compression • Compression can be used to: • Increase the amount of data that can be sent across a communication channel for a given bandwidth. • Increase the amount of data that can be stored on a device such as a CD ROM or in RAM.

  8. Types of Compression • There are two types of compression widely used for speech transmission: • A-Law in Europe • μ-Law in North America and Japan • A-Law uses 13 bits • μ-Law uses 14 bits.

  9. A-Law

  10. Equation for A-Law • The equation for A-Law compression is:

  11. Graph of A-Law • 13-bit input on x axis. 8-bit output on y axis.

  12. A-Law Table • A-Law can be implemented using a table:

  13. A-Law Floating-point Format • The 13-bit linear input is converted into a 8-bit floating-point value:

  14. A-Law Floating-point

  15. Effect of A-Law Compression

  16. Why Does Compression Work? • Human hearing is logarithmic. • Sound recorded at high levels does not require the same resolution as low-level sound.

  17. A-Law Resolution • Resolution varies with input magnitude:

  18. A-Law Expansion

  19. Equation for A-Law Expansion

  20. Diagram of Audio Expansion Input Audio Expansion Algorithm Output

  21. A-Law Expansion

  22. A-Law Table Expansion Error • Because an 8-bit value is expanded to 16-bits, there is some loss of information. • This means that the expanded output may not be the same as the original input.

  23. μ-Law

  24. Equation for μ-Law Compression • The equation for μ-Law compression is:

  25. Graph of μ-Law • 14-bit input on x axis. 8-bit output on y axis.

  26. μ-Law Table • μ-Law can be implemented using a table:

  27. Equation for μ-Law Expansion • The equation for μ-Law expansion is:

  28. Companding

  29. The Compander • Some Texas Instruments CODECs contain a compander • Compander = Compressor Expander • This allows the A-Law and μ-Law conversions to be performed in silicon using the McBSP interface • Note that the CODEC on the TMS320C5505 USB Stick does not contain a compander.

  30. Compressor and Expander

  31. Compression and Expansion

  32. C Code Implementation

  33. C Code Implementation of A-Law • Open source code is available from Sun Microsystems: • G711.c • G711.h • This has been used in this application.

  34. Packing Compressed Values

  35. Unpacking Compressed Values

  36. Assembly Language Implementation • The TMS320C55xx instruction set has two instructions used for floating-point maths that can be used for A-Law and μ-Law operations: • exp • norm • The instruction exp is used to calculate the exponent • The instruction norm is used to format the mantissa.

  37. Introduction to Laboratory

  38. Microphone Setup TMS320C5505 USB Stick USB to PC Microphone Headphones

  39. Installing the Application • Copy the code provided in Application 13 Speech Compression to the workspace • Follow the steps previously given in Chapter 1 to set up the new project.

  40. Create New CCS Project

  41. Files Used in Project

  42. About the Program • Sampling rate 8000 Hz for microphone • Performs record and delayed playback • Longer delays possible with compression, but some loss of quality.

  43. Experiments

  44. Remove Buffer Clear • Comment out the line buffer_clear() to no longer clear the buffer each time the LED flashes.

  45. Output Filter • Add your own FIR output filter (as per Application 6) to reduce the noise caused by the output error • Use one of the filter design tools to produce a low pass 3400 Hz filter based on 8000 Hz sampling rate.

  46. Questions • Why is audio compression used? • What are the differences between A-Law and μ-Law?

  47. References • Digital Signal Processing, A Practical Approach by Emmanuel C. Ifeachor and Barrie W. Jervis. ISBN 0201-59619-9 • A-Law and mu-Law Companding Implementations using the TMS320C54x. SPRA163 • Wikipedia. A-Law and G.711 • www.hazelware.luggle.com/tutorials/mulawcompression.html

More Related