* * *

Author Topic: LAMW - Text to speech  (Read 516 times)

freris

  • New member
  • *
  • Posts: 29
  • A Retired hobbist programmer from Greece
LAMW - Text to speech
« on: October 12, 2017, 02:58:35 pm »
Hi jmpessoa !

Yesterday  i tried the jtexttospeech component. And i have a question.

How hard is to add the ability to add custom language ?  E.g. Greek ?

Thank you so much
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 956
Re: LAMW - Text to speech
« Reply #1 on: October 14, 2017, 05:08:57 am »
« Last Edit: October 14, 2017, 05:31:10 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

freris

  • New member
  • *
  • Posts: 29
  • A Retired hobbist programmer from Greece
Re: LAMW - Text to speech
« Reply #2 on: October 14, 2017, 07:20:35 pm »
Hi jmpessoa !

Yes a solution such https://stackoverflow.com/questions/33118121/android-tts-for-multiple-languages is the best because with a parameter as "SpeechLanguage = Greek" or whatever will be ok. I mean that if had an ability for custom languages, will be best solution.

Yes i know the " jTextToSpeech1.SpeechLanguage:= slDefault "  it is ok but depends of selected phone language.

I prefer to force selected language for my app, because some users had selected other language for their phone and prefer to have the  language selection option inside application.

If its not very hard to add this piece of code in the future, i think that will be very useful for all.

Thank you !
As I get older, the more I learn !!

jmpessoa

  • Hero Member
  • *****
  • Posts: 956
Re: LAMW - Text to speech
« Reply #3 on: October 14, 2017, 11:23:14 pm »


Ok.

Quote
If its not very hard to add this piece of code in the future, i think that will be very useful for all.

Yes, as soon as there is support for more languages in Android Sdk, I will do....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Jr. Member
  • **
  • Posts: 68
Re: LAMW - Text to speech
« Reply #4 on: October 16, 2017, 03:23:06 pm »
Text to Speech component works great! 
This could be really useful for me in a future project. :)

jmpessoa

  • Hero Member
  • *****
  • Posts: 956
Re: LAMW - Text to speech
« Reply #5 on: Today at 05:08:26 am »
Done!

Added new support to google online Text to speech ....

Code: Pascal  [Select]
  1.       jTextToSpeech1.SpeakOnline('Bom dia Pessoal!', 'pt');   // pt = portuguese
  2.  
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

CC

  • New member
  • *
  • Posts: 49
Re: LAMW - Text to speech
« Reply #6 on: Today at 10:02:00 pm »
Nice! 

Is there a way to save the result to a sound file for offline usage.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus