Skip to content

Speech recognition and text-to-speech synthesis from Yandex SpeechKit

Notifications You must be signed in to change notification settings

z1coast/jspeech-yandex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

● jspeech-yandex ●

Speech recognition and text-to-speech synthesis

Dependencies

<dependency>
   <groupId>com.google.code.gson</groupId>
   <artifactId>gson</artifactId>
   <version>2.8.9</version>
</dependency>

Usage example

Setting the language and voice for the client. By default, there are ENGLISH settings.

YandexSpeechClient client = new YandexSpeechClient("<Your API KEY>"); 

client.getRecognition().setLanguage(YandexServiceLanguage.RUSSIAN);
client.getSynthesis().setVoice(YandexServiceVoice.RUSSIAN_ALENA_GOOD);

Recognize speech:

File yourFile = new File("test.ogg"); // file format required by Yandex
String textResponse = client.recognition(yourFile);

Text-to-speech synthesis:

File yourFile = new File("test.mp3"); // Yandex will return the file in MP3 format
File fileResponse = client.synthesis("Привет мир!", yourFile); 

Contact me

VK: Link

About

Speech recognition and text-to-speech synthesis from Yandex SpeechKit

Topics

Resources

Stars

Watchers

Forks

Languages