Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7572795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:00:58+00:00 2026-05-30T16:00:58+00:00

I have one requirement in which User will have options to select languages for

  • 0

I have one requirement in which User will have options to select languages for e.g English and French.

App will have set of activities and one background service so when app starts,at that time service will start and TTS engine will get initialize with default language as English in service(onInit() method). I have to set the language which will be set by the user when that particular activity starts.

So how to configure the selected language locale in TTS engine at runtime?

My observation is when service starts at that time only TTS engine get intialize with the default language inside onInit() method and at instance activity is not available so we will not have any configured language details so we can’t do that but actual problem what I am facing is second time onwards how to change the locale of TTS engine(When user selects language from the activity) because we can’t use mTts.setLanguage(Locale.FRENCH) outside of onInit() method as if you call this also it will not reflect changes in TTS.

So please help me out to resolve this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:01:00+00:00Added an answer on May 30, 2026 at 4:01 pm

    I found this blog post on the Android developer blog:

    http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html

    They state:

    Loading a language is as simple as calling for instance:

    mTts.setLanguage(Locale.US);

    to load and set the language to English, as spoken in the country "US".

    I am not experienced in programming TTS applications in Java but it seems to me that you can prompt your users for their preferred language before you construct or initialize your TTS engine. Using that prompt you should be able to pass a value to your onInit() method that will dictate which language pack you are using.

    Is there any reason why you can not reinitialize your TTS engine to the new language when users change languages?

    I hope this answer is helpful. Best of luck on your project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement on my current project (a Flex app which will be
I am developing native iPhone app. I have one requirement that, there are 5
I have a requirement like follows, in this there will be list of user
I have a requirement in my app which requires me to display some message
I have one requirement in C. char abc[]=hello; char hello[]=world; Using abc whether we
I have one requirement that i have to place the log file in the
I have one portal with 3 modules inside it, now my requirement is i
i have one database, and it contains some columns. My requirement is that how
I have the requirement of generating UML Diagrams for one of my C++ assignments.
I have the requirement of generating UML Diagrams for one of my C++ assignments.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.