Kodi Community Forum

Full Version: Kodi Screen Reader (Text to speech)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
(2014-07-02, 00:52)Traker1001 Wrote: [ -> ]@alex Try with the qoutes. Cut and paste the below line into your run box.
Code:
C:\"Program Files (x86)"\XBMC\xbmc.exe -p

@ Traker1001 - thanx. your code was correct.

@ ruuk - followed your instructions & still gettin script failed. Sad

for me, i can confirm that when it does work & i select a song to play or watch a video, if i jump out to home screen it doesn't work anymore even though the addon is still enabled.
@ Traker1001/Ruuk - no script failed error w/ tts google speech engine. im not able to use sapi for whatever reasons we dont know. addon works flawlessy w/ no drop in audio at any time. it's very responsive. problem solved: not sure wether its bcuz i upgrade to gotham 14.0 alpha. it's a great addon!

i wanna thank both you guys again for your help & ruuk for this great addon. take care.
(2014-07-02, 13:22)Traker1001 Wrote: [ -> ]@alexp4re - I got something new. Please Start XBMC in portable mode as explained above. Make sure speech addon is disabled. In XBMC goto Settings, System, Audio Output and tell us what audio output is selected and what audio output options you have.

Then, make sure the Direct Sound output for your TV is selected and nothing else. Please make sure the channels are set to 2.0. Once you have selected that. Please go and enable speech and tell us if that changes anything.

@edit, Sorry, Missed you last post. Im glad you got it working.

no problem. i did try above methods & got script failed. doesn't work w/ sapi w/o errors. but it's workin w/ google tts engine, so i'm happy. thanks again.
(2014-07-02, 14:00)Traker1001 Wrote: [ -> ]@ruuk - I know what my problem with the "COMError: (-2147200966, None, (None, None, None, 0, None))" is now. When windows Power Saving mode blanks my display, My tv powers off because it detects no signal. When my TV powers off, Effectively the HDMI audio device is removed, So SAPI and comtypes have nothing to send the audio to. When I power my tv back on and press a key to wake up my system, The display and corresponding audio are redetected by Windows. Problem is speech is trying to talk before the redection happens.

I can verify this behavior like this, When I hit the start menu instead of a arrow key, It still wakes my system to windows desktop. I can then Alt-tab to XBMC and speech works with no errors.

Correct me if I am wrong, I believe the solution to this problem is outside the scope of anything you can program into the addon itself.
Well, a normal app accessing SAPI would need some method to deal with this situation, so there's no reason to think I can't in the addon. I think I there is a method with which I can check the status of the SAPI voice object. I may just be able to handle the error until the audio is restored. With the new version, is it still killing the addon when this happens, or does speech just stop temporarily? I had added some code to log and ignore the error and continue. I wouldn't mind a log to see how it behaves with the new code.

(2014-07-02, 14:36)alexp4re Wrote: [ -> ]
(2014-07-02, 13:22)Traker1001 Wrote: [ -> ]@alexp4re - I got something new. Please Start XBMC in portable mode as explained above. Make sure speech addon is disabled. In XBMC goto Settings, System, Audio Output and tell us what audio output is selected and what audio output options you have.

Then, make sure the Direct Sound output for your TV is selected and nothing else. Please make sure the channels are set to 2.0. Once you have selected that. Please go and enable speech and tell us if that changes anything.

@edit, Sorry, Missed you last post. Im glad you got it working.

no problem. i did try above methods & got script failed. doesn't work w/ sapi w/o errors. but it's workin w/ google tts engine, so i'm happy. thanks again.
I'd like to have you try one more thing after I make some changes. Before I was trying to find the source of the error and fix it, but I want to try having the addon just retry initialization after the error. The fact that disabling and re-enabling the addon makes it work makes me think this may get around the issue. I know you've moved on from this issue, but I'd like to take one last stab in case this may affect other users in the future, and in any case, most likely Google will one day remove access to this undocumented speech API.
(2014-07-02, 18:34)ruuk Wrote: [ -> ]
(2014-07-02, 14:00)Traker1001 Wrote: [ -> ]@ruuk - I know what my problem with the "COMError: (-2147200966, None, (None, None, None, 0, None))" is now. When windows Power Saving mode blanks my display, My tv powers off because it detects no signal. When my TV powers off, Effectively the HDMI audio device is removed, So SAPI and comtypes have nothing to send the audio to. When I power my tv back on and press a key to wake up my system, The display and corresponding audio are redetected by Windows. Problem is speech is trying to talk before the redection happens.

I can verify this behavior like this, When I hit the start menu instead of a arrow key, It still wakes my system to windows desktop. I can then Alt-tab to XBMC and speech works with no errors.

Correct me if I am wrong, I believe the solution to this problem is outside the scope of anything you can program into the addon itself.
Well, a normal app accessing SAPI would need some method to deal with this situation, so there's no reason to think I can't in the addon. I think I there is a method with which I can check the status of the SAPI voice object. I may just be able to handle the error until the audio is restored. With the new version, is it still killing the addon when this happens, or does speech just stop temporarily? I had added some code to log and ignore the error and continue. I wouldn't mind a log to see how it behaves with the new code.

(2014-07-02, 14:36)alexp4re Wrote: [ -> ]
(2014-07-02, 13:22)Traker1001 Wrote: [ -> ]@alexp4re - I got something new. Please Start XBMC in portable mode as explained above. Make sure speech addon is disabled. In XBMC goto Settings, System, Audio Output and tell us what audio output is selected and what audio output options you have.

Then, make sure the Direct Sound output for your TV is selected and nothing else. Please make sure the channels are set to 2.0. Once you have selected that. Please go and enable speech and tell us if that changes anything.

@edit, Sorry, Missed you last post. Im glad you got it working.

no problem. i did try above methods & got script failed. doesn't work w/ sapi w/o errors. but it's workin w/ google tts engine, so i'm happy. thanks again.
I'd like to have you try one more thing after I make some changes. Before I was trying to find the source of the error and fix it, but I want to try having the addon just retry initialization after the error. The fact that disabling and re-enabling the addon makes it work makes me think this may get around the issue. I know you've moved on from this issue, but I'd like to take one last stab in case this may affect other users in the future, and in any case, most likely Google will one day remove access to this undocumented speech API.

@ ruuk - ok. just let me know when you're ready. i would like to get this fixed too.
hi ruuk - really do like this addon after testing it out these past few days. humbly request these features if possible:

1. addon audio is immediately is disabled once video or music is playing. that way you can browse for songs or music videos & not be interrupted when listening to music until or if you make your next selection.
2. master volume that controls audio regardless of the tts engine: sapi, google, etc.
3. delay feature of audio in seconds ( 1 sec., 2 secs., 3 sec., etc.) like tvtunes. that way it doesn't try to say everything before you get to your selection. it's less disruptive.
4. a greeting when xbmc finishes loading up & goodbye when exiting xbmc. (not really necessary)

love this addon. i just wanna help & bring this addon to the next level.

also wanted to ask you this. with music videos, it announces the music artist & the title of the song which i prefer...but yet with music it announces just the title only. i guess, what i preferred would be beneficial in compilation albums, but i guess not in solo albums. depending each individual preference. is this a xbmc thing, a skin or a addon thing?
(2014-07-04, 20:07)Traker1001 Wrote: [ -> ]
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]hi ruuk - really do like this addon after testing it out these past few days. humbly request these features if possible:

1. addon audio is immediately is disabled once video or music is playing. that way you can browse for songs or music videos & not be interrupted when listening to music until or if you make your next selection.
2. master volume that controls audio regardless of the tts engine: sapi, google, etc.
3. delay feature of audio in seconds ( 1 sec., 2 secs., 3 sec., etc.) like tvtunes. that way it doesn't try to say everything before you get to your selection. it's less disruptive.
4. a greeting when xbmc finishes loading up & goodbye when exiting xbmc. (not really necessary)

love this addon. i just wanna help & bring this addon to the next level.

also wanted to ask you this. with music videos, it announces the music artist & the title of the song which i prefer...but yet with music it announces just the title only. i guess, what i preferred would be beneficial in compilation albums, but i guess not in solo albums. depending each individual preference. is this a xbmc thing, a skin or a addon thing?

1. Wouldn't it just be easier to F12 out of it when you don't want it to speak? I wouldn't be able to navigate anytime something was playing, While I can with the way it is currently. Although I could see how this would be handy to individual's wanting to use the addon for other purposes. This was unintentionally the case for a while during setup of the PI, Drove me absolutely crazy.

2. If your saying what I think your saying, for a while I agreed with you and was thinking about requesting this myself, However, I have found the way it is setup currently extremely handy. Having the speech volume being independent allows me easily have it set to talk over the system when I wish. Makes it really easy to navigate when I don't necessarily want to stop or pause something.

3. Not sure about Ruuk, but don't understand what you mean. Could you give example?

4. Again not sure what you mean, There are speech start up and shutdown sounds that should be playing when you enable/disable the speech.

1. i just thought it would be an extra touch if it was automated instead of manually hit F12 on & off.
2. master volume would be nice. im on google tts engine. i believe it requires sox, mplayer, or afplayer in order to control the volume. what's that though? (ruuk still wants to fix my sapi problem..rmbr?)
3. delay feature: for example - i set it to delay 2 seconds. currently, if i scroll down a movie list, audio will try say movie names while im goin down my list. it may say this movie & that movie, but is cut off here & there bcuz i'm still scrolling down. where as delay feature will prevent it from saying anything till i stop to that movie name. it waits 2 seconds(a delay) then say the movie i selected. i think this is a very important feature to make this addon better.
4. this is not really a big deal. just think it would make it more of personal experience, like Jarvis in Ironman. you can set it to greet you a certain saying of your choosing once xbmc finish loads up & exiting of xbmc.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]hi ruuk - really do like this addon after testing it out these past few days. humbly request these features if possible:

1. addon audio is immediately is disabled once video or music is playing. that way you can browse for songs or music videos & not be interrupted when listening to music until or if you make your next selection.
I could possibly add that as an option in settings.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]2. master volume that controls audio regardless of the tts engine: sapi, google, etc.
It might be possible for me to add a master volume in addition to the individual volumes. I will think about it.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]3. delay feature of audio in seconds ( 1 sec., 2 secs., 3 sec., etc.) like tvtunes. that way it doesn't try to say everything before you get to your selection. it's less disruptive.
I could possibly add this as a settings option.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]4. a greeting when xbmc finishes loading up & goodbye when exiting xbmc. (not really necessary)
The addon has sound effects when loading and shutting down. I could add the option to say a text as well.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]love this addon. i just wanna help & bring this addon to the next level.
I have been spending an average of 15-20 hours a week working on this, and I am mostly focused on stability, speaking the entire XBMC interface and making it work on as many platforms as possible and having a wide range of speech engine support. The 'next level' will come when it comes Smile The purpose of this addon is first and foremost to allow the visually impaired to use XBMC. I do intend eventually to make this more generally useful, such as making it available as a module for other addons to use for speech. That doesn't mean I won't add the features you requested soon, but they aren't necessarily a top priority either.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]also wanted to ask you this. with music videos, it announces the music artist & the title of the song which i prefer...but yet with music it announces just the title only. i guess, what i preferred would be beneficial in compilation albums, but i guess not in solo albums. depending each individual preference. is this a xbmc thing, a skin or a addon thing?
For the most part I am trying to represent what is on the interface. Sometimes that is not possible so I put information that may be relevant, but doesn't necessarily match the current skins display. It's still a work in progress. Having more customization options for what is said where is something that will come down the road when there isn't so much work to do on the core functionality.
(2014-07-04, 21:05)ruuk Wrote: [ -> ]
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]hi ruuk - really do like this addon after testing it out these past few days. humbly request these features if possible:

1. addon audio is immediately is disabled once video or music is playing. that way you can browse for songs or music videos & not be interrupted when listening to music until or if you make your next selection.
I could possibly add that as an option in settings.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]2. master volume that controls audio regardless of the tts engine: sapi, google, etc.
It might be possible for me to add a master volume in addition to the individual volumes. I will think about it.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]3. delay feature of audio in seconds ( 1 sec., 2 secs., 3 sec., etc.) like tvtunes. that way it doesn't try to say everything before you get to your selection. it's less disruptive.
I could possibly add this as a settings option.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]4. a greeting when xbmc finishes loading up & goodbye when exiting xbmc. (not really necessary)
The addon has sound effects when loading and shutting down. I could add the option to say a text as well.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]love this addon. i just wanna help & bring this addon to the next level.
I have been spending an average of 15-20 hours a week working on this, and I am mostly focused on stability, speaking the entire XBMC interface and making it work on as many platforms as possible and having a wide range of speech engine support. The 'next level' will come when it comes Smile The purpose of this addon is first and foremost to allow the visually impaired to use XBMC. I do intend eventually to make this more generally useful, such as making it available as a module for other addons to use for speech. That doesn't mean I won't add the features you requested soon, but they aren't necessarily a top priority either.
(2014-07-04, 10:10)alexp4re Wrote: [ -> ]also wanted to ask you this. with music videos, it announces the music artist & the title of the song which i prefer...but yet with music it announces just the title only. i guess, what i preferred would be beneficial in compilation albums, but i guess not in solo albums. depending each individual preference. is this a xbmc thing, a skin or a addon thing?
For the most part I am trying to represent what is on the interface. Sometimes that is not possible so I put information that may be relevant, but doesn't necessarily match the current skins display. It's still a work in progress. Having more customization options for what is said where is something that will come down the road when there isn't so much work to do on the core functionality.

thank you for considering these requests. can't wait. keep up the great work!
I think on number 2 alexp4re was talking about a master volume for just the speech engines, where as it is now, Google has its own volume and SAPI had its own volume.
(2014-07-05, 00:17)ruuk Wrote: [ -> ]I think on number 2 alexp4re was talking about a master volume for just the speech engines, where as it is now, Google has its own volume and SAPI had its own volume.

yes. you are correct ruuk.

after readin what tracker has written, I see now how my features request would not accommodate the visually impaired and it does make sense what he said. but it shouldn't affect them bcuz the features needs to enabled in addon settings. the addon by default will run as it is now even with the new features.
ok. sorry tracker. still new to the forum. im learning.
Added a new version to my repository: 0.0.79.

Get it or the repository from the Downloads Page.

Changes:
  • Better log error formatting
  • SAPI: Add ability to retry initialization on errors
  • SAPI: Improve error recovery
  • SAPI: More improved logging
  • Add ability to automatically reset the addon on SAPI failure

I did some major re-working of the SAPI addon which should make it more error tolerant. I've tested on Vista, 7 and 8.1 and everything worked fine. This overcomes errors changing voices on Windows 7 and it should work for other errors that may show up.

alexp4re: Give this a whirl with SAPI and see if it overcomes your issue - I'm hopeful, but if it doesn't, a log would be nice.

Traker1001: I'm not sure this will handle the issue you were having any better, but let me know how it goes or if it breaks anything.

As I said, everything seemed to work fine, but I changed a lot so there is the risk of new errors. Aside from that the code is much improved and more robust than before.
@ Ruuk - the latest update fixed the failed script when i used sapi. it's stable & responsive. there's no drop in audio when i select a song or watch a video like before. you fixed it! THANKS!!!

p.s. if i watch a movie & fast forward. it says the increment that's forward, but it's saying "past midnight" in reference to the time. its also sayin that phrase for the length of a music file too. you might wanna look into it.

@ Traker1001 - my log is on post #56, on page 4. thanks for looking into it.
Hi ruuk, this is really impressive work.

i have two questions:

1. Is it possible to disable speaking of xbmc menus and text?
2. Can i use the engine in another addon, so that i just pass a string to XBMC TTS and it is spoken out?

If yes i would be happy if you could post an example.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43