Git Product home page Git Product logo

android-tts-stt's Introduction

Text to Speech & Speech to Text

##One line solution for android Text to speech and text to Speech conversion for Android.

Project demonstarting how to :-

  • Convert Text to speech ins Android
  • Convert Speech to text without Prompting dialog
  • Handling errror and Updating UI
  • Sharing text content over social media
  • Voice search using Speech to text

Usage

Translator used factory pattern to create translators and does job in one line

Speech to Text :- One line solution

            TranslatorFactory.getInstance().getTranslator(TranslatorFactory.TRANSLATOR_TYPE.SPEECH_TO_TEXT, HomeActivity.this)
                                          .initialize("Hello There", HomeActivity.this);

Text to Speech :- One line solution

             TranslatorFactory.getInstance().getTranslator(TranslatorFactory.TRANSLATOR_TYPE.TEXT_TO_SPEECH, HomeActivity.this)
                                             .initialize((null != message && !message ? message : "Invalid Input"), HomeActivity.this);

Error Handling :- make your view/Activity implement ConversionCallaback

public class HomeActivity extends AppCompatActivity implements ConversionCallaback {

override this callabacks

@Override
public void onSuccess(String result) {
    Toast.makeText(this, "Result " + result, Toast.LENGTH_SHORT).show();
}

@Override
public void onCompletion() {
    Toast.makeText(this, "Done ", Toast.LENGTH_SHORT).show();

}

@Override
public void onErrorOccured(String errorMessage) {
   Toast.makeText(this, "Error " + errorMessage, Toast.LENGTH_SHORT).show();
}

##Screenshots of Demo screen

For demo import and app in Android Studio

**Text to speech **

Alt text

**Speech to Text **

Alt text

**Process converted output eg. Share converted text on social media

Alt text

**Real time error Handling

Alt text

##Use in your project

Simply drop translation_engine package in your project and start using one liners.

Copyright 2015 Hitesh Kumar Sahu

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

android-tts-stt's People

Contributors

hiteshsahu avatar

Watchers

James Cloos avatar Noah Butler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.