SpeechKit package
Project description
Getting started
Installation
pip install yandex-speechkit
Setting up credentials
from speechkit import configure_credentials, creds
configure_credentials(
yandex_credentials=creds.YandexCredentials(
api_key='...'
)
)
Using speech-to-text model
from speechkit import model_repository
from speechkit.stt import AudioProcessingType
model = model_repository.recognition_model()
model.audio_processing_type = AudioProcessingType.Full
model.language = 'en-US'
result = model.transcribe_file('path/to/audio')
for c, res in enumerate(result):
print(f'channel: {c}\nraw_text: {res.raw_text}\nnorm_text: {res.normalized_text}\n')
Using text-to-speech model
from speechkit import model_repository
model = model_repository.synthesis_model()
model.voice = 'john'
result = model.synthesize('Hello, world!', raw_format=False)
result.export('path/to/audio', format='wav')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
yandex_speechkit-1.1-py3-none-any.whl
(105.8 kB
view hashes)
Close
Hashes for yandex_speechkit-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcb4dcc3a7fb1c6612058371cee049965f866bdf237d76a7bd518d9193c3ac98 |
|
MD5 | a64283d8a04e210e09e8862ac973204f |
|
BLAKE2b-256 | 17c9d723043313a57d2e19c70ca9b1311f723d3d0140e946e3b962e59bff6b51 |