If you have installed the latest Tcl/Tk versions, you can also use our Tcl/Tk-based UNIPEN interface software. The software uses a shared library version of the three libraries uplib, upsiglib and uphierarchy. For each level in a UNIPEN file, a menu can be popped up which lists all entries and allows selecting a SEGMENT:
When selecting an item, a 'video player' is started which depicts the selected segment:
Using the middle button, a popup menu comes up, via which 'actions' can be performed on the selected segment, such as 'resample'. The result of a spatially resampled segment is depicted in a window below the raw input signal:
An action for segments is to show their 'children' or 'parents'. These keywords are defined in the uphierarchy library. For example a UNIPEN segment 'CHAR' has a parent in the 'WORD' hierarchy. The next image shows a character and its position in the parent:
#!/usr/local/bin/wish load /usr/local/lib/unipen/tcl_uplib.so uplib # This is the actual trick! # Here Uplib routines are made # accessible to your Tcl/Tk script . . set hierlist [uplib_get_hierarchies "my-unipen-file.dat"] # Note: this is a call to # a C routine! puts stdout "$hierlist" . . .