Board index FlightGear Support Tools ATC-pie

No voice

ATC-pie is a radar air traffic control simulation program for the FlightGear multi-player network.

No voice

Postby Emile » Wed Nov 08, 2017 5:11 pm

Hi,

After being introduced to ATC-pie at the Flightsimweekend I gave it a try.
Unfortunately, I don't hear the pilot voices. This is version 1.4.1 on Windows 7, Python 3.5.1.

To get the pyttsx modules to start correctly I installed pyttsx3 and changed the import in ext/tts.py to read
Code: Select all
import pyttsx3 as pyttsx


This was based on a hint at https://stackoverflow.com/questions/296 ... med-engine

This caused the startup error to dissappear. Now I see in the startup window that the Speech synthesis module loaded successfully. In a Python interpreter the script
Code: Select all
import pyttsx3
engine = pyttsx3.engine()
engine.init()
engine.say("Hello")
engine.runAndWait()


works fine, so I think every installed correctly.
I did check the option "Voice synthesis" in the solo game options menu but still no voices in solo game.

What can I do?

Thanks,

-Emile.
Emile
 
Posts: 2
Joined: Wed Nov 08, 2017 4:53 pm

Re: No voice

Postby mickybadia » Wed Nov 08, 2017 10:04 pm

First, thanks for the incidental pointer you gave to pyttsx3. My README pointed to a specific version of pyttsx for Python3, but you went about this in a different way. People should not be editing the source code in their download, so I will include pyttsx3 directly in the next version, because it is more easily pip-able.

Of course, thank you also for trying this out. And welcome aboard.

For the rest, your report is strange because:
Code: Select all
import pyttsx3
engine = pyttsx3.engine()
engine.init()
engine.say("Hello")
engine.runAndWait()


This did not run on my system: "AttributeError: 'Engine' object has no attribute 'init'"
For it to work, I have to merge lines 2 & 3 into one single: "engine = pyttsx3.init()"
What does that do on your side?
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: No voice

Postby Emile » Sat Nov 11, 2017 5:43 pm

Sorry, copied the wrong part into the mail. Indeed, your code is what I tried succesfully. This gives me voices.

-Emile.
Emile
 
Posts: 2
Joined: Wed Nov 08, 2017 4:53 pm

Re: No voice

Postby jmwilton » Thu Feb 01, 2018 2:20 am

For what it is worth...I have been having a "No Voice" problem on my installation on Windows 10.
I have finally been able to make it work by modifying the code slightly. I am sure there might be a configuration change that I can also make to achieve the same result.

In the SpeechSynthesiser __init__ method I added the line to the end:

en_voices.extend(vid for vid, langs in vdct.items())

following:

en_voices.extend(vid for vid, langs in vdct.items() if any('en' in lang for lang in langs))

It appears that all the vdct.items returned only had "EN" not "en" in the results.
I didn't want to break anything else on my system so I did not try changing things in the registry.

Don't know if this helps anyone else...but it worked for me.
jmwilton
 
Posts: 12
Joined: Thu Feb 01, 2018 2:12 am

Re: No voice

Postby mickybadia » Wed Feb 07, 2018 8:45 pm

This looks non standard... do you know what driver is in use?

I would be interested to know if many users have the same issue. Who gets capital language codes when running the following code in a Python3 console?
Code: Select all
import pyttsx3
engine = pyttsx3.init()
for v in engine.getProperty('voices'):
  for lang in v.languages:
    print(lang.decode('utf8'))
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: No voice

Postby wkitty42 » Thu Feb 08, 2018 7:02 am

i tried the code, just because... but i don't have that pyttsx3 module and don't know/remember how to install them :/
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: No voice

Postby mickybadia » Thu Feb 08, 2018 9:24 am

To install, use pip3.
NB: For Linux at least, the README should be helpful.

Have you had the no voice problem too?
To clarify, this test only applies to those without voice despite a "Speech synthesis module loaded successfully." message at start.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: No voice

Postby wkitty42 » Thu Feb 08, 2018 1:58 pm

i haven't tried messing with voice stuff... i only wanted to see what the lang results were...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: No voice

Postby capmt » Sun Apr 12, 2020 3:40 am

after adding the line, the callsign is in chinese and the read back is in english, anyone encountering the same issue?

jmwilton wrote in Thu Feb 01, 2018 2:20 am:For what it is worth...I have been having a "No Voice" problem on my installation on Windows 10.
I have finally been able to make it work by modifying the code slightly. I am sure there might be a configuration change that I can also make to achieve the same result.

In the SpeechSynthesiser __init__ method I added the line to the end:

en_voices.extend(vid for vid, langs in vdct.items())

following:

en_voices.extend(vid for vid, langs in vdct.items() if any('en' in lang for lang in langs))

It appears that all the vdct.items returned only had "EN" not "en" in the results.
I didn't want to break anything else on my system so I did not try changing things in the registry.

Don't know if this helps anyone else...but it worked for me.
capmt
 
Posts: 3
Joined: Sun Apr 12, 2020 3:38 am

Re: No voice

Postby mickybadia » Sun Apr 12, 2020 8:49 am

Well, you tampered with the code, removing the English filter in the selected languages. So no real wonder in ending up with foreign languages at run time.
Did it not work without "the line"? and if indeed not, please answer the post from 7/02/2018.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: No voice

Postby capmt » Mon Apr 13, 2020 4:49 am

It didn't work without
en_voices.extend(vid for vid, langs in vdct.items())

What was the topic of the post you are referring to? Can't seem to find it with the date.
capmt
 
Posts: 3
Joined: Sun Apr 12, 2020 3:38 am

Re: No voice

Postby mickybadia » Mon Apr 13, 2020 8:51 am

This present thread! (date was given in DD/MM/YYYY format, maybe that confused you)
Please start python3 in a terminal/console, copy-paste the given code and copy-paste us back the result.

It should list all detected languages for your voices. I am filtering the list down to those containing 'en', as specified in the documentation for English. I am curious about what you get, maybe "EN" instead?
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: No voice

Postby capmt » Sat Apr 18, 2020 4:20 pm

It came back with

Process finished with exit code 0

Not showing speech synthesis check in start up after reinstalling python

Loading aircraft & airline data...
Reading world navigation & routing data...
No world AD position data provided (CONFIG/nav/AD-positions); falling back on old data.
No navaid data provided (CONFIG/nav/navaid.dat); falling back on old data.
No fix/RNAV data provided (CONFIG/nav/fix.dat); falling back on old data.
No airway data provided (CONFIG/nav/awy.dat); falling back on old data.
Starting up...

mickybadia wrote in Wed Feb 07, 2018 8:45 pm:This looks non standard... do you know what driver is in use?

I would be interested to know if many users have the same issue. Who gets capital language codes when running the following code in a Python3 console?
Code: Select all
import pyttsx3
engine = pyttsx3.init()
for v in engine.getProperty('voices'):
  for lang in v.languages:
    print(lang.decode('utf8'))
capmt
 
Posts: 3
Joined: Sun Apr 12, 2020 3:38 am


Return to ATC-pie

Who is online

Users browsing this forum: No registered users and 1 guest