Category: Scripts & Codes

  • Linguistic Interview Transcriber for Turkish

    In linguistic and sociolinguistic research, transcribing recorded interviews can be a time-consuming part of the research process, particularly when recordings involve multiple speakers. Linguistic Interview Transcriber for Turkish is an open-source tool designed to automate the transcription of Turkish linguistic interviews using automatic speech recognition and speaker diarization.

    The tool uses “WhisperX” with the “large-v3-turbo” model to produce time-aligned transcripts and automatically distinguish between speakers in the recording. The model was selected primarily for its faster inference, making the tool more practical for processing longer interview recordings.

    My aim is to provide researchers with a simple and reusable transcription workflow that can be applied to Turkish interview recordings without requiring manual transcription from scratch.

    What the tool does:

    • Transcribes Turkish speech automatically
    • Provides time-aligned transcription
    • Performs speaker diarization to separate different speakers
    • Supports interviews with multiple speakers
    • Produces transcripts in several common formats, including TXT, JSON, SRT, VTT, and TSV
    • Preserves Turkish characters and timestamps
    • Uses for “large-v3-turbo” faster transcription
    • Can be used as a starting point for linguistic and sociolinguistic annotation

    For interviews involving three or four speakers, speaker diarization can be particularly useful for keeping speakers’ contributions separated. If the expected number of speakers is known, specifying it is recommended. However, diarization performance can vary depending on recording quality, microphone configuration, overlapping speech, background noise, and similarities between speakers’ voices. Speaker labels should therefore be checked before being used for linguistic analysis.

    Usage:

    1. Install the required dependencies
    2. Provide the path to the interview recording
    3. Run the transcription script
    4. Check the generated transcript and speaker labels
    5. Use the output as a starting point for further linguistic analysis or annotation

    GitHub Repository:

    https://github.com/bostanberkay/linguistic-interview-transcriber-for-turkish

    The tool is intended to be reusable by researchers working with Turkish linguistic and sociolinguistic interview data. I personally used this code for my own TUBITAK Project for transcription.

    You can always contact me for further issues, suggestions, or improvements!!

  • Vowel Harmony Online Accuracy Task for PCIbex

    This experiment was developed as part of a broader study examining how vowel harmony mismatches in Turkish affect cognitive processing, particularly within different morphological domains (derivational vs. inflectional). This experiment constitutes the online accuracy task aimed at assessing participants’ explicit sensitivity to vowel harmony congruency.

    Procedure

    • Trials were presented one at a time on the screen using PCIbex (farm.pcibex.net).
    • Participants were instructed to press 1 for harmonic (i.e., acceptable) pseudowords, and 0 for disharmonic(i.e., unacceptable) ones.
    • Both accuracy (1 or 0) and reaction times were recorded for each item.
    • Items were randomized within three blocks (Part1, Part2, Part3) to control for order effects.
    • Transitions between blocks included reminders and optional short breaks.

    Participants began with an ethics agreement form, followed by instructions and a prompt for entering their ID. The experiment concluded with a debrief screen thanking them for their participation and saving their responses to the server.

    This task complemented a pupillometry experiment conducted offline using auditory stimuli, which captured surprisal effects.

    Notes

    • The contents of chunckincludes/ include dummy pseudowords for demonstration purposes only. The real stimuli used in the study are not included in this repository for ethical and confidentiality reasons.
    • The actual code used to run the study is located in dataincludes/mainexperiment.js.
    • No participant data is included.
    • This repository is shared for transparency and academic reproducibility only.

    GitHub Repository(Link to download script): https://github.com/bostanberkay/turkish-vowel-harmony-online-accuracy-task

    You can contact me for further issues.

  • Praat Script for Adding Silence to both Beginning and Ending of Audio Files

    In experimental phonetics and psycholinguistics, it is often necessary to prepare audio stimuli that contain consistent silence at the beginning and end of each file. This script was written in Praat to automate that process by adding fixed-length silence to .wav files in batch.

    The goal is to standardize audio onset and offset timing, ensuring that all stimuli begin and end with identical silence durations. This helps minimize variability in reaction time experiments and ensures more reliable acoustic presentation across trials.

    What the script does:

    • Adds a specified amount of silence (e.g., 250 milliseconds) to both the beginning and end of each sound file
    • Processes all files in the selected folder automatically
    • Saves the modified files in a separate folder for clarity
    • Logs progress in the Praat console

    Usage:

    1. Open Praat
    2. Load the script
    3. Set the silence duration and select the input folder
    4. Run the script

    GitHub Repository(Link to download script):

    https://github.com/bostanberkay/add_silence_beg_and_end_praat_script

    You can contact me for further issues, have fun with the script!