Is there any changes after writing audio in MatLab?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I'm UCSY student in Myanmar. Now, I research about Progressive Audio Scrambling based on DWT Domain. My program process is..
Scrambling Process: 1. Read Audio 2. Decompose wavelet coefficients by using DWT 3. Scramble with audio coefficients and key 4. Reconstruct scrambled audio coefficients 5. Write Audio
Descrambling Process: 1.Read scrambled audio 2. Decompose scrambled audio 3. Descramble with audio coefficients & keys 4. Reconstruct descrambled audio 5. Audio write
The problem is I can't get back original audio while descrambling after writing scrambled audio (saved audio). But, I can get back original quality if I didn't write scrambled audio. Even I used same key in descrambling process. Now, I have no idea what's the solution for it :(
Please someone give me suggestion for the above problem.
0 comentarios
Respuestas (1)
Jan
el 10 de Sept. de 2018
In other words:
S1 = Scrambling('demo.wav', 3, 5, 'dbl');
D1 = Descrambling(S1, 3, 5, 'dbl');
file = fullfile(tempdir, 'test.wav');
audiowrite(file, S1, 44100);
S2 = audioread(file);
D2 = Descrambling(S2, 3, 5, 'dbl');
Now you find out, that D1 does not equal D2, correct? So what are the differences? "I can't get back original audio" does not clarify this uniquely.
Nevertheless, a difference of D1 and D2 seems to be caused by a difference of S1 and S2. Remember that audiowrite limits the output of e.g. doubles to the range [-1.0, 1.0]. So maybe you want this instead:
audiowrite(file, uint8(S1), 44100);
But this is a pure guess only.
The expression "5. Write Audio" at scrambling and and "1.Read scrambled audio" at descrambling does not match to your code, where Scrambling replies the signal and does not write a file.
0 comentarios
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!