©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

Sending audio to stdout?

 
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 Mar 25, 2004 4:57 pm    Post subject: Sending audio to stdout? Reply with quote

Is there a way to send audio to stdout? I'm planning on streamming the data. Any ideas?

V/R,

Jhernandez
Back to top
kare



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

PostPosted: Fri Mar 26, 2004 11:41 am    Post subject: Reply with quote

I'm assuming you want WaveSurfer to "play" the sound data to stdout instead of the sound device?
You can try this. Open the WaveSurfer console (File | Show console) and type

set w [wsurf::GetCurrent]
set s [$w cget -sound]
fconfigure stdout -translation binary -encoding binary
puts -nonewline [$s data -fileformat raw]

This will give garbage print out in the console! The only problem is that the console has captured stdout. Try the following instead. Use the source dist. Edit wsurf1.6/plugins/analysis.plug
Add the following lines to proc analysis::play

set s [$w cget -sound]
fconfigure stdout -translation binary -encoding binary
puts -nonewline [$s data -fileformat raw]

Now when you press play in WaveSurfer you'll get the sound data in raw binary format on stdout. The next step is to create your own plug-in which does only this, simply copy the proc from analysis.plug and the required registration code, you'll get the hang of it. Check out the Tcl/Tk and Snack manuals for more info on the actual commands used above.

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