# Scripting Tryton Tutorial Video

**URL:** <https://discuss.tryton.org/t/scripting-tryton-tutorial-video/406>\
**Category:** Feature\
**Created:** [September 12, 2017, 9:19pm UTC](https://discuss.tryton.org/t/scripting-tryton-tutorial-video/406 "2017-09-12T21:19:19Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![htgoebel](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/htgoebel/32/1256_2.png) [@htgoebel](https://discuss.tryton.org/u/htgoebel)\
**Post date:** [September 17, 2022, 11:34am UTC](https://discuss.tryton.org/t/scripting-tryton-tutorial-video/406/12 "2022-09-17T11:34:25Z")

</div>

I did some recherche and testing on this topic. I also discovered a new project „ldtp“.

- **dogtail**

- **ldtp2**

- **xdotool**

- **testcafe**

* * *

_ **text-to-speech options** _

- **say.js** mentioned in the original post
  - written in Javascript, to be used with testcafe — at least this is the idea
  - For Linux: uses the „Festival“ speech engine, does not support exporting the files (thus no caching)  
**Festival seems to support English only** — which is deal-breaker IMHO
  - For Windows: uses the Windows SAPI.SpVoice API
  - For Mac: Uses the Mac tool `say`

For **Python** , there is no package like says.js AFAIK. Anyhow, this can be implemented using a TTS package and some play-back module, eventually caching the synthesized speech. (And indeed I already implemented this)

- **TTS** — offline  
Uses language models by Coqui. Examples for English sound very good, same for the few tests I made for German. HUGE, since all offline.
- **pyttx/pyttx3** — offline  
Uses the operating-system’s mechanisms to generate speech (Windows: sapi5, Mac: nsss - NSSpeechSynthesizer, other: espeak — espeak is lousy AFAIK). Allows setting rate, voice, volume.
- **gTTS** — online  
Used the Google text-to-speech API. Seems to have only one voice per language. (German voice is a bit slow. Both German and English sound a bit tinny.) I also tested other German voices [Supported voices and languages &nbsp;|&nbsp; Cloud Text-to-Speech API &nbsp;|&nbsp; Google Cloud](https://cloud.google.com/text-to-speech/docs/voices), all somewhat tinny.
- **google-tts** — online  
Another package for Google TTS. Seems to allow setting rate, voice, output-encoding, etc.
- **ttw-wrapper** — online or offline depending on used engine/service  
Wrapper for several TTS engines: AWS Polly, Google, Microsoft, IBM Watson, PicoTTS, SAPI
- **tts-watson** — online  
API for accessing the IBM Watson TTS. Requires an API key, so I did not try it. (Registration and service seems to be free of charge)
- **nemo-tts** — NVIDIA Neural Modules, package seems a bit outdated

Unsorted findings:

- RHvoice project — seems to focus on eastern European languages
- sanskrit-tts — python module
- baidu-tts — python module
- liepa-ttts — python module, Lithuanian language synthesizer from LIEPA project
- PyPI list a lot more modules I did not investigate

Links:

- IBM Watson service: [IBM Cloud Docs](https://cloud.ibm.com/docs/text-to-speech)
- AWS Polly: [Amazon Polly](https://docs.aws.amazon.com/polly/latest/dg/)
- Google: [Text-to-Speech documentation &nbsp;|&nbsp; Cloud Text-to-Speech API &nbsp;|&nbsp; Google Cloud](https://cloud.google.com/text-to-speech/docs/)
- Microsoft Cortana: [Text to speech API reference (REST) - Speech service - Azure AI services | Microsoft Learn](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/rest-text-to-speech) (old link)

And for play-back:

- **playsound** — Python  
could be used to play the exported sound files.

---

_[View the full topic](https://discuss.tryton.org/t/scripting-tryton-tutorial-video/406)._
