Jump to content

speaking clock


XY16
 Share

Recommended Posts

This is a speaking clock i made. The code may be a bit long winded, if anyone wants to clear it up and repost it that's fine.

As a blind person, i find this extremely useful.

Notes

There are too hotkeys you can use for this application, make sure they are free before trying them.

Ctrl + Alt + t: Speak the time

Ctrl + Alt + d: Speak the date

Note that the hotkeys can be switched off by using the options/hotkeys menu in the tray icon context menu.

The settings file for this program will be stored in @AppDataDir & "\Levtec\SpeakingClock" and is called Settings.ini.

enjoy and please provide feedback.

Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16

Link to comment
Share on other sites

If you can stand the 24 hour clock you can get away with 2 lines.

$Voice = ObjCreate("Sapi.SpVoice") 
$Voice.Speak (@hour & @min)

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Cool, though Miss. Google has a sexier voice in my opinion ;)

$gspeech = "Hello, time is now, " & @HOUR & ". " & @MIN & ", goodbye"
speech()

Func speech()
Local $temp, $File
$temp = StringReplace($gspeech, " ", "+")
$File = StringRegExpReplace($gspeech, "([ .!])", "") 
If Not FileExists(@TempDir & "\" & $file & ".mp3") Then _
InetGet("http://translate.google.com/translate_tts?q=" & $temp, _
@TempDir & "\" & $file & ".mp3")
SoundPlay(@TempDir & "\" & $file & ".mp3", 1)
Return
EndFunc
Edited by Werty

Some guy's script + some other guy's script = my script!

Link to comment
Share on other sites

i agree with you when you say that the google voice i better than most voices people will have installed on their computers, but the google voice will require an internet connection, and when using a slow computer there will be a significant delay between the point that the hotkey is pressed or the hour is reached and when the speech is finally immited. also, what about people with no internet connection.

i could certainly make thatan option in the program, the user could switch between sapi5 and google.

anyway thanks for showing me how to get the google voice to read stuff for me, and thanks for the comments. that's a really cool thing to know.

Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16

Link to comment
Share on other sites

I think it's awesome that you can write code like this without being able to see. I am most impressed. It just goes to show how much talent there is in the world. I hope you will be contributing more wonderful code for us in the future. Thank you!

Edited by czardas
Link to comment
Share on other sites

it's not all that hard, the only things i have real trouble with are gui's and padding code. i don't understand why you sighted people would want to make your code pretty, it doesn't make any logical sence as most people will separate their code sections and functions on the page with blank lines anyway.

i am going to add some new features today, i've already added an online updater to update from my web site.

Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16

Link to comment
Share on other sites

i don't understand why you sighted people would want to make your code pretty

While it makes no difference to the execution of the code, having visual clues is very handy for those of us fortunate enough to see them. For example when trying to track down errors. Other than that, I see no reason for it.

I have sometimes wondered how blind people use computers. There doesn't seem to be a great deal of software that incorporates text to speech, and the speech recognition engines I have tried previously were not so good. But that was a few years ago, so maybe things have improved. I'm sure there is still a lot of scope for improvment. I wonder how much braille software there is out there. I think would be interesting to write software that communicated with a braille printer. Unfortunately I'm not so advanced to be able to do that, but it is an interesting thought.

I once tried a program called Ultra Hal Assistant. I don't know if you have heard of it. It's not perfect, but it chats to you, keeps appointments and runs programs from speech commands.

Edited by czardas
Link to comment
Share on other sites

hi czardas

most blind people will use a screen reader to get access to the computer. as most screen readers have braill support, it is possible to attach a device called a braille display to the computer and feal the screen. most blind people cannot afford a braille embosser (braille printer), but for those of us fortunate to be able to afford them, they are greate pieces of equipment.

if you wanted to start messing around with braille, you could download a braille font from somewhere, i don't quite know where you would obtain one from.

as for me, the screen reader i use is called hal, made by dolphin computer access ltd.

you can get a demo of it by following his link:

http://www.yourdolphin.com/tryit.asp?id=4

alternatively, follow the link below to get the screen reader and magnifier all in one, supernova. it is the only product of it's kind.

http://www.yourdolphin.com/tryit.asp?id=1

they are demo's by default and would cost you allott of money to buy if you did, but as i am on the beta testers and development team for dolphin, i get a free copy every new release.

if the only screen reader you have tried is ultra hal, you will see that screen readers in general have improved dramatically over their years of hard development.

a good alternative to products that cost £500 + is nvda (non visual desktop access), a free screen reader.

if you wanted to start developing your own desktop access software for the blind, nvda would be your best choice as a starting project as it is open source.

you can find it on sourceforge.net.

Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16

Link to comment
Share on other sites

Thanks for educating me about this. I am interested in languages and alphabets, and braille is something I've never looked into. However it has always fascinated me when I have noticed people using it. My interest is born mainly out of curiosity, so I think I might read about it and look around for a font. Investigating different types of notation systems sometimes inspires me to create something.

Link to comment
Share on other sites

hi

there's one fix i forgot to include in the change log. see below.

fix: when checking for updates after this has already been done during the current instance of the speaking clock, the update data file is re-downloaded and the correct information is reported. previously, the update data file was set to be obtained from the cache if available.

Please note: If you plan on submitting any code snippits to my posts, please refrain from using the code tags as i use a screen reader and can't read the code properly, let alone copy it the way it should be.Thanks for your understanding.Best regardsXY16

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...