Skip to main content

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

If you're not sure about the file name format, learn more about wheel file names.

yandex_speechkit-1.1-py3-none-any.whl (105.8 kB view details)

Uploaded Python 3

File details

Details for the file yandex_speechkit-1.1-py3-none-any.whl.

File metadata

  • Download URL: yandex_speechkit-1.1-py3-none-any.whl
  • Upload date:
  • Size: 105.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for yandex_speechkit-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb4dcc3a7fb1c6612058371cee049965f866bdf237d76a7bd518d9193c3ac98
MD5 a64283d8a04e210e09e8862ac973204f
BLAKE2b-256 17c9d723043313a57d2e19c70ca9b1311f723d3d0140e946e3b962e59bff6b51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page