B4A Library ICOSTextToSpeech

ICOSTextToSpeech v1.90.

the zip include:

1 - Demo.
2 - Library.
3 - license.


ICOSTextToSpeech
Author:
Giuseppe Salvi
Version: 1.9
  • ICOSTextToSpeech
    Events:
    • Ready (Success As Boolean)
    Methods:
    • ChangeDefaultLanguage (title As String, title1 As String)
      Programmatically change the default language of your phone with that choice yourself.
    • InitializeTTs (EventName As String, lang As String)
      Initialize the object
    • IsSpeaking As Boolean
      Return true if tts is Speaking
    • LanguageSettings
      Go into the language settings.
    • Pause
      Pauses playback.
    • ReadAndSpeakSMS (title As String, title1 As String, title2 As String, title3 As String, title4 As String)
      Read And Speak SMS
    • Resume
      resumes playback.
    • SetLanguageToSpeak (title As String, title1 As String)
      Sets the text-to-speech language.
    • ShutDown
      Release the Engine
    • ShutUp
      Reinitialize the Object
    • Start
      Starts playback from the beginning.
    • Stop
      Stops playback.
    • WriteAndSpeakText (title As String, title1 As String, title2 As String, title3 As String, title4 As String)
      Write and speak some text.
    Properties:
    • DefaultEngine As String [read only]
      Gets the package name of the default speech synthesis engine.
    • EngineByPackageName As String [write only]
      This method was deprecated in API level 14. This doesn't inform callers when the TTS engine has been initialized.
      can be used with the appropriate engine name.
      Also, there is no guarantee that the engine specified will be loaded.
      If it isn't installed or disabled, the user / system wide defaults will apply.
    • PitchToSpeak As Float [write only]
      Sets the speech pitch for the TextToSpeech engine.
    • RateToSpeak As Float [write only]
      Sets the speech rate.
    • Speaks As String [write only]
      Synthesizes the given text to a file using the specified parameters.
    • Version As String [read only]
      Author and Version of the library
 

Attachments

  • ICOSTextToSpeech.zip
    62.8 KB · Views: 524
  • ICOSTextToSpeech v1.80.zip
    77.7 KB · Views: 319
  • ICOSTextToSpeech v1.90.zip
    78.1 KB · Views: 533
Last edited:

RadCoder

Member
Licensed User
Longtime User
thanks but

in the dox it says copyright v1.3. What is the copyright on this lib?
 

rbsoft

Active Member
Licensed User
Longtime User
I just tried you TextToSpeech library. Ecellent.
Thank your very much for it.

Rolf
 

lonleystar

Well-Known Member
Licensed User
Longtime User
1. Is it maybe possible to add a "pause speaking" and "resume speaking" feature to your nice ICOS TTS library?
2. Ditto, to add an event that reports back which word (or sentence) currently is being spoken?
Thank you very much.

Hi, sorry if answer to late, yes I'll do it. Tanks to U.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hello Lonelystar
I appreciate very much that you intend to add the requested features to ICOS TTS. I do hope you will succeed!
Do you have any idea when it will be ready?
Hi Rick, I testing it till tomorrow I'll upload. Give me just this evening to test.

Tanks in advance.
 

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi guys, the ICOSTextToSpeech is update to v1.80 what's new:

the zip include:

1 - Demo.
2 - Library.
3 - license.

***********************New********************************

Start - Starts playback from the beginning.

Stop - Stops playback to be again heard it from the beginning with Start.

Pause - Pause playback.

Resume - Resume playback exactly from where playback has been stopped.

ShoutDown - Release the Engine. - updated.

ShoutUp - Reinitialize the Engine.

*********************Changed******************************

Speaks instead of Speaking - Synthesizes the text to a file and play it.

EngineByPackageName intead of SetEngineByPackageName.

DefaultEngine instead of GetEngineByPackageName.

ChangeDefaultLanguage

WriteAndSpeakText

ReadAndSpeakSMS

SetLanguageToSpeak

they have changed to:

tts.Speaks = "Hi this is a text message"

tts.ChangeDefaultLanguage("Change Default Phone Language","Exit")

tts.WriteAndSpeakText("A Simple Write and Speak","Speak","Clear","Stop","Exit")

tts.ReadAndSpeakSMS("A Simple Sms Reader and Speak","Read All Sms","Update Sms","Stop Speaking","Exit")

tts.SetLanguageToSpeak("Language Selector","Exit")


I hope that this new version, it's to your liking.
 

lonleystar

Well-Known Member
Licensed User
Longtime User


Hi Rick, there is no way to pause and resume whit the TTs engine but the new TTs is based on MediaPlayer it Synthesizes the text to a file and play it. that's why take a moment to speak.


P.S.
With the old library if U use PlaySilence between the words U get pause but there is no way to resume.

Let me know.
 

lonleystar

Well-Known Member
Licensed User
Longtime User


Hi Rick, the audio file is wav and is stored in the sdcard.

P.S.

As I say in the post above there is no way to pause or resume with the original TTs.
Anyway I'll implements again the old functions in the new library and also the event TTs-ready.


In wich city U living,
I lived a year in Ijmuiden, and I worked at Corus ex Hoogovens. I love that city and the locals have made me feel like I was at my house.
 
Last edited:

lonleystar

Well-Known Member
Licensed User
Longtime User
Hi Rick, yes I'll add it.
 

AlpVir

Well-Known Member
Licensed User
Longtime User

lonleystar

Well-Known Member
Licensed User
Longtime User



Hi Rich, Sonday I fix my computer I had problems with the computer reseller.

Anyway I'm back and I'll fix all plugins.

Sorry for the inconvenience.
 

lonleystar

Well-Known Member
Licensed User
Longtime User


Hi Harris, sorry for my absence. Let me give a look for this solution sound nice your idea.

P.S.
Remember if you don't see any update.
 

lonleystar

Well-Known Member
Licensed User
Longtime User


Hi my work takes me long time away with shifts anyway I will.
 

SMOOTSARA

Active Member
Licensed User
Longtime User
HI lonleystar
thank you
This is the most complete library, but it just has a problem
The new version of Android requires read and write messages and a memory card
Is it possible to remove this access?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…