Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Is it possible to save audio sample values from alteration while using wavwrite function?

2 vues (au cours des 30 derniers jours)
manisha sharma
manisha sharma le 22 Avr 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hello, I am manipulating values of audio samples for audio steganography.When i have my manipulated audio sample object, i want to write it as a new audio file using wavwrite. But when i create object of this newly created audio file, i find sample values different from the previous values of samples which i had manipulated.
Is there any method to control wavwrite function in order to keep my sample values as same as these were before wavwrite?
My original audio object is:
>> y=wavread('C:\Users\HIM\Desktop\audio stegno\strings.wav');
>> y(1:7)
ans =
1.0e-003 *
0
0
-0.2136
0.0916
0.3052
0.3052
0.2136
New audio object created:
>> y2=y;
>> y2(1:7)=0.0005;
>> y2(1:7)
ans =
1.0e-003 *
0.5000
0.5000
0.5000
0.5000
0.5000
0.5000
0.5000
>> wavwrite(y2,44100,'k.wav') >> s=wavread('k.wav'); >> s(1:7)
ans =
1.0e-003 *
0.4883
0.4883
0.4883
0.4883
0.4883
0.4883
0.4883
Values of samples changed in object 's'.
I want that values of samples in 's' should remain same like in 'y2'.

Réponses (1)

Walter Roberson
Walter Roberson le 15 Jan 2016

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by