rttm2elan: convert .rttm to .eaf (ELAN)

Description Usage Arguments Details Value

View source: R/rttm2elan.R

Description

A very crude translator from rttm files to ELAN format

Usage

1
rttm2elan(rttmfile, audiofile, targetloc = NULL)

Arguments

rttmfile

path to SAD file

audiofile

path to audio file

targetloc

path to targt location, NULL by default, see details

Details

the output file is named as the audio file, except for the file extension and a prefix out_, e.g. if the audio file is 34_Ab.wav then the output from this function will be out_34_Ab.eaf. By default the location for writing this new file is the same as the audio file. If the audio file is not found, or the folder in which it supposedly resides does not exist, the output will be written to location of the rttm file. You can also specify a folder to where you want to write the output in the targetloc= argument.

Also note that you need to specify an audio file, even if it does not exist (or is not available on your machine at this time). There are two reasons for this: first it is needed for establishing the output file name. Second, the ELAN file needs the location of the audio. When opening the .eaf file created with this function in ELAN and if the audio file does not exist in the location provided, ELAN will ask you to locate it.

In terms of tiers: the function will always contain an empty 'default' tier. Any additional annotations will go in different tiers, depending on the kind of rttm file that was supplied.

Further, the function assumes that the first column in the rttm file corresponds to the tier and the 8th column contains the content for the annotation.

Value

writes a file and returns the path to this file


gobbios/avutils documentation built on Feb. 19, 2020, 9:44 a.m.