AcapelaSpeech

javadoc

 

AcapelaSpeech is a service that makes it possible to translate from text to speech. It supports many voices and langages. 

The voices that fits best for your language can be found here:AcapelaGroup

You can also use voice emoticons, i.e. sounds like laugh or coff. What smileys are available can be found here: Vocal smileys

You can test the differerent voices by selecting one in the dropdown list of the AcapelaSpeech service in the WebGui and enter a text that you want.

The AcapelaSpeech service needs an Internet connection to work. It creates a sound file for each sentence that you use. It will be saved in a cashe.caches. The first time you use a sentence it may take some time for the response, but the second time will be faster because the sound is already available on your computer.

Examples:


#file : service/AcapelaSpeech.py edit raw
#########################################
# AcapelaSpeech.py
# description: speech
# categories: speech
# more info @: http://myrobotlab.org/service/AcapelaSpeech
#########################################

# Example of how to use the Acapela Speech service
acapelaSpeech = Runtime.start("speech", "AcapelaSpeech")
acapelaSpeech.speak("Hello world")
voices = acapelaSpeech.getVoices()
str = "we have {0} voices".format(voices.size())
print(str)
acapelaSpeech.speak(str)

voiceIndex = 0
for voice in voices:
    acapelaSpeech.setVoice(voice)
    print(voice)
    acapelaSpeech.speak("Hello world. I'm " + voice)
    voiceIndex = voiceIndex + 1
    if (voiceIndex > 3):
        break;

Mats's picture

Creating service pages

Hi

I started creating a Service page for the AcapelaSpeech service. I obviously have some more learning to do :-) 

The page was created with the content I made. Not complete at all but it's a start. But the page was saved as content ( I guess ) and not as a service page. Where can I change that, so that the page above becomes a service page ?

/Mats

GroG's picture

Nice start .. I can tell you

Nice start ..
I can tell you chose the correct template which is great...

Usually we make pictures 600 px wide for a standard (I re-adjusted your webgui screen shot)

Now I remember adding the 'default' worky script is a manual add - but all you have to do is double brackets [ [/service/{scriptName}.py ] ].  

 

To give it the "Service" URL,  go to URL Path Settings -> unclick auto-alias and type the correct url - then save.

Mats's picture

URL path settings

Hi GroG

Thanks for showing, but I cant' find the URL Path settings.

/Mats 

GroG's picture

When you edit the service

When you edit the service page - search (CTRL-F) for "URL path settings"

Mats's picture

URL path settings

Hi GroG

Thanks. I tried but don't find anything when  I search for url. So I think it has to do with some access setting on my account.

/Mats