It's lib for using speechkit api by yandex.
Project description
Yandex Speechkit Python SDK
Python SDK for Yandex Speechkit API.
For more information please visit Yandex Speechkit API Docs. This lib supports short and long audio recognition of speechkit
Getting Started
Assuming that you have Python and virtualenv
installed, set up your environment and install the required dependencies
like this, or you can install the library using pip
:
$ git clone https://github.com/TikhonP/yandex-speechkit-lib-python.git
$ cd yandex-speechkit-lib-python
$ virtualenv venv
...
$ . venv/bin/activate
$ python -m pip install -r requirements.txt
$ python -m pip install .
python -m pip install speechkit
Using speechkit
There are support of recognizing long and short audio and synthesis. For more information please read docs below.
For short audio
From a Python interpreter:
import speechkit
recognizeShortAudio = speechkit.RecognizeShortAudio(str('<yandex_passport_oauth_token>'))
with open('/Users/tikhon/Desktop/out.wav', 'rb') as f:
data = f.read()
print(recognizeShortAudio.recognize(data, folderId='<folder _id>', format='lpcm', sampleRateHertz='48000'))
'Текст который нужно распознать'
For synthesis
import speechkit
synthesizeAudio = speechkit.SynthesizeAudio(str('<yandex_passport_oauth_token>'))
synthesizeAudio.synthesize(str('/Users/tikhon/Desktop/out.wav'), text='Текст который нужно синтезировать',
voice='oksana', format='lpcm', sampleRateHertz='16000', folderId='<folder _id>')
For long audio
Speechkit documentation
See speechkit docs for more info.
Todo
License
Copyright 2021 Tikhon Petrishchev
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
speechkit-1.4.0.tar.gz
(13.2 kB
view hashes)
Built Distribution
speechkit-1.4.0-py3-none-any.whl
(12.4 kB
view hashes)
Close
Hashes for speechkit-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd1f55966b6937c4fcfdba159f5fe66c7bafb4a65352946e0ec20e975969213 |
|
MD5 | 0b5097957d43c4f78d051c944354f72e |
|
BLAKE2b-256 | 5f969dfd0e1fdea92326ada3b3594a183b210074a72a71d10a2883b4f5ea427a |