©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

Communicating with wavesurfer thru another program

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Jun 26, 2003 2:00 pm    Post subject: Communicating with wavesurfer thru another program Reply with quote

Hi guys,

lemme state my problem clearly....

I have about a thousand sound files and I need to remove the dc component in each of them. Since It is not feasible to manually do the task I need to know if there is a way to communicate with wavesurfer from another program.

I'm using windows 2000 and Visual C++ 6.0.
Is there a way that i can execute the "remove dc component" command from my program written in Visual C++ 6.0, thru perhaps external communication with wavesurfer.

If that is not possible, It would be really helpful if anybody could give me the filtering formula of dc removal so that i may use it in some other way....

Thanx,
Fahd
Back to top
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Fri Jun 27, 2003 4:19 pm    Post subject: Reply with quote

Easiest is probably to use the Snack toolkit (which WaveSurfer uses internally)

You can try this script in WaveSurfer's console (or in a Tcl/Tk console window),
replace sourcePath and destinationPath with appropriate directories. All wav files in the first will be filtered and saved in the second.

package require snack
snack::sound s
set f [snack::filter iir -numerator "0.99 -0.99" -denominator "1 -0.99"]
foreach file [glob sourcePath/*.wav] {
s read $file
s filter $f -continuedrain 0
s write destinationPath/[file tail [file rootname $file]].wav
}


/Kåre
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group