•   
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 30
  •   
Xbmc not working for blind users.
pvagner: does the voices() work for you in espeak, because it crashes XBMC on my system Smile
I think you mentioned something about this before, but I've forgotten now.
No new addon version yet on the repository, but I made a lot of improvements:

Backend select dialog now handled manually - also, now only displays available backends
Added displayName to backends - used for selection dialog
Backend selection now saved with provider name
Added currentSpeed() to TTSBackendBase, works like currentVoice()
Added XBMCAudioTTSBackendBase backend base
Added ESpeak_XA_TTSBackend which uses subprocess and XBMC audio and implements currentSpeed()
Added a fix for OK speaking as Oklahoma
Settings now only shows 'Voices' option for the currently displayed speech engine

Now we won't have to deal with the indexed backend setting.
If you look at the code for ESpeak_XA_TTSBackend, you can see how easy it can be to add a backend with this method.
Yes eSpeak ctypes implementation crashes for me also. However I am afraid this is not because of my code but I guess it has something with the fact how XBMC loads libraries. When espeak library is about to be loaded for the second time XBMC crashes.
It will crash if you just create a dumb voices method for example
Code:
def voices(self): return ['en','de','fr']
So I don't know if we can fix it somehow.
Also I may be able to add a rate control to more TTSBackends now.
Also wouldn't it be better to rework ESpeakTTSBackend to generate wave files and play through XBMC rather than creating a new subprocess based TTSBackend? If this is good idea I can try tweaking ctypes based implementation. Or do we want to ditch that implementation because of the crashes we seem unable to fix atm?
I note that, I have some interest in skin theming, subject to me being able to decipher and properly get a skin.extras.addon (which so far no joy as I dont understand python - to work with confluence (which will allow to distribute/install skin themes etc) - to provide high contrast theme for confluence, designed especially for this purpose.

I have already redesigned most of the raster gfx into psd's with vectors but still much work remains and my own theme flavour still takes priority over this... I avoid like plague to recolor rasters, and work with pixelated images, so yes it should be relatively simpl e to provide themes that suit this purpose as well.
(2014-03-20, 07:14)pvagner Wrote: Yes eSpeak ctypes implementation crashes for me also. However I am afraid this is not because of my code but I guess it has something with the fact how XBMC loads libraries. When espeak library is about to be loaded for the second time XBMC crashes.
It will crash if you just create a dumb voices method for example
Code:
def voices(self): return ['en','de','fr']
So I don't know if we can fix it somehow.
Also I may be able to add a rate control to more TTSBackends now.
Also wouldn't it be better to rework ESpeakTTSBackend to generate wave files and play through XBMC rather than creating a new subprocess based TTSBackend? If this is good idea I can try tweaking ctypes based implementation. Or do we want to ditch that implementation because of the crashes we seem unable to fix atm?

I didn't think it was your code. I believe you mentioned that it was working fine outside of XBMC. I was just checking if you had gotten it working without crashing on your end.
Sraue wanted something to test using espeak with the new patch, and this was easier and quicker than trying to fix the current implementation. Also I wanted to have a working voice select and test out the new speed select. This doesn't have to stay in permanently. I would prefer if we could figure out a way to prevent the ctypes version from crashing and use that, because it should perform better without having to do a bunch of subprocess calls.
Interestingly, for a test I put:
Code:
print repr(self.voices())
at the end of the __init__ and it still crashed, so it's not only on a second load of the libraries.

Also, have you been having XBMC hang occasionally on exit. If it's not just on my end, then I'm sure it is something I'm doing wrong with threading.
Text to speech looks possible on android in Gotham. Gotham has the StartAndroidActivity() builtin and android has TTS built in. I'll have to write a simple android app, but I've written for android before so that is no problem. I won't be doing that right away, but I wanted to share the info Smile
Added a new version to my repository: 0.0.20

Repo

This fixes Flite hanging XBMC on shutdown and now opens the addon settings on the F6 key. Re-install the keymap and restart XBMC to update.
I'll eventually need to have it check if the keymap needs to be updated and do this automatically.

This also adds all the things mentioned a few posts back.
Hi all,

i started to prepare OpenELEC (http://www.openelec.tv) to include eSpeak support so Ruuk's TTS addon will work. You can find initial testbuilds at

http://snapshots.openelec.tv/

starting with the r17989 builds "eSpeak" is included and can be used together with this addon. This are early development versions so you should expect issues with the TTS system. Also there is actually no way to install/enable the TTS support for blind users. We will think how it can be done (and we need your feedback/input). Other then that this addon should work on all supported OpenELEC builds, alson on RaspberryPi.

greetings

Stephan
greetings, Stephan

Image
Image
Added a new version to my repository: 0.0.24

Repo


** 0.0.24 **

Change SAPI to threaded to enable interruption of speech lists

** 0.0.23 **

Fix for espeak available causing error in windows

** 0.0.22 **

Fix Flite subclass

** 0.0.21 **

Added changelog.txt
Added documentation for items in guitables.py Removed giutables.py items that were removed in frodo
Added speaking of changelog dialog
Changed voice and speed settings to appear as subsettings
Add class and method documentation to the backend base classes
Some restructuring to the backend base classes and backends to make more sense and fix some threading issues
Change XBMCAudioTTSBackendBase to WaveFileTTSBackendBase and allow it to work with XBMC audio with stopSFX (if available) or external audio
Re-implement pico2wav using WaveFileTTSBackendBase



I accidentally updated the addon repository, and of course things proved to be broken at the time. I apologize if anyone had problems as a result. Should be working fine now.
Added a new version to my repository: 0.0.25

Repo


NVDA: Unload nvdaController library on close (prevented addon from updating)
SAPI: Delete comtypes object on close (maybe? caused XBMC to hang on shutdown)
Fix for OSXSay hanging XBMC on quit
Some backend restructuring/improvement

pvagner: I tried a few things to fix eSpeak with ctypes, but I couldn't get anything happening. Feel free to whack at it some more Smile
ruuk, do you have some ideas on how we might be able to detect where crashes occur?
For me when XBMC crashes it just exits without doing something usefull and the log includes no helpfull hints. I have tried storing library handle into the settings and loading second instance using that handle but this will not help with eSpeak ctypes implementation also.
(2014-03-23, 20:16)pvagner Wrote: ruuk, do you have some ideas on how we might be able to detect where crashes occur?
For me when XBMC crashes it just exits without doing something usefull and the log includes no helpfull hints. I have tried storing library handle into the settings and loading second instance using that handle but this will not help with eSpeak ctypes implementation also.

I think with the gnu debugger GDB installed and debug logging enabeled, a crash will generate a stack trace in the crash log. My system puts a crashlog into my home directory.
I don't really know how to read a stack trace, so this is rarely useful for me Smile

As you can see from the commented out code in espeak.py, I tried unloading the library. This crashes XBMC as well.

Just now I ran the following code in XBMC:
Code:
import ctypes
import ctypes.util
import os

class espeak_VOICE(ctypes.Structure):
    _fields_=[
        ('name',ctypes.c_char_p),
        ('languages',ctypes.c_char_p),
        ('identifier',ctypes.c_char_p),
        ('gender',ctypes.c_byte),
        ('age',ctypes.c_byte),
        ('variant',ctypes.c_byte),
        ('xx1',ctypes.c_byte),
        ('score',ctypes.c_int),
        ('spare',ctypes.c_void_p),
    ]

libname = ctypes.util.find_library('espeak')
eSpeak = ctypes.cdll.LoadLibrary(libname)
eSpeak.espeak_Initialize(0,0,None,0)
voices=eSpeak.espeak_ListVoices(None)
aespeak_VOICE=ctypes.POINTER(ctypes.POINTER(espeak_VOICE))
pvoices=ctypes.cast(voices,aespeak_VOICE)
print '1'
index=0
voiceList = []
while pvoices[index]:
    print '2'
    voiceList.append(os.path.basename(pvoices[index].contents.identifier))
    index+=1
print voiceList

And it printed the '1' but not the '2' so it was crashing on pvoices[index], so it doesn't only crash on a second load of the library.

Code:
libname = ctypes.util.find_library('espeak')
print '1'
eSpeak = ctypes.cdll.LoadLibrary(libname)
eSpeak.espeak_Initialize(0,0,None,0)
print '2'
eSpeak2 = ctypes.cdll.LoadLibrary(libname)
eSpeak2.espeak_Initialize(0,0,None,0)
print '3'
eSpeak3 = ctypes.cdll.LoadLibrary(libname)
eSpeak3.espeak_Initialize(0,0,None,0)
print '4'

Printed all the way through 4 and didn't crash

Code:
libname = ctypes.util.find_library('espeak')
print '1'
eSpeak = ctypes.cdll.LoadLibrary(libname)
eSpeak.espeak_Initialize(0,0,None,0)
eSpeak.espeak_Synth('test',4,0,0,0,0x1000,None,None)
print '2'
eSpeak2 = ctypes.cdll.LoadLibrary(libname)
eSpeak2.espeak_Initialize(0,0,None,0)
eSpeak2.espeak_Synth('test',4,0,0,0,0x1000,None,None)
print '3'
eSpeak3 = ctypes.cdll.LoadLibrary(libname)
eSpeak3.espeak_Initialize(0,0,None,0)
eSpeak3.espeak_Synth('test',4,0,0,0,0x1000,None,None)
print '4'

Printed all the way through 4 and then crashed

I don't know if that's helpful or not. I'm about ready to give up on ctypes with espeak, unless you have any ideas.

By the way, is there a special way to start speech-dispatcher to get it to work with the addon. I tried with it running and not running and it fails to show up. Raising the exception in the available() method's try clause says something about the client and server expecting different paths.
Added a new version to my repository: 0.0.26

Repo

Added 'Use SOX If Available' setting to pico2wav
Added 'Speed (Requires SOX)' setting to pico2wav
Added fix for text starting with - not speaking on some speech engines

pvagner: I added the ability to add arbitrary settings to a backend. You still have to manually add the settings.xml entry, but the rest is fairly simple.
Added extras attribute to backend base class that lists settings extras as a tuple of (name,default) tuples
Now calls update when extras changed, extra setting can be retrieved with userExtra()
You can check pico2wave for an example.
So just a few interesting things I discovered while helping a friend of mine who is totally blind get XBMC going. Firstly, we got everything installed on Friday night and come Sunday her speech was not working at all. After a bit of investigation it turns out the add-on was missing from enabled add-ons. We reinstalled her add-on and all is good. I got home tonight and launched XBMC and uh-oh, my speech went away after about 2 minutes of running. I looked in enabled addons and mine was gone too. I reinstalled and saw that 0.26 was available. The other thing we noticed after helping someone from a totally blind perspective... you can't hear if there's anything already in the virtual keyboard and you can't hear if you have deleted everything from the keyboard. Also, you can't hear what percentage an add-on has downloaded when installing. The other thing is that of course this addon doesn't support JAWS at this point. If possible we should have a backend for it since it's one of the biggies on the realm of screen readers. The last thing we noticed is that my blind friend kept getting confused when she should do up or down arrow vs. left or right arrow. Is there a skin that forces everything including the front page to be vertically scrolling? Thanks!

Also, can we figure out a method for blind people to install and configure the addon as a lot of people can't test at all without sighted help to get it running.
I'll have a longer repply when I get home from work, but for now I was curious, how are you installing the addon?
  •   
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
  • 30
  •   



Logout Mark Read Team Forum Stats Members Help
Xbmc not working for blind users.5
This forum uses Lukasz Tkacz MyBB addons.