Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 9th, 2013, 10:30 AM
Guitarman2010 Guitarman2010 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 25 Guitarman2010 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 26 m 15 sec
Reputation Power: 0
Different Language Speech on Python for Android

Hello community, I'm new to this site and to Python in general so please forgive my ignorance. I use Python on Android devices therefore I'm always importing the android module to take advantage of some of the OS's features. I know how to use the ttsSpeak to output English text as English speech but what I want to do make it so when I input English text it will output the speech to a language of the user's choice. The only way I could do that now is manually go into the TTS settings on the Android device and change the output language.

There must be some command that will do this. I've been searching somewhat and not finding the answer. Thanks so much for reading this!

Reply With Quote
  #2  
Old February 9th, 2013, 10:38 AM
Dietrich's Avatar
Dietrich Dietrich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 483 Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 22 h 51 m 26 sec
Reputation Power: 63
Sounds interesting, can you show us a little of your code?
__________________
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25

Reply With Quote
  #3  
Old February 9th, 2013, 11:09 AM
Guitarman2010 Guitarman2010 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 25 Guitarman2010 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 26 m 15 sec
Reputation Power: 0
Well it'd be along these lines:
*************************************
Import android
Droid = android.Android()

O = Droid.dialogGetResponse('Enter what you want Ms. Droid to say').result

Def talk():
Droid.ttsSpeak(O)

Talk()
******************************************

Very simple to have the Droid speak whatever you input in English text. If I could figure out the command for having it output to a different language I would incorporate a menu for language selection

Reply With Quote
  #4  
Old February 10th, 2013, 08:46 AM
Dietrich's Avatar
Dietrich Dietrich is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 483 Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level)Dietrich User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 22 h 51 m 26 sec
Reputation Power: 63
Thanks Guitarman!
I assume you are using the code on your smartphone.
How did you get Python installed on it?

Reply With Quote
  #5  
Old February 10th, 2013, 06:45 PM
Guitarman2010 Guitarman2010 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 25 Guitarman2010 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 26 m 15 sec
Reputation Power: 0
Quote:
Originally Posted by Dietrich
Thanks Guitarman! I assume you are using the code on your smartphone. How did you get Python installed on it?


There is an app called SL4A that will run scripting languages and then an app called Python for Android found on the Google Play store for the actual language. The one I'm running is based on 2.6......and its on my tablet which I use more than an actual PC (not that it matters as Android is Android). There are ways to toggle WiFi, control screen brightness, BT, GPS ......pretty much many of the system settings can be toggled/controlled from a script.

Reply With Quote
  #6  
Old February 16th, 2013, 03:05 PM
Guitarman2010 Guitarman2010 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 25 Guitarman2010 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 26 m 15 sec
Reputation Power: 0
Maybe I would have correct results if I used a website to do this?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Different Language Speech on Python for Android

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap