Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.


Text To Speech library (desktop only)


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2007, 03:53 AM
Knows the basics
 
Join Date: May 2007
Posts: 98
Default Text To Speech library (desktop only)

Hi. I am trying to wrap the Microsoft SAPI so it will work with Basic4ppc. The DLL builds fine and I see all methods, but when I run it on the desktop I get an error saying that the speech.dll wrapper is trying to read from protected memory, but if I use native C++ the Speech.dll lib works fine. Please help! All source code is attached below for the desktop only. Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-27-2007, 02:16 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,321
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Sorry...
I cannot help, but is this dll device compatible?

I was looking for something like this for a while...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #3 (permalink)  
Old 10-27-2007, 02:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,697
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Louis - I am afraid that your source is a bit screwed up and I don't know that dll does so I can't help with that.

However try the following. As with all my stuff it needs .NET 2.0 and I can't be sure that it will work on your machines but it works on my laptop under XP and my desktop under Vista.

Technical note : The source code needs an interop library to access the COM object "Microsoft Speech Object Library". The Interop library included is automatically generated by VS2005 when you add the COM reference to the project. I have included the source in case anyone wants to make a stab at a .NET 1.1 version but I don't know if this is possible.

EDIT: - I've just found out that the voice selection is broken - I only have one voice installed on my main machine so I could't test it there. I have fixed it but I'll wait for some feedback to see if this library is of any use to people before posting it.

Last edited by agraham : 10-27-2007 at 02:58 PM.
Reply With Quote
  #4 (permalink)  
Old 10-27-2007, 03:09 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,141
Default

Attached is the .Net 1.1 version of this library (desktop only).
Speak1 - Asynchronous speaking.
Speak2 - Synchronous speaking (blocking).

You should add SAPI.dll to your project.
Interop.SpeechLib.dll should be in the same folder of your code.

A small example is also included.
Reply With Quote
  #5 (permalink)  
Old 10-27-2007, 04:12 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,697
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Final (?) version 1.1 of SpeechLibDesktop compiled under .NET 2.0

Source code and help file included. Sync and Async speaking with voice selection and some useful events. Sample app included.

@Erel & dzt et al. I guess this source won't compile directly under .NET 1.1 as I use the later C# 2 syntax to add events - I guess you can figure out how to fix that yourselves!


Edited by Erel: The attached file is compiled with .Net 1.1. Thank you agraham for this great library
Attached Files
File Type: zip SpeechLibDesktop.zip (60.4 KB, 124 views)
Reply With Quote
  #6 (permalink)  
Old 11-16-2007, 07:02 PM
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hey, this is great but can it not run on the PocketPC? Is there a hardware barrier to speach on a PDA?

Im new to this forum but it seems a shame to be developing things 'for desktop only' because the whole beauty of this Basic4ppc product is that one can develop and run on the PocketPC without going near a desktop?
Reply With Quote
  #7 (permalink)  
Old 11-16-2007, 07:15 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,697
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by colin9876 View Post
Hey, this is great but can it not run on the PocketPC? Is there a hardware barrier to speach on a PDA?
It's not hardware but software limitations. Microsoft didn't put the speech API into Windows Mobile because of memory and processor power limitations. As far as I know there is only one speech library for Pocket PC. It is called FLite and I haven't made it work properly. Even when it does the speech quality apparently is c**p because of said limitations.
Reply With Quote
  #8 (permalink)  
Old 11-03-2008, 10:05 PM
Newbie
 
Join Date: Aug 2008
Posts: 4
Default Speech Desktop error

Whenever I try to run this I get the following error using the included example:

"Cannot load file or assembly Interop.SpeechLib or one of its dependencies. Cannot locate file"

I have the Interop.SpeechLib.dll in the Windows directory, Basic4ppc/librarires directory, with the speechtext.sbp file.

What am I doing wrong?
Reply With Quote
  #9 (permalink)  
Old 11-04-2008, 02:15 AM
Knows the basics
 
Join Date: May 2007
Posts: 98
Default

Hi. The Interop.Speech.dll that you moved to your Windows folder should be in the same folder as the rest of the Basic4ppc Libraries. When you decide you want to distribute your applications, all dlls should be distributed in the same folder as your source code or compiled application. This includes the Interop.Speech.dll. HTH.
Reply With Quote
  #10 (permalink)  
Old 11-04-2008, 05:46 PM
Newbie
 
Join Date: Aug 2008
Posts: 4
Default Speech Desktop error - fixed

That did it. Thanks. Thought the dll needed to be in the windows directory per earlier comment in thread. Actually, also thought I had put all the dll's with the source code in trying different things, but had not included the Interop.Speech.dll.

Quote:
Originally Posted by Louis View Post
Hi. The Interop.Speech.dll that you moved to your Windows folder should be in the same folder as the rest of the Basic4ppc Libraries. When you decide you want to distribute your applications, all dlls should be distributed in the same folder as your source code or compiled application. This includes the Interop.Speech.dll. HTH.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop Help library agraham Additional Libraries 15 10-29-2008 04:33 PM
Window-Eyes Speech Library for the Desktop Only Louis Additional Libraries 0 07-15-2008 08:06 PM
Desktop Videocam image capture library agraham Additional Libraries 6 05-25-2008 11:00 AM
Speech library for the DEVICE! agraham Additional Libraries 32 05-21-2008 10:37 PM
Desktop Only library released Erel Announcements 3 09-10-2007 10:28 PM


All times are GMT. The time now is 08:12 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0