This pipline facilitates automatic processing of auditory data, especially the cloze data, where:
- responses are open ended
- responses are typically short (mostly a single word)
- latency of the production is valuable data
However, it could be used to process other kinds of data.
Roughly speaking, this pipleline
- takes webm files with responses from PCIbex
- transforms it into wav files (wav2webm)
- gets onset data from Chronset
- gets automatic transcription from Google Cloud Speech-to-Text API
- combines the information + context/probe info of the experiment and output them as Praat TextGrids
- facilitate human inspection by (CheckAndEdit)
Output:
- csv files mapping audio file names onto transcription and onset
- TextGrid files with automatic transcription + onset, which could be used for correction in Praat
- Get onset data from Chronset
- Get trasncription from Google Cloud Speech-to-Text API
Note: This pipeline is built for OSX. Might need some modification for Windows and LINUX.
- transcribe.ipynb: the main script for transcription
- webm2wav: transform webm files into wav files (using ffmpeg)
- stereo2monaural.ipynb: make stereo wav files into monaural files that can be handled by Google Cloud Speech to Text
- chronset_prep.ipynb: create Chronset-uploadable zip files
- keywords.ipynb: create and manage keyword lists for cloze data
- check_transcription.ipynb: post-hoc correction of automatic transcription before human inspection
- CheckAndEdit: Praat script that open the wav files and textgrid files with the same name
- analyze_textgrid.ipynb: create csv files from a set of textgrid files with onsets and transcriptions
- temp_note.TextGrid: A template of textgrid files used in transcribe.ipynb
- A directory containing webm files File names must end with: [item_condition][condition]_[participant_id] (e.g. exp_10a_tdlf.webm)
- Optional: Experimental item info in the form of python dictionary ({filenames:info})
The output audio files of PCIbex are usually separated by participants, but it is not straightforward to convert files in different folders. (It is tedious to convert the webm files into wav files for each of the 100 participants.) The "webm2wav" file recursively convert all the webm wiles below a certain directory at once.
- ffmpeg
- a bash script named "webm2wav"
Enter the following line into your command line.
bash location_of_webm2wav input_file_directory output_file_directory
- First argument: the path to "webm2wav" file
- Second argument: the path to the directory which contaions all the webm files
- Third argument: the path to the output directory
NOTE: All the wav files below the input directry will be generated directly in the output directory
This script generates NLP-powered transcriptions of audio files and ouput TextGrid files with transcriptions. See transcribe.ipynb for details.
This Praat script:
- open TextGrid and wav files with the same name and present them together
- saves edits on the TextGrid
Simply enter the path to the wav files and textgrids to the box, and then the corresponding files are opened at once.
Be careful that the script overwrites the TextGrid file once you click on "continue"