Do we have a text to speech feature?

I’ve just tried Google Docs Accessibilities and it wont work:

The pdf link shows they used pyttsx for text to speech. On the TX2, you’d likely want to use a bluetooth speaker setup since the other options (i2s, etc.) don’t seem to work as well as bluetooth.

As alternatives to pyttsx, I might try one of these:

Does that help? What does Google Docs Accessibilities have to do with the PDF paper?

Thank you for your response.
Google Docs accessibilities shouldn’t have the capping in 5,000 symbols which does com which I am currently using has. By now I copy txt from pdf and paste it to the “translate” by google and that result in more or less fine audio.
Basically I am doing a coursework and should read a book about 800 of pages which I have on pdf.

The document I am approaching is
I tried okular but its reading is so noisy.
By now the better quality seems to be achieved with translate y Google , but to split text to 5,000 fragments seems not to be very handy.

Do you have any idea on how to tie the section with reading of text.txt file option:

say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "$*&tl=en"; }
say $*
chmod u+x
./ Look Dave, I can see you're really upset about this.

found something

# Speech Script by Dan Fountain #
#     #
echo "---------------------------"
echo "Speech Script by Dan Fountain"
echo ""
echo "---------------------------"
for key in "${!ary[@]}" 
    #echo "word:$key, ${ary[$key]}"
    #echo "adding to: $STRINGNUM"
    if [[ "$LENGTH" -lt "100" ]]; then
      #echo starting new line
for key in "${!SHORT[@]}"
    #echo "line: $key is: ${SHORT[$key]}"
    echo "Playing line: $(($key+1)) of $(($STRINGNUM+1))"
    NEXTURL=$(echo ${SHORT[$key]} | xxd -plain | tr -d '\n' | sed 's/\(..\)/%/g')
    mpg123 -q "$NEXTURL&tl=En-us"

the above seems to split big fragments of text automatically
but how to feed to it a file text.txt to read

should it be a function like <cat text.txt implemented somehow

if I paste a text directly to the string :
INPUT=“one two three four”
it does work, but when I add a big fragment it wont execute $(cat text.txt)

I have another recommendation:

  1. Use a USB sound output device. USB sound output is robust and easy to work with, and doesn't have the risk of losing connection like Bluetooth.
  2. Use festival as the Text-to-Speech engine. This has pre-made ubuntu packages.
  3. Install the high-quality Festival voices (or at least one of them) for high quality output.

Here’s a reasonably-priced sound output device:

Here’s a good blog post about it:

I would recommend against using the Google API to generate speech, for three reasons (at least, these were true when I looked at this in the past):

  1. You need to always be internet connected.
  2. Google sometimes changes their APIs and this means you have to update your software.
  3. The translate APIs are rate limited, and aren't intended for reliable deployments without additional volume fees.

Checking the festival:

sudo apt-get install festival
sudo apt-get install festlex-cmu


cd /usr/share/festival/voices/english/
sudo wget -c
sudo tar jxf cmu_us_clb_arctic-0.95-release.tar.bz2 
sudo ln -s cmu_us_clb_arctic cmu_us_clb_arctic_clunits
sudo cp /etc/festival.scm /etc/festival.scm.backup
sudo echo "(set! voice_default 'voice_cmu_us_clb_arctic_clunits)" >> /etc/festival.scm


echo "This is a test." | festival --tts

results in

echo "This is a test." | festival --tts
SIOD ERROR: unbound variable : voice_cmu_us_clb_arctic_clunits
Error evaluating default voice: voice_cmu_us_clb_arctic_clunits
-=-=-=-=-=- EST Error -=-=-=-=-=-
{FND} Feature Token_Method not defined

aaa, whrong file name

stil broken

echo "This is a test." | festival --tts
SIOD ERROR: unbound variable : voice_cmu_us_awb_arctic_clunits
Error evaluating default voice: voice_cmu_us_awb_arctic_clunits
-=-=-=-=-=- EST Error -=-=-=-=-=-
{FND} Feature Token_Method not defined

fixing again:

sudo ln -s cmu_us_awb_arctic cmu_us_awb_arctic

still broken:

echo "This is a test." | festival --tts
SIOD ERROR: unbound variable : voice_cmu_us_awb_arctic_clunits
Error evaluating default voice: voice_cmu_us_awb_arctic_clunits
-=-=-=-=-=- EST Error -=-=-=-=-=-
{FND} Feature Token_Method not defined

trying one more time:
1 cmu_us_awb_arctic downloaded

sudo ln -s cmu_us_awb_arctic cmu_us_awb_arctic_clunits
sudo echo "(set! voice_default 'voice_cmu_us_awb_arctic_clunits)" >> /etc/festival.scm

wont work;
trying with sudo wget -c

the same error

lets debug it:

cat /etc/festival.scm
;; WARNING: It is inherently insecure to run a festival instance as a
;; server, mainly because it exposes the whole system to exploits which
;; can be easily used by attackers to gain access to your
;; computer. This is because of the inherent design of the festival
;; server. Please use it only in a situation where you are sure that
;; you will not be subjected to such an attack, or have adequate
;; security precautions.

;; This file has been provided as an example file for your use, should
;; you wish to run festival as a server.

; Maximum number of clients on the server
;(set! server_max_clients 10)

; Server port
;(set! server_port 1314)

; Server password:
;(set! server_passwd "password")

; Log file location
;(set! server_log_file "/var/log/festival/festival.log")

; Server access list (hosts)
; Example:
; (set! server_access_list '("[^.]+" "" "localhost.*" "192.168.*"))
; Secure default:
;(set! server_access_list '("[^.]+" "" "localhost"))

; Server deny list (hosts)

;; Debian-specific: Use aplay to play audio
(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)
(set! voice_default 'voice_cmu_us_clb_arctic_clunits)
(set! voice_default 'voice_cmu_us_awb_arctic_clunits)
(set! voice_default 'voice_cmu_us_awb_arctic_clunits)
(set! voice_default 'voice_cmu_us_clb_arctic_clunits)