Skip to main content

REST API on top of PyAnnote

Project description

# PyAnnote REST API

## Installation

$ pip install pyannote.server

## Running the server

$ python -m pyannote.server.run

## Using the API

### Parsers

* `/parser/` returns list of supported file formats

$ curl -X GET http://localhost:5000/parser/
["mdtm", "uem"]

* `/parser/<format>` parses `POST`ed file and returns its content in PyAnnote JSON format.


### Evaluation metrics

* `/metric/` returns list of available evaluation metrics

$ curl -X GET http://localhost:5000/metric/
["detection", "diarization", "identification"]


* `/metric/<name>` compares `POST`ed reference and hypothesis annotations in JSON format and returns the corresponding evaluation metric.

**Input format (JSON)**

{
"reference": [
...
],
"hypothesis": [
...
]
}

**Output format (JSON)**

{
METRIC: {
METRIC: value,
COMPONENT_1: value_1,
COMPONENT_2: value_2,
... # components are values from
... # which the final value is computed
},
... # one call to /parser/<metric> may
... # return more than one sub-metrics
}


### Error analysis

* `/error/diff` compares `POST`ed reference and hypothesis and returns their differences.

**Input format (JSON)**

# same format as for metric/<name>
{
"reference": [
...
],
"hypothesis": [
...
]
}


* `/error/regression` compares `POST`ed reference with two hypotheses and returns regressions and/or improvements brought by the second one (`after`) over the first one (`before`).

**Input format (JSON)**

{
"reference": [
...
],
"before": [
...
],
"after": [
...
]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyannote.server-0.7.tar.gz (10.1 kB view details)

Uploaded Source

File details

Details for the file pyannote.server-0.7.tar.gz.

File metadata

  • Download URL: pyannote.server-0.7.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyannote.server-0.7.tar.gz
Algorithm Hash digest
SHA256 024e2e4b0ccaf09b17339a783286404bb370e97ef86beb12e3cb39f19c3bebab
MD5 c872276ed5127f0ba36ef521067895a3
BLAKE2b-256 e35081ba0ce0a3e597a281895c96f914cabe26fbe408b6914cfc3b4c35ce7793

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page