Skip to content

PatzEdi/dadascribe-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python wrapper for the DaDaScribe API

The official DaDaScribe API wrapper in Python.

DaDaScribe Logo

CLI Interface

The wrapper offers a CLI interface.

To start a job, for example:

$ dadascribe --source "link/to/youtube/or/path/to/file"
{
  "status": "ok",
  "id": "a7wuTaPrebOqheE0",
  "count": 1
}

Check a job status:

$ dadascribe --status a7wuTaPrebOqheE0

Easily download results of a completed job:

$ dadadascribe --download a7wuTaPrebOqheE0

Python API

The wrapper offers a Python API.

from dadascribe import ScribeAPIWrapper
api_key = ... # e.g. from an environment variable, as str
w = ScribeAPIWrapper(api_key)

# Example transcription:
trsc_result = w.transcribe(
    source="youtube/link/or/path/to/file",
    source_language="en",
    destination_language="es,it",
)

Development

pip3 install -e .

Make sure to run the tests as well via the run_tests.sh script:

chmod +x run_tests.sh
./run_tests.sh