Skip to content

Commit e587071

Browse files
committed
Pypi 1.4.0 build
1 parent faaa6ab commit e587071

File tree

2 files changed

+24
-19
lines changed

2 files changed

+24
-19
lines changed

README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Python SDK for Yandex Speechkit API.
66

7-
For more information please visit [Yandex Speechkit API Docs](https://cloud.yandex.com/en/docs/speechkit/).
8-
This lib supports short and long audio recognition of
9-
speechkit
7+
For more information please visit [Yandex Speechkit API Docs](https://cloud.yandex.com/en/docs/speechkit/). This lib
8+
supports short and long audio recognition of speechkit
109

1110
# Getting Started
1211

13-
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`:
12+
Assuming that you have Python and `virtualenv` installed, set up your environment and install the required dependencies
13+
like this, or you can install the library using `pip`:
1414

1515
```bash
1616
$ git clone https://github.com/TikhonP/yandex-speechkit-lib-python.git
@@ -21,47 +21,52 @@ $ . venv/bin/activate
2121
$ python -m pip install -r requirements.txt
2222
$ python -m pip install .
2323
```
24+
2425
```bash
2526
python -m pip install speechkit
2627
```
2728

28-
## Using speechkit
29+
## Using speechkit
2930

30-
There are support of recognizing long and short audio and synthesis. For more information please read docs below.
31+
There are support of recognizing long and short audio and synthesis. For more information please read docs below.
3132

3233
#### For short audio
3334

3435
From a Python interpreter:
3536

3637
```python3
37-
>>> import speechkit
38-
>>> recognizeShortAudio = speechkit.RecognizeShortAudio('<yandex_passport_oauth_token>')
39-
>>> with open('/Users/tikhon/Desktop/out.wav', 'rb') as f:
40-
... data = f.read()
41-
...
42-
>>> recognizeShortAudio.recognize(data, folderId='<folder _id>', format='lpcm', sampleRateHertz='48000')
38+
import speechkit
39+
40+
recognizeShortAudio = speechkit.RecognizeShortAudio(str('<yandex_passport_oauth_token>'))
41+
with open('/Users/tikhon/Desktop/out.wav', 'rb') as f:
42+
data = f.read()
43+
44+
print(recognizeShortAudio.recognize(data, folderId='<folder _id>', format='lpcm', sampleRateHertz='48000'))
45+
4346
'Текст который нужно распознать'
4447
```
4548

4649
#### For synthesis
4750

4851
```python3
49-
>>> import speechkit
50-
>>> synthesizeAudio = speechkit.SynthesizeAudio('<yandex_passport_oauth_token>')
51-
>>> synthesizeAudio.synthesize('/Users/tikhon/Desktop/out.wav', text='Текст который нужно синтезировать', voice='oksana', format='lpcm', sampleRateHertz='16000', folderId='<folder _id>')
52+
import speechkit
53+
54+
synthesizeAudio = speechkit.SynthesizeAudio(str('<yandex_passport_oauth_token>'))
55+
synthesizeAudio.synthesize(str('/Users/tikhon/Desktop/out.wav'), text='Текст который нужно синтезировать',
56+
voice='oksana', format='lpcm', sampleRateHertz='16000', folderId='<folder _id>')
5257
```
5358

5459
#### For long audio
5560

56-
See [long_audio_recognition.py](examples/long_audio_recognition.py)
61+
See [long_audio_recognition.py](https://github.com/TikhonP/yandex-speechkit-lib-python/blob/master/examples/long_audio_recognition.py)
5762

5863
# Speechkit documentation
5964

60-
See [speechkit docs](DOCS.md) for more info.
65+
See [speechkit docs](https://github.com/TikhonP/yandex-speechkit-lib-python/blob/master/DOCS.md) for more info.
6166

6267
# Todo
6368

64-
-
69+
-
6570

6671
# License
6772

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = speechkit
33
version = 1.4.0
44
author = Tikhon Petrishchev
55
author_email = tikhon.petrishchev@gmail.com
6-
description = It's lib for using speechkit api by yandex.
6+
description = Python SDK for Yandex Speechkit API.
77
long_description = file: README.md
88
long_description_content_type = text/markdown
99
url = https://github.com/TikhonP/yandex-speechkit-lib-python

0 commit comments

Comments
 (0)