Skip to content

Commit 21a48f4

Browse files
committed
add server api doc
1 parent c18a014 commit 21a48f4

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

docs/source/server_api/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
====================
2+
TimeSide server API
3+
====================
4+
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
Introduction <introduction>
10+
11+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Introduction
2+
=============
3+
4+
In addition to be usable as a library, TimeSide has furthermore been built into a Django server with a relational PostgreSQL database in order to store music tracks and processing results. Data structure and relations are defined in the models to ensure easy data serialization. The backend is built with Django REST Framework to provide a documented RESTful API. It guarantees interoperability by allowing other servers or multiple frontends to interact with the TimeSide instance. Any application consuming the API is then able to:
5+
6+
- upload audio track or retrieve them from remote providers
7+
- stream original or transcoded sources
8+
- run on-demand analysis with customized parameters
9+
- deliver and share several types of results: transcoded audio, numerical or graphical outputs of analysis,
10+
- collect tags and indices on tracks to build annotated audio corpora for further machine learning purpose.
11+
12+
Models and Serializers
13+
-----------------------
14+
15+
The models of the backend are defined as usual Django models and are all stored with a UUID. Here is a list of the main ones:
16+
17+
- Item: a resource with a source file or URL
18+
- Selection: a list of Items
19+
- Processor: a versioned TimeSide Processor
20+
- Preset: a Processor with some parameters in the JSON format
21+
- Experience: a list of Presets
22+
- Task: a list of Selection linked to an Experience to run
23+
24+
This modelization allows to define some specific precessing \textit{Experiences} that can be re-processed on any new \textit{Selection} which is espacially convenient for analysis on growing datasets. All model instances and related data are accesible through a REST API with authentication. This ensures that a client can consume TimeSide as a dedicated and autonomous web service.
25+
26+
The API full documentation is there: https://timeside.ircam.fr/timeside/api/docs/
27+
28+
29+
Results and Formats
30+
--------------------
31+
32+
All processing results are accesible in a \verb|AnalyzerResult| python object containing a structured and documented data dictionary which can be serialized, stored and restored in HDF5, JSON, YAML or XML formats. The file contains all the preset parameters and data structure so that, if a process is requested for the same media file, same processors type and same version, the data will be automatically retrieve from the databasen and eventualluy re-processed in another child processor or serializer. The TimeSide server also embeds a full relational database to store any lighter data that has be be linked to models.

0 commit comments

Comments
 (0)