tinok / audio_length

A small script to get the length of audio files based on a CSV from KoboToolbox by checking each file via the Kobo API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This script pulls all audio files for a specific question in a specific KoboToolbox project, checks the length of each file, and stores the result in a CSV file.

  1. Download or clone the Python file on your computer
  2. Download the data from the KoboToolbox project as a CSV in the same directory using XML/names. Only include the most important columns to make it easy to read, but it must include the audio question (with the URL checkbox ticked in export settings) since that will be used to pull the actual audio files. The uuid column is always included by default.
  3. Set the API key for your account that contains the project
  4. Set the CSV file name
  5. Set the name of the audio file URL column (e.g. "experience_joint_decision_URL")
  6. Run the Python script with python get_audio_length.py or python3 get_audio_length.py, depending on your setup.
  7. It will iterate over all audio files, downloading them and writing the length to the CSV file (as well as download status for each one). This may take a while depending on the number of files. If you don't see an error this means it's working. You will also see the CSV updating as long as the script keeps running.

About

A small script to get the length of audio files based on a CSV from KoboToolbox by checking each file via the Kobo API


Languages

Language:Python 100.0%