[raspberry-vi] Re: Pi 0 W espeak as a stand alone speech synth?

  • From: "Chris Norman" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "chris.norman2" for DMARC)
  • To: Raspberry VI <raspberry-vi@xxxxxxxxxxxxx>
  • Date: Wed, 18 Dec 2019 14:08:50 +0000

If you're writing the server in Python (about 5 minutes worth of work with
Twisted and twisted.protocols.basic.LineReceiver), don't forget about
accessible_output2 <https://pypi.org/project/accessible-output2/>.
from accessible_output2.outputs.auto import Auto
tts = Auto()
tts.speak('Testing', interrupt=True)

HTH,

Take care,

Chris Norman



On Wed, 18 Dec 2019 at 08:33, Michael A Ray <dmarc-noreply@xxxxxxxxxxxxx>
wrote:

Hello,

As a programmer of thirty years, the last twenty with Linux and
considerable experience of APIs and client/server systems, I always
think much more deeply when trying to work out an idea.

I like the idea of something like a Pi Zero being a speech synth for an
Arduino.  Speech and sound in general is something lacking in Arduino
world.

There are speech synth chip shields for Arduino, but they are very
expensive.

There could be a number of ways of connecting an Arduino to a Zero:

1. I2C
2. SPI
3. UART
4. TCP/UDP with an Ethernet shield on the Arduino


The first three are three different methods of serial connection.  If
you chose I2C, then more than one Arduino could connect to the I2C bus
on a single Pi.

With SPI and UART the connection would be one to one.

In all these serial connection methods you would need to design some
kind of protocol. Possibly based on the old Hayes MODEM protocol.

With TCP or UDP connection via an Ethernet shield on the Arduino, I
would go for delivering JSON strings to the Pi which it could easily
parse and speak the contents.

The advantage of doing it this way is any device on your network, or on
the other side of the world if you exposed your Zero, could make your
Zero speak.

In all of these cases, the lack of hardware-handshaking on USB to serial
adaptors is irrelevant.  It is only SpeakUp that needs this.

In this architecture the Arduino becomes the client, and the Zero the
speech server.  But I would use a regular Pi, since sound on the Zero is
non-existent without some fiddling.

If the Ethernet protocol used was UDP rather than TCP, no connection is
necessary and multiple clients can connect at the same time.

Same is true for TCP, but you would need a server capable of forking to
handle requests.

This is a nice idea.

I will look into whether there are any eSpeak binding for node.js, in
which case writing a server for the Pi would be trivial.  There
certainly are for Python, and again such a server there would be fairly
easy.

And delivering UDP packets from an Arduino Ethernet shield is simple.

Mike


On 18/12/2019 04:12, Tom Fowle wrote:
Hi Mike,
Wow, this is a more complex answer than I expected, will require study.

I was thinking of designs for Arduino  with the 0W acting as an external
speech synthesizer
some ham kits and  like projects.

However it seems like modules like the emec2 are probably better suited
to
this kind of work.

Thanks for detailed reply.
Tom Fowle


On Tue, Dec 17, 2019 at 11:08:30AM +0000, Michael A Ray wrote:
Hello,

I think there is little chance of this working.

Reasons are stated below.

I think that in the past all external hardware speech synthesisers, such
as the DECTalk Express, and the Dolphin Apollo and Juno range, were all
connected by serial ports, not USB ports.

All these hardware synthesisers depended on hardware handshaking.  Using
the serial port pins as signals to do such things as pause speech, or
flush the buffer.

As a consequence, at least SpeakUp, the console screen reader, was
written to utilise this.

I don't think USB to serial adaptors based on the PL2303 and FTDI chips
support hardware handshaking.  The FTDI chip might, but the PL2303
almost certainly does not.

In addition, I do not think there are any speech-dispatcher modules
written for hardware synthesisers connected in any way.

It might be possible to produce something with an Arduino, with an
attached MAX232 TTL to RS232 level adaptor and a speech synthesis
shield.  But such shields for the Arduino are expensive.

One way to go would be to write a version of speechd-up, or eSpeakUp
that connects over TCP to another machine running a TCP server.

Such TCP client and server programs are easy to write with either Python
or node.js.

Then a server running on a more powerful machine could be the speech
synth.

But what hardware are you suggesting that is so weak that a Pi Zero is
more powerful?  Or is it just because the Zero would only be the synth
and not be doing anything else?

I have a Python client/server pair half-written which makes Emacspeak
speak in Windows Subsystem for Linux, WSL.  But I am sure it is only a
matter of time before WSL is sound enabled anyway.  If it is not
already.

Mike


On 16/12/2019 05:34, Tom Fowle wrote:
Has anybody run the Pi 0W with espeak and a serial I2C interface to
create
theequivelent of a stand alone speech synthesizer?

The purpose being making devices accessible which have serial or i2C
ports
but not enough power to support text to speech themselves.

If the 0W can't hack it, which PI would do the job at the lowest cost.
Thanks
tom Fowle WA6IVG
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry
Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013




--
Michael A. Ray
Analyst/Programmer
Witley, Surrey, South-east UK

"Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away." -- A. de Saint-Exupery

https://cromarty.github.io/
http://eyesfreelinux.ninja/
http://www.raspberryvi.org/


===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry
Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry
Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views
and attitudes expressed by the subscribers to this list do not reflect
those of the Foundation.

Mike Ray, list creator, January 2013




--
Michael A. Ray
Analyst/Programmer
Witley, Surrey, South-east UK

"Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away." -- A. de Saint-Exupery

https://cromarty.github.io/
http://eyesfreelinux.ninja/
http://www.raspberryvi.org/


===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views
and attitudes expressed by the subscribers to this list do not reflect
those of the Foundation.

Mike Ray, list creator, January 2013




=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: