©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

inconstistency in transcription.plug path handling

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



Joined: 14 Nov 2003
Posts: 1
Location: Belgium

PostPosted: Fri Nov 14, 2003 5:21 pm    Post subject: inconstistency in transcription.plug path handling Reply with quote

suppose I have 2 files:

MY_DATA/PHN/my_file.lab
MY_DATA/WAV/my_file.wav

If I set $v(labdir) as "PHN", .lab file is correctly loaded if I run:

wavesurfer MY_DATA/WAV/my_file.wav

but it *doesn't* if I go in the directory MY_DATA/WAV and run:

wavesurfer my_file.wav

In that case I would have to use set $v(labdir) as "../PHN" in order to make it work as expected.

We can't have any warranty on the relative position of those Label and Wav directories. Here is the small modification (and logic simplification) I propose in transcription.plug

Code:
if {$v(labdir) != ""} {
   # Try the following directories in order
   # 1. try to locate file in specified label file directory
   # 2. try 'sound file path'/../'specified dir'
   # 3. look in current directory
   # 4. look in same directory as sound file

  if {[file readable [file join $v(labdir) $name]]} {
    set fileName [file join $v(labdir) $name]
   } elseif {[file readable [eval file join $pathlist $v(labdir) $name]]} {
    set fileName [eval file join $pathlist $v(labdir) $name]
   }
  }


Keep the good work !

Vincent Pagel
Back to top
View users profile Send private message Visit posters website
kare



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

PostPosted: Mon Nov 17, 2003 4:09 pm    Post subject: Reply with quote

Thanks for the fix!

I have to admit that I choose another solution using "file normalize", hope it's ok though.
Check out todays release to see if it works as it should.

Thanks!

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