Closed dermotgouk closed 8 months ago
@dermotgouk Ah, I see why.
So when you're transforming your tuple to string (with str(finished)
), it actually creates the string ('Space 4', 'RS027', 'Operational', 'Space 4')
The last '
is read like "feet" as in the imperial measurement, most likely because this is how Google reads '
when it comes after a number, e.g. 6'
(six feet). It does the same on the first space 4
in the string as well.
If you really want it to read a list verbatim, I'd use a join()
, i.e.:
finished = ("Space 4", "RS027", "Operational", "Space")
- finishing = str(finished)
+ finishing = ", ".join(finished)
print(finishing)
var = gTTS(text=finishing, lang="en")
var.save("eng.mp3")
That way it'll read Space 4, RS027, Operational, Space 4
Prerequisites
pip install --upgrade gTTS
)Current Behaviour (steps to reproduce)
GTTS is speaking the following sentence and after the number 4 its adding a word that sounds like feat/feed/feet ('Space 4 ', 'RS027', 'Operational', 'Space 4 ')
Expected Behaviour
It should not add this additional word afterwards
Context
Space 4 is called from a variable which parses an array list for the index.
Environment