Annotation Pro enables easy and efficient extensions of the built-in functionality by means of plugins. In this section we will publish some of the plugins. Further below you can also find some help on how to create a plugin of your own, and a link to Annotation Pro API.
In order to use any of the Annotation Pro plugins it is sufficient to save the plugin to the ‘Plugins’ folder in the ‘Annotation Pro’ folder on your disk (the plugins below are zipped, so after saving them you also need to unzip them). Then the plugin’s name becomes visible in the Plugins menu in your Annotation Pro programme (you might need to press ‘Refresh’ in order to update the display of the menu list). The plugins can be used for a single annotation file or for a number of files selected in the programme’s workspace (choose “Workspace Mode” for using a plugin with multiple files selected in your workspace).
The plugins enlisted in the table below are displayed in your Annotation Pro “Plugins” menu. To load them and use with your data, go to the Plugins menu, open the Plugins Manager, click the plugin you desire to use, and then click Download. As a result, the plugin will be shown in the Plugins menu and you can apply it to your files. If you wish to edit a plugin, use the Plugin Manager again or open the plugin .CS file with any text editor on your disk.
|Edit – Clear labels for segments in a layer||Clears all annotation labels for segments in the selected layer. The layer name can be specified in the plugin code. By default the name “Layer1” is used. After running the plugin all segments in the layer will be empty.||Read more...
Edit - Clear labels for segments in a layer
The plugin clears all annotation labels for segments in the selected layer. You can change the target layer name according to your preference. To do this, simply change "Layer1" to your preferred layer name.
The plugin works for a single file or a file collection (for collection of files choose the files in your workspace collection and then select Workspace Mode in the Plugins menu)
After running the plugin all segments in the layer will be empty.
|Statistics – Annotation Pro + TGA||Calculates TGA values. Based on the TGA idea and on-line tool solution by Dafydd Gibbon. Update: enables file collections processing (Workspace Mode)||Read more...
Annotation Pro + TGA
Annotation Pro + TGA - a plugin based on the TGA idea and on-line tool solution by Dafydd Gibbon (see more: here). The functions used in the plugin were also integrated natively in Annotation Pro (Menu Statistics -> Time Group Analysis). The TGA plugin calculates the linear regression functions for duration patterns and also nPVI, based on the segmentation unit used in particular annotations (syllables, segments or other). The linear regression function yields local and overall values of slope, which expresses an approximation to tempo acceleration and deceleration, and intercept, together with relevant visualisations which may then be plotted using an R script embedded in Annotation Pro. The values are calculated using the segment's (e.g., syllable's) time-stamps as values for the X variable and syllable durations for the Y variable, and the results are stored and displayed in newly created annotation layers as the parameters of the relevant time group or syllable segments. Annotation Pro + TGA plugin (as well as the TGA functionality integrated natively) performs Time Group Analysis for the selected layer. In case of a need of processing a collection of files it might be useful to use a newer version of the plugin: Annotation Pro + TGA (Workspace). This plugin differs from Annotation Pro + TGA in two ways:
(1) it performs the TGA analysis for layers in the collection of files selected from Annotation Pro Workspace. The condition is that the source layers must be named the same and the name must be the same as defined in the plugin, the default name is SRC, in case if you want a different name, all you need is to change it in the plugin's code (you should rename it in the line: "string layerName = "SRC").
(2) it ignores labels defined by the user in the plugin (such as e.g., pause or noise labels); by default, three pause markers are defined: #, *, #$p; in order to add new or modify the existing markers it's sufficient to add/edit the respective lines in the plugin (e.g., pauses.Add("#"); ).
You can find more on TGA + Annotation Pro in these publications: Klessa, K. and Gibbon, D. (LREC 2014) or Yu, J., Gibbon, D., Klessa, K. (Proc. Speech Prosody 2014).
|Statistics – Segment Rate Moving Average (SRMA)||Calculates segment rate using moving average method||Read more...
Segment Rate Moving Average (SRMA)
Segment Rate Moving Average (SRMA) - makes it possible to calculate (1) COUNT - the number of segments within a moving frame (the segments that are only partly included in the frame range are treated as whole), (2) COUNT with fractions - the number of segments within a moving frame (the segments that are only partly included in the frame range are treated as fractions), (3) the ratio of the segments COUNT to the duration of the frame, (4) the ratio of the segments COUNT with fractions to the duration of the frame, (5) the ratio of the segments COUNT with fractions to the total duration of all segments within the frame. The input for this plugin is an annotation layer with segmentation on any desired level (it can be syllable-based or phone-based or any other level). By default the name of the input layer is "SRC" but you can change it to your desired name in the plugin's source code and then run the plugin without modifying your annotations. The results will be stored in the same annotation file in a newly created annotation layer, as parameters of a special "Frame" segment. Additionally, the values for Start and End of frames are stored in the annotation. The default frame width is 10 sec and overlap 33% but both can be adjusted as needed by the user. The annotations can be easily exported from Annotation Pro to a .CSV spreadsheet thus enabling further statistical analyses. A description of an application of the plugin to syllable-based annotations can be found in a paper by M. Karpiński, K. Klessa, A. Czoska (Proc. Speech Prosody, 2014) as well as in Klessa (2016). Speech Annotation Mining with Annotation Pro plugins, Wydawnictwo Rys, Poznań. ISBN 978-83-65483-20-1 (see also here for listings of other plugin implementations of the SRMA method).
|Statistics – nPVI moving average (nPVIMA)||Computes nPVI (Normalized Pairwise Variability Index)||Read more...
nPVI moving average (nPVIMA)
nPVI moving average (nPVIMA) - the plugin computes nPVI (Normalized Pairwise Variability Index, cf. e.g. Grabe & Low, 2002) using “moving time window” approach: the nPVI is calculated for each of the frames (time windows) moving by a fixed step (5 msec of frame width and 33% overlap by default but may be modified in the plugin's code). The results are stored in the annotation file as segments labels in a newly created annotation layer. In case of the segments partially contained in a given window, their total durations were used in the nPVI formula (for example results obtained with the use of the plugin see: M. Karpiński, K. Klessa, A. Czoska (Proc. Speech Prosody, 2014).
|Statistics – Segment Rate in a Layer||Calculates the segments rate within an annotation layer (in segments per second)||Read more...
Segment Rate in a Layer
Segment Rate - this plugin calculates the segments rate within an annotation layer (the number of segments per second calculated either as gross or net rate, i.e. including or excluding pauses). By default the rates are calculated for the layer named 'Syllables' but the layer name can easily be changed by the user in the plugin's source code (just change the layer name in the line: const string layerName = "Syllables"). The results are saved to a .CSV file named SegmentRate.csv in My Documents folder on your disk. The name of the output file can also be easily changed in the plugin script by changing the name in the line: private const string outFileName = "SegmentRate.csv";
|Statistics – Duration Quadrants||Calculates z-scored durations of consecutive segments within an annotation layer and plots results as proposed by Petra Wagner||Read more...
Visualizations of timing relations
A plugin based on the visualization method by Petra Wagner (see e.g. Wagner, 2007). The plugin calculates z-score durations of consecutive segments within an annotation layer. The results are saved as parameters of the respective syllable segments in a new layer. Additionally, a second layer is created which includes an R script for creating a scatter plot based on the parameters for an individual file. When the plugin is run for a file collection, all results can be exported to a common spreadsheet for further analyses. The plugin is ready-to-use (the layerName value may need to be adjusted).
See also an on-line implementation of the visualization method in TGA by Dafydd Gibbon.
|Feature space analysis – Assign labels to polygon areas||Assigns text labels to polygon areas in the picture used as the graphical representation of the feature space in perception-based annotation or tests||Read more...
Assign labels to polygon areas
A plugin useful for extracting results of perception-based annotation or perception tests carried out using the graphical representation of the feature space. Results of such tests are stored in the annotation layers in Annotation Pro as Cartesian coordinates of the points clicked by the annotator.
The plugin allows to assign text labels to any polygon areas in the picture. The downloadable plugin code includes example labels with coordinates which can be changed in the LoadPolygons function in the line (or lines, depending on the number of polygons).
|Export -Export selected layers to CSV||Exports selected layers (specified by ‘layerNames’) from one file or file collection (Workspace Mode) to a CSV file.||Download|
|Export – Export selected layers as TextGrids||Exports selected layers (specified by ‘layerNames’) to TextGrid (Praat) format.||Download|
|Edit – Remove pauses||Removes segments (specified by ‘pausePattern’) from one or more files (Workspace Mode)||Read more...
Removes segments with labels specified in ‘pausePattern’. Initially, the plugin was designed to automatically remove pause segments but it can be useful for deleting segments with any label from file collections.
Similar functionalities for individual files are available through 'find & replace' (CTRL F) or 'find all' and then DELETE, this plugin was created primarily to deal with file collections (Workspace Mode).
|Edit – Find & Replace||Replaces one string by another or removes a string from (a collection of) annotations. (Workspace Mode)||Read more...
Find & Replace
Replaces one string by another or removes a text or a character from (a collection of) annotations, ie. replace it by nothing.
You can define any number of rules for Find & Replace in "ReplacePattern" line(s). You can also define whether the Find & Replace operation is to be performed for all layers or just for the selected one(s) by providing the layers' name in "ignoreLayers" line(s). (Workspace Mode).
|Edit – Remove empty segments||Removes segments that do not include any label from (a collection of) annotations. (Workspace Mode)||Read more...
Remove Empty Segments
Removes segments that do not have any transcription labels. A plugin useful e.g., for annotation reorganization tasks or for cleaning data imported from external formats.
How to write my own plugin
In order to create a plugin you do not need any expensive tools. Plugins should be created in C# programming language. To edit a plugin it is sufficient to use a simplest notepad software or any other programme supporting edition of C# files; e.g., Visula Studio Code, Notepad 2 or Notepad++ software which offer options for displaying syntax in colours or line numbering. You can also download a freeware version of Visual Studio – Visual Studio Express that offers even more support for writing in C#. Visual Studio Website.
public class AnnotationPlugin : IAnnotationPlugin
public void Run( AnnotationEditor editor )
// BEGIN USER CODE
editor.Cursor = Cursors.WaitCursor;
MessageBox.Show("Hello World! I'm in 'Documents\\Annotation Pro\\Plugins' folder.","Annotation Pro Plugin");
editor.Cursor = Cursors.Default;
// END USER CODE
- Copy the file above and save it as: Examples#HelloWorld.cs
- Store it to the folder: Dokumenty\Annotation Pro\Plugins
- Run it in Annotation Pro here: Plugins -> Examples -> HelloWorld. If you cannot see plugin name in the menu, press: Plugins -> Refresh.
- Open file: Examples#HelloWorld.cs in Notepad or other editor and look at its content.
Also, a plugin editor window with some additional tips and support is available inside Annotation Pro. You can access the editor from the menu Plugins -> Open Plugins Manager -> Create New…
When the number of your plugins becomes too high and it is not comfortable to display them in one list you can group them in the Plugins . The character # in the name of your plugin indicates dividing the name of the group from the name of the specific plugin. The part of the name to the left from # is the group name. The group will be automatically created in the menu when you start the programme.
Annotation Pro API
Application Pramming Interface is a detailed description of classes and functions available for the creators of plugins. You can check the detail parameters of functions or methods of clasess.
More about plugins & other plugin scripts
More details about the API, Annotation Pro plugin architecture, example use cases, some programming guidelines, and sample plugin scripts can be found in: Klessa, K. (2016). Speech Annotation Mining with Annotation Pro plugins, Wydawnictwo Rys, Poznań. ISBN 978-83-65483-20-1 (download the plugin listings described in the book).
Sharing plugins & cooperation
In case if you wish to share your plugin by publishing it on this website, please contact Kasia Klessa at email@example.com, we will add your plugin description to the list, cite your reference(s), and publish a download link. In case if you have an idea for a new plugin but you are not sure how to create it – you are also welcome to get in touch at the same address, we’ll be happy to try and help!