Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.speechpro.android:stcspeechkit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.speechpro.android:stcspeechkit

Use the STC SpeechKit library to integrate speech recognition, text-to-speech and diarization.

  • 0.8.4
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

stc-speechkit-android

Use the STC SpeechKit library to integrate speech recognition, text-to-speech and diarization.

System Requirements

  1. Minimum required Android platform version: 4.1 (API Level 16)
  2. Internet Connection

Before you get started

  1. Review the Documentation for the library API
  2. Register on the website and get credentials

Integration

Download the project and compile from the sources or use Gradle:

Add the dependency to your project's top-level build.gradle:

    allprojects {
        repositories {
            google()
            jcenter()
            maven {
                url 'https://oss.sonatype.org/content/repositories/snapshots'
            }
        }
    }

Then add the plugin to your app-level build.gradle:

    dependencies {
        ...   
        implementation 'com.speechpro.android:stcspeechkit:0.8.4'
    }
    

How to use STC SpeechKit

Initialization STCSpeechKit
STCSpeechKit.init(activity!!.applicationContext, login, password, domainId.toInt())
Enabling logging
STCSpeechKit.setLogging(true)
WebSocketRecognizer
webSocketRecognizer = WebSocketRecognizer.Builder(this)
        .build()
               
webSocketRecognizer.startRecording()
webSocketRecognizer.stopRecording() 
    
override fun onRecognizerTextMessage(result: String) {
    //intermediate result
}
    
override fun onRecognizerTextResult(result: String) {
    //final result
}  
RestApiRecognizer
restApiRecognizer = RestApiRecognizer.Builder(this)
        .build()
                  
restApiRecognizer.startRecording()
restApiRecognizer.stopRecording() 
       
override fun onRecognizerTextMessage(result: String) {
   //intermediate result
}
    
override fun onRecognizerTextResult(result: String) {
   //final result
}  
WebSocketSynthesizer
webSocketSynthesizer = WebSocketSynthesizer.Builder(this)
            .language(Language.Russian)
            .speaker("Alexander")
            .build()
            
webSocketSynthesizer.synthesize("Тестовый синтез")
           
override fun onSynthesizerResult(byteArray: ByteArray) {
    //PCM
}
RestApiSynthesizer
restApiSynthesizer = RestApiSynthesizer.Builder(this)
            .language(Language.Russian)
            .speaker("Alexander")
            .build()
            
restApiSynthesizer.synthesize("Тестовый синтез")
           
override fun onSynthesizerResult(byteArray: ByteArray) {
    //WAV
}
    
RestApiDiarization
diarization = RestApiDiarization.Builder(this)
        .build()
        
diarization.startRecording()
diarization.stopRecording() 
            
override fun onDiarizationResult(result: Data) {
    //result
}

License

Copyright (c) 2019 STC. Licensed under the FreeBSD License.

FAQs

Package last updated on 23 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc