Rev.ai makes speech applications easy to build!
Project description
# Rev.ai Python SDK
[![Build Status](https://img.shields.io/travis/revdotcom/revai-python-sdk.svg?branch=master)](https://travis-ci.org/revdotcom/revai-python-sdk)
## Documentation
See the [API docs](https://www.rev.ai/docs) for more information about the API and
more python examples.
## Installation
You don't need this source code unless you want to modify the package. If you just
want to use the package, just run:
pip install --upgrade rev_ai
Install from source with:
python setup.py install
### Requirements
- Python 2.7+ or Python 3.4+
## Usage
All you need to get started is your Access Token, which can be generated on
your [Settings Page](https://www.rev.ai/settings). Create a client with the
given Access Token:
```python
from rev_ai import apiclient
# create your client
client = apiclient.RevAiAPIClient("ACCESS TOKEN")
```
### Sending a file
Once you've set up your client with your Access Token sending a file is easy!
```python
# you can send a local file
job = client.send_job_local_file("FILE PATH")
# or send a link to the file you want transcribed
job = client.send_job_url("https://url-of-my-file")
```
`job` will contain all the information normally found in a successful response from our
[Submit Job](https://www.rev.ai/docs#operation/SubmitTranscriptionJob) endpoint.
If you want to get fancy, both send job methods take `metadata`, `callback_url`, and a boolean
`skip_diarization` as optional parameters, these are also described in the request body of
the [Submit Job](https://www.rev.ai/docs#operation/SubmitTranscriptionJob) endpoint.
### Checking your file's status
You can check the status of your transcription job using its `id`
```python
job_details = client.get_job_details(job.id)
```
`job_details` will contain all information normally found in a successful response from
our [Get Job](https://www.rev.ai/docs#operation/GetJobById) endpoint
### Getting your transcript
Once your file is transcribed, you can get your transcript in a few different forms:
```python
# as text
transcript_text = client.get_transcript_text(job.id)
# as json
transcript_json = client.get_transcript_json(job.id)
# or as a python object
transcript_object = client.get_transcript_object(job.id)
```
Both the json and object forms contain all the formation outlined in the response
of the [Get Transcript](https://www.rev.ai/docs#operation/GetTranscriptById) endpoint
when using the json response schema. While the text output is a string containing
just the text of your transcript
=======
History
=======
0.0.0 (2018-09-28)
------------------
* Initial alpha release
2.1.0
------------------
* Revamped official release
2.1.1
------------------
* File upload bug fixes
[![Build Status](https://img.shields.io/travis/revdotcom/revai-python-sdk.svg?branch=master)](https://travis-ci.org/revdotcom/revai-python-sdk)
## Documentation
See the [API docs](https://www.rev.ai/docs) for more information about the API and
more python examples.
## Installation
You don't need this source code unless you want to modify the package. If you just
want to use the package, just run:
pip install --upgrade rev_ai
Install from source with:
python setup.py install
### Requirements
- Python 2.7+ or Python 3.4+
## Usage
All you need to get started is your Access Token, which can be generated on
your [Settings Page](https://www.rev.ai/settings). Create a client with the
given Access Token:
```python
from rev_ai import apiclient
# create your client
client = apiclient.RevAiAPIClient("ACCESS TOKEN")
```
### Sending a file
Once you've set up your client with your Access Token sending a file is easy!
```python
# you can send a local file
job = client.send_job_local_file("FILE PATH")
# or send a link to the file you want transcribed
job = client.send_job_url("https://url-of-my-file")
```
`job` will contain all the information normally found in a successful response from our
[Submit Job](https://www.rev.ai/docs#operation/SubmitTranscriptionJob) endpoint.
If you want to get fancy, both send job methods take `metadata`, `callback_url`, and a boolean
`skip_diarization` as optional parameters, these are also described in the request body of
the [Submit Job](https://www.rev.ai/docs#operation/SubmitTranscriptionJob) endpoint.
### Checking your file's status
You can check the status of your transcription job using its `id`
```python
job_details = client.get_job_details(job.id)
```
`job_details` will contain all information normally found in a successful response from
our [Get Job](https://www.rev.ai/docs#operation/GetJobById) endpoint
### Getting your transcript
Once your file is transcribed, you can get your transcript in a few different forms:
```python
# as text
transcript_text = client.get_transcript_text(job.id)
# as json
transcript_json = client.get_transcript_json(job.id)
# or as a python object
transcript_object = client.get_transcript_object(job.id)
```
Both the json and object forms contain all the formation outlined in the response
of the [Get Transcript](https://www.rev.ai/docs#operation/GetTranscriptById) endpoint
when using the json response schema. While the text output is a string containing
just the text of your transcript
=======
History
=======
0.0.0 (2018-09-28)
------------------
* Initial alpha release
2.1.0
------------------
* Revamped official release
2.1.1
------------------
* File upload bug fixes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rev_ai-2.2.1.tar.gz
(10.4 kB
view hashes)
Built Distribution
Close
Hashes for rev_ai-2.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b03ec5c01108af5ff3e7ca66aae93756d955da8c386aca68dc61d0675aa33edf |
|
MD5 | fc04942515d9731a886db0b6d7c1e63b |
|
BLAKE2b-256 | 9366539d1d6978baebb3f76964ec749080c3a9319ae822ec150073609d4681b3 |