Commit bd5f0ac7 authored by Чевтаев Илья Алексеевич's avatar Чевтаев Илья Алексеевич
Browse files

Merge branch 'ilusha-patch-stt' into 'develop'

feat: add test stt

See merge request !2
Showing with 24 additions and 0 deletions
+24 -0
stt/main.py 0 → 100644
from speechkit import model_repository, configure_credentials, creds
from speechkit.stt import AudioProcessingType
from dotenv import dotenv_values
config = dotenv_values()
key = config['speechkit_stt']
configure_credentials(
yandex_credentials=creds.YandexCredentials(
api_key=key
)
)
model = model_repository.recognition_model()
model.model = 'general'
model.language = 'ru-RU'
model.audio_processing_type = AudioProcessingType.Full
result = model.transcribe_file('stt/test.ogg')
for c, res in enumerate(result):
print(f'channel: {c}\n'
f'raw_text: {res.raw_text}\n'
f'norm_text: {res.normalized_text}\n')
stt/test.ogg 0 → 100644
File added
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment