• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Text-to-Speech

Ravindra

Member
Dear all,

I am again here after a long span of time with a new query, Hope you are doing well.
Well, I am demonstrating my query below:-
I am maintaining a meaning sheet in excel , there are two columns in it, First one is word and second one is meaning of that in Hindi. I want to add a third column where I will paste listen button in all rows. If I click on particular button than its row's meaning text should be voiced.
For example:- There are lots of text to speech online tool, where one has to put word and then it's voiced. Same thing I want to have but on the condition that I will not have to visit particular site more and more. There should be availability of button in third column's each row for getting voice of that row's meaning .

For further hints, I have uploaded a file here. If possible than , kindly give me solution with this file.


Thanks a lot in advance,,,,,
 

Attachments

  • text-to-voice.xlsx
    14.3 KB · Views: 9
Ravindra
Have a look how I would do it in the attached

I would add a single control
and some VBA Code
Code:
Sub Speak()
If Not Intersect(ActiveCell, Range("B2:B12")) Is Nothing Then
    Application.Speech.Speak ActiveCell.Text
End If
End Sub
 

Attachments

  • text-to-voice.xlsm
    20 KB · Views: 13
I don't run Excel 2007 so can't assist here?

Someone else please!
 
Hi Hui ,

Two points :

1. The volume is so low on my computer , I can't hear anything when the target is the Hindi words in column C.

2. When the target is the English words in column B , I am able to hear , but even here it is very faint.

Narayan
 
It won't read Hindi words in any location or anything that isn't in Column B2:B12
It won't translate
Volume is a system function, not controllable via Excel
 
Hi Hui ,

Two points once more :

1. I think your code was not protected ; before I ran the code on the Hindi words in column C , I made the necessary change.

2. I assume the OP's requirement is :
I am maintaining a meaning sheet in excel , there are two columns in it, First one is word and second one is meaning of that in Hindi. I want to add a third column where I will paste listen button in all rows. If I click on particular button than its row's meaning text should be voiced.
so that what he wants is for the Hindi words to be read out. Let Ravindra clarify.

Narayan
 
Hi Hui,
thanks for your kind help, as given code is given for second row as stated in my question. But I changed coulmn reference from B2:B12 to A2:A12 and it works fine since system can't read hindi font untill we add third party
add-on application. But I need some modification in given code, I just wanted to make listen word from cell listen whose current row is selected throw sound pic pasted on current row.

Sub Speak()
If Not Intersect(ActiveCell, Range("B2:B12")) Is Nothing Then
Application.Speech.Speak ActiveCell.Text
End If
End Sub
 
Sub Speak()
IfNot Intersect(ActiveCell, Range("A2:E12")) IsNothingThen
Application.Speech.Speak Cells(Activecell.Row,2).Text
EndIf
EndSub
 
Hello Hui,
Hope you are doing well. Kindly see my requirement given below:-
I want to have modification in above query, Since I want , if someone clicks on particular rows' voice button than that rows' meaning text should be voiced.

For example:- If click on Cell B8 then Defy should be voiced,If click on cell B3 than Grain should be voiced and if click on cell B11 than Mistress should be voiced.

Kindly find attached the sheet for modification.

Thanks for you kind help,,,,,
 

Attachments

  • text-to-voice.xlsm
    18.7 KB · Views: 4
If you want a button for each row you will need a macro for each button
So a simple macro like either
Code:
Sub SpeakA2()
    Application.Speech.Speak Range("A2").Text
End Sub
or
Code:
Sub SpeakA2()
    Application.Speech.Speak "Bake"
End Sub

will do the job

I would still recommend that you use a single button and macro like
Code:
Sub Speak()
If Not Intersect(ActiveCell, Range("A2:A12")) Is Nothing Then
    Application.Speech.Speak Cells(ActiveCell.Row, 1).Text
End If
End Sub

This works where the user clicks in a cell in Column A and then presses a single button

The other way would be to use a Double Click event on the worksheet and use some code which will be triggered if the user Double Clicks a cell in A2:A12
like:
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A2:A12")) Is Nothing Then
    Application.Speech.Speak Target.Text
End If
End Sub

see attached
 

Attachments

  • text-to-voice.xlsm
    15 KB · Views: 10
Sir, your knowledge is awesome. I would be grateful to you, if you refer me any book to get all these type of function. As I have done MCA along with I have done vocational training in .NET
 
Back
Top