Quickstart

The most common task is to load a database with audb.load().

Let’s first see which databases are available on our public Artifactory server.

import audb

audb.available(only_latest=True)
backend host repository version
name
air artifactory https://audeering.jfrog.io/artifactory data-public 1.4.2
cough-speech-sneeze artifactory https://audeering.jfrog.io/artifactory data-public 2.0.1
crema-d artifactory https://audeering.jfrog.io/artifactory data-public 1.3.0
emodb artifactory https://audeering.jfrog.io/artifactory data-public 1.4.1
micirp artifactory https://audeering.jfrog.io/artifactory data-public 1.0.0
musan artifactory https://audeering.jfrog.io/artifactory data-public 1.0.0
vadtoolkit artifactory https://audeering.jfrog.io/artifactory data-public 1.1.0

Let’s load version 1.4.1 of the emodb database.

db = audb.load("emodb", version="1.4.1", verbose=False)

This downloads the database header, all the media files, and tables with annotations to a caching folder on your machine. The database is then returned as an audformat.Database object.

Each database comes with a description, which is a good starting point to learn what the database is all about.

db.description
'Berlin Database of Emotional Speech. A German database of emotional utterances spoken by actors recorded as a part of the DFG funded research project SE462/3-1 in 1997 and 1999. Recordings took place in the anechoic chamber of the Technical University Berlin, department of Technical Acoustics. It contains about 500 utterances from ten different actors expressing basic six emotions and neutral.'

The annotations of a database are stored in tables represented by audformat.Table.

db.tables
emotion:
  type: filewise
  columns:
    emotion: {scheme_id: emotion, rater_id: gold}
    emotion.confidence: {scheme_id: confidence, rater_id: gold}
emotion.categories.test.gold_standard:
  type: filewise
  split_id: test
  columns:
    emotion: {scheme_id: emotion, rater_id: gold}
    emotion.confidence: {scheme_id: confidence, rater_id: gold}
emotion.categories.train.gold_standard:
  type: filewise
  split_id: train
  columns:
    emotion: {scheme_id: emotion, rater_id: gold}
    emotion.confidence: {scheme_id: confidence, rater_id: gold}
files:
  type: filewise
  columns:
    duration: {scheme_id: duration}
    speaker: {scheme_id: speaker}
    transcription: {scheme_id: transcription}

Each table contains columns (audformat.Column) that have corresponding schemes (audformat.Scheme) describing its content. For example, to get an idea about the emotion annotations stored in the emotion column, we can inspect the corresponding scheme.

db.schemes["emotion"]
description: Six basic emotions and neutral.
dtype: str
labels: [anger, boredom, disgust, fear, happiness, sadness, neutral]

Finally, we get the actual annotations as a pandas.DataFrame.

df = db["emotion"].get()  # get table
df[:3]  # show first three entries
emotion emotion.confidence
file
/home/runner/audb/emodb/1.4.1/d3b62a9b/wav/03a01Fa.wav happiness 0.90
/home/runner/audb/emodb/1.4.1/d3b62a9b/wav/03a01Nc.wav neutral 1.00
/home/runner/audb/emodb/1.4.1/d3b62a9b/wav/03a01Wa.wav anger 0.95