changed 5 years ago
Linked with GitHub

Annotate recorded audio at recording Pi - 0

tags: Docs Project: Radio

Context

After recording the audio using the recording pi built using pi-0, the audio is saved in a directory pointing to a webserver.

Problems

  1. Recorded files have only default device metadata, and no way to identify the audio files
  2. The filename is a preset pattern
  3. Unable to find / search for a specific file
  4. organising file needs user to access file system, as pi - 0 is headless

Features

Basic

  1. Edit filename
  2. Add workflow tags, ex: to be added
  3. save the metadata as .json file with filename and the path same as audio file
  4. fetch audio will also need to trigger fetch metadata

Optional

To be added

Implementation

Each audio recording will be associated with a related metadata file in .json format with the filename same as the audio filename.
Where each audio filename is a preset pattern @recorded+hash of datetime

The metadata file contains the json object from below. The Server will setup few fields as default, and other fields can be edited in the browser.

Main fields editable in browser are mentioned in the features.

Data Structure

Refer to schema.org Thing > CreativeWork > Clip > RadioClip A short TV or radio program or a segment/part of a program.

{
    "@context": "http://schema.org/",
    "@type": "RadioClip",
    // alias for filename at name prop
    "name": "Renamed filename",    
    // person or device id
    "accountablePerson": "", 
    // path to file
    "audio": "",
    // if enabled for workflow needs
    "comment": "",
    "commentCount": "",
    "dateCreated": "",
    "dateModified": "",
    "datePublished": "",
    "editor": "",
    "funder": "",
    "genre": "",
    "inLanguage": "",
    // comma seperated tags
    "keywords": "", 
    "license": "",
    // Spatial coverage
    "locationCreated": "",
    // The service provider
    "provider": "",
    // The Event where recorded
    "recordedAt": "", 
    // review by studio
    "review": "",  
    // duration
    "timeRequired": "",
    // bind with device or a fixed for pi - 0
    "version": "", 
    // original filename
    "sameAs": "", 
}

API

To be added

GET: 
    url: host/audio-filename
    response: audio-filename.json
PUT:
    url: host/audio-filename
    data:
    response:

Notes and questions

  1. What are the existing configuration of the server
  2. Inheriting metadata from the server config, howto?
  3. The server needs to create the file for every audio as browser won't have access to file system
  4. So, at what point will the server create the file - MAYBE on recording ended or MAYBE at the time of GET request if the file not found, create a file.
Select a repo