User Tools

Site Tools


yandex_speechkit

This is an old revision of the document!


Yandex SpeechKit

Создание платежного аккаунта

Установка и инициализация yandex cli

$ curl https://storage.yandexcloud.net/yandexcloud-yc/install.sh | bash

Инициализация yandex cli

  • !!! Выполняется для учетной записи, а не для процесса

В первый раз

$ $HOME/yandex-cloud/bin/yc init
Welcome! This command will take you through the configuration process.
Please go to https://oauth.yandex.ru/authorize?response_type=token&client_id=1a6990aa636648e9b2ef855fa7bec2fb in order to obtain OAuth token.

Please enter OAuth token: A.......................................k
...
Please choose folder to use:
 [1] default (id = b1gmpublpjhm23dm8nfk)
...

После "Выйти на всех устройствах"

$ yc config set token A.....................................k

$ yc config list

Проверка распознавания речи

$ export IAM_TOKEN=`yc iam create-token`

$ export FOLDER_ID=b1gmpublpjhm23dm8nfk

$ curl -s -X POST \
     -H "Authorization: Bearer ${IAM_TOKEN}" \
     --data-binary "@speech.ogg" \
     "https://stt.api.cloud.yandex.net/speech/v1/stt:recognize?folderId=${FOLDER_ID}" | jq '.result' | tr -d '"'
yandex_speechkit.1574245682.txt.gz · Last modified: 2019/11/20 13:28 by val