NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 47 48 49 50 51 … 93 Next »
VB compile needed

 
  • 0 Vote(s) - 0 Average
VB compile needed
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#1
2006-11-16, 11:37 AM
looking for someone that can compile a vb program for me...
it's super simple and shouldn't need any tweaking, tho i would love it if someone could add command-line processing...Smile
[but i'd take a compile as-is no problem]
here's the code..
Code:
Dim FileName As String
Dim FileStream As New SpFileStream
Dim Voice As  SpVoice

'Create SAPI voice
Set Voice = New SpVoice
    
'Assume that ttstemp.txt exists
FileName = "ttstemp.txt"
    
'Open the text file
FileStream.Open FileName, SSFMOpenForRead, True

'Select Microsoft Sam voice
Set Voice.voice = voice.GetVoices("Name=Microsoft Anna", "Language=409").Item(0)

'Speak the file stream
Voice.SpeakStream FileStream

'Close the Stream
FileStream.Close

'Release the objects
Set FileStream = Nothing
Set Voice = Nothing

thanx in advance..Big Grin
i just don't have vb or vc++ compiler or know of any free alternative..
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mila06
Offline

Member

Posts: 210
Threads: 47
Joined: Dec 2005
#2
2006-11-16, 12:58 PM
A free alternative (.NET11 and .NET2) SharpDevelop: http://www.sharpdevelop.net/OpenSource/SD/Download/

Quote:tho i would love it if someone could add command-line processing
What would you like it to do ??
Michael Larsen

[SIZE="1"]HTPC:
Asus AMD 785G- M4A785TD-M/EVO, ATI 4200 HDMI,
AMD Phenom II X2 550 - 3.0 GHz,
2 GB Ram, 500 GB Seagate Barracuda
Terratec Cinergy C PCI HD, NVidia PureVideo, Cyberlink
Windows 7 ULT, NPvr v1.5.33[/SIZE]
Website
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#3
2006-11-16, 02:03 PM
can sharpdevlop compile a vb app?

anyways, basically i just wanted to add a /say "say this text" option or read from file option like /file "file.txt"
but i can just as easily write out text file for it to say so not a big deal..
the /say thing would allow it to be a straight cli app with no temp files needed and only one line to run.. [instead of having to write to file, then say it after]

if you could shoot me a quick one as-is that would be great too..Smile

also, i found a way to make a vb app into console app..Smile
[also works for auto-it scripts as well! as well as, i suspect, any type of .exe]
http://www.nirsoft.net/vb/console_applic...basic.html
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mila06
Offline

Member

Posts: 210
Threads: 47
Joined: Dec 2005
#4
2006-11-16, 02:10 PM (This post was last modified: 2006-11-16, 02:17 PM by mila06.)
pBS Wrote:if you could shoot me a quick one as-is that would be great too..Smile

Here is one as-is. (VB 2005 .NET2). This one is a console-app. The ttstemp.txt has to be in the same dir as speek.exe (I havn't tested it !!)

EDIT!!!! I get an error at runtime. Hang on.....
Michael Larsen

[SIZE="1"]HTPC:
Asus AMD 785G- M4A785TD-M/EVO, ATI 4200 HDMI,
AMD Phenom II X2 550 - 3.0 GHz,
2 GB Ram, 500 GB Seagate Barracuda
Terratec Cinergy C PCI HD, NVidia PureVideo, Cyberlink
Windows 7 ULT, NPvr v1.5.33[/SIZE]
Website
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#5
2006-11-16, 02:22 PM (This post was last modified: 2006-11-16, 02:27 PM by pBS.)
only thing i changed was the path of the file...it was c:\ttstemp.txt
hope that doesn't mess it up...Smile
may need : imports SpeechLib

it all came from http://msdn.microsoft.com/library/defaul...pleTTS.asp
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mila06
Offline

Member

Posts: 210
Threads: 47
Joined: Dec 2005
#6
2006-11-16, 02:29 PM (This post was last modified: 2006-11-16, 02:34 PM by mila06.)
Here is a new one that works for me :-)

EDIT: It only works on my developer-pc where i have installed the MS Speech SDK :-(
Michael Larsen

[SIZE="1"]HTPC:
Asus AMD 785G- M4A785TD-M/EVO, ATI 4200 HDMI,
AMD Phenom II X2 550 - 3.0 GHz,
2 GB Ram, 500 GB Seagate Barracuda
Terratec Cinergy C PCI HD, NVidia PureVideo, Cyberlink
Windows 7 ULT, NPvr v1.5.33[/SIZE]
Website
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#7
2006-11-16, 02:30 PM
found this..
Three steps are needed to use TTS in a managed application:

1. Create an interop DLL

Since SAPI is a COM component, an interop DLL is needed to use it from a managed app. To create this, open the project in Visual Studio. Select the Project menu and click Add Reference. Select the COM tab, select "Microsoft Speech Object Library" in the list, and click OK. These steps add this reference to your project and create an Interop.SpeechLib.dll in the same folder as your executable. This interop DLL must always be in the same folder as your .exe to work correctly.

2. Reference the interop namespace

Include this namespace in your application. In C#, add "using SpeechLib;"; iIn VB, add “Imports SpeechLib”.

3. call Speak()

Create a SpVoice object and call Speak():

Examples:

Visual C#

SpVoice voice = new SpVoice();
voice.Speak("Hello World!", SpeechVoiceSpeakFlags.SVSFDefault);

Visual Basic

voice = New SpVoice
voice.Speak("Hello World!", SpeechVoiceSpeakFlags.SVSFDefault)
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
pBS
Offline

Posting Freak

Posts: 4,829
Threads: 182
Joined: Aug 2005
#8
2006-11-16, 02:34 PM
i need speech interop lib Smile
Hardware: HDHR Prime, HDPVR 1212, Raspberry pi2, VFD display w/LCDSmartie
mila06
Offline

Member

Posts: 210
Threads: 47
Joined: Dec 2005
#9
2006-11-16, 02:48 PM
It seems like one have to install the MS Speech SDK(maybe there is a runtime).

Here you get the complete built(incl the dll), but that is not enough :-(

I am away from the PC the next hours....
Michael Larsen

[SIZE="1"]HTPC:
Asus AMD 785G- M4A785TD-M/EVO, ATI 4200 HDMI,
AMD Phenom II X2 550 - 3.0 GHz,
2 GB Ram, 500 GB Seagate Barracuda
Terratec Cinergy C PCI HD, NVidia PureVideo, Cyberlink
Windows 7 ULT, NPvr v1.5.33[/SIZE]
Website
K.S.
Offline

Senior Member

Posts: 526
Threads: 12
Joined: Oct 2006
#10
2006-11-16, 02:51 PM
if you still need a free alternative to do it yourself: take a look at the visual studio express tools. comes in VB / C# / C++ flavours and should meet your needs ;-)

http://msdn.microsoft.com/vstudio/express/
sub Wrote:Yep, what he said.

curiosity killed the cat Big Grin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  New web service clarification needed bgowland 6 3,340 2013-10-19, 02:36 AM
Last Post: bgowland
  Skin help needed for EventDetails.xml bgowland 7 3,434 2011-06-26, 11:55 PM
Last Post: Jaggy
  MVP/NMT testers needed for Weather2 scb147 46 12,310 2010-03-03, 08:12 PM
Last Post: scb147
  SQL help needed bgowland 4 2,136 2008-05-25, 07:08 AM
Last Post: bgowland
  Csharp Event help needed.. psycik 4 2,152 2008-05-25, 06:19 AM
Last Post: psycik
  Web site programming - precompiled, compile on demand.... psycik 9 2,940 2008-02-27, 10:23 PM
Last Post: psycik
  Whats needed for recording -Oz- 24 7,659 2008-01-24, 03:59 AM
Last Post: zehd
  TV guide data needed reboot 35 10,577 2007-08-06, 11:04 PM
Last Post: mvallevand
  Help needed with error in config.exe.log idkpmiller 3 1,871 2007-01-24, 06:08 AM
Last Post: sub
  Image Location in FireFox Help Needed UncleJohnsBand 13 4,184 2006-11-22, 11:40 PM
Last Post: UncleJohnsBand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode