Audio compression using DCT - but i get same size of files after inverse DCT

4 ビュー (過去 30 日間)
Mohamad
Mohamad 2018 年 5 月 4 日
コメント済み: Abid Ali 2020 年 4 月 30 日
Hi I have a file ( 1.wav) - I'm trying to compress the first two seconds for this audio by using Discrete cosine transform . I attached the code , but when i use the command ( whos ) for the original samples and reconstructed samples after inverse DCT i get the same size and number of bytes So any explanation , and how i get the compression ratio ?

採用された回答

Walter Roberson
Walter Roberson 2018 年 5 月 4 日
編集済み: Walter Roberson 2018 年 5 月 4 日
That is expected. You are writing out the re-expanded data as samples. There will be the same number of samples as before, so it is going to take the same output size (probably.)
See also my recent discussion at https://www.mathworks.com/matlabcentral/answers/398289-how-can-i-do-audio-compression-using-huffman-encoding#comment_563731 . For DCT you would not need to write out a dictionary, but you would not write out the coefficients you had zeroed out. You would, however, need to write out the original number of coefficients so when you read the values in, you knew how many zeros to pad with before reconstruction.
  28 件のコメント
Mohamad
Mohamad 2018 年 5 月 10 日
Thanks a lot It is running ok
Abid Ali
Abid Ali 2020 年 4 月 30 日
How to read back comp binary file to decode it

サインインしてコメントする。

その他の回答 (1 件)

Abid Ali
Abid Ali 2020 年 4 月 30 日
How to read back the comp binary file, please Help me!!
Thanks

カテゴリ

Help Center および File ExchangeSource Coding についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by