Results 1 to 9 of 9

Thread: Oh god, you're using SAPI 4!?

  1. #1
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577

    Oh god, you're using SAPI 4!?

    No wonder I didn't recognize the dll. That has to be fixed. . SAPI 4 is the worst API ever. And SAPI 5 (totally rewritten API) is in the OS from XP onwards.
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Here's the deal: I don't have SAPI 5 installed, and really I installed the SAPI 4.0 because of a very simple reason: I am not about to install 200Mb worth of stuff (the SDK for 5.1) on my development machine just to have the computer telling me things I could deal without in first place. I chose SAPI 4 because it has very small runtime distro files and works as far back as Win98..
    Now, if you can find me an easy way to replace the SAPI for text-to-speech object for the newer one (this means without installing 200Mb of files in my machine) AND most importantly, find a reasonable size runtime distro for the SAPI 5 that works as far back as Win98SE... Then, I would be more than glad to replace it..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577
    All very good points. I guess it ain't broke so doesn't need fixing . Still, yuck . I'll add SAPI 5 support for WinXP+ with no required re-dist to my list of things to do. I'll stick the SAPI 5 sdk on my box and see if there's a nice useful redist for just the speech + voice piece. I'm sure there should be.
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Hey, I just found a way to use the built in SAPI 5 from XP in VB without installing the SDK (that was different) .. anyway, I'll make an option to set which version to use since I doubt SAPI 5 supports older windows (and I know there's a lot of users out there with Win98).
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  5. #5
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577
    I thought you should be able to from VB. I just coded it up too . Do you want the code? It's pretty simple:
    New form - frmSpeech5
    Code:

    ---
    Option Explicit

    'Declare the SpVoice object.
    Public Voice As SpVoice


    Private Sub Form_Load()
    Set Voice = New SpVoice
    End Sub

    ---

    Then instead of using frmSpeech in your speak method, the code would be:
    Load frmSpeech5
    frmSpeech5.Voice.Speak Words, SVSFlagsAsync
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

  6. #6
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577
    SAPI 5.x supports back to Win98 - I set the redist file downloading (it's 130mb) but it's painfully slow. There should be a TTS-only redist in there that you can make available for Win98 users. Leaving the SAPI4 stuff in as an option is nice since there are still a lot of tts voices available for it (I was surprised!).
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

  7. #7
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577
    Ah, but of course, the redist is only in msm format which aren't installable standlone . Someone could easily create an msi that installs the core SAPI 5 dlls + the tts engines downlevel. I'll have to see whether the msi installer stuff built into Visual Studio lets that be done easily. We'd be looking at about 6.5Mb though - so it's large compared to sapi 4 since it contains 3 voices.
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

  8. #8
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Well here's what I did for now.. removed frmSpeech altogether... created a VoiceObject that is set at start to either a DirectSS or a SpVoice object.. they both support the speak method.. The users will be able to use SAPI5 by adding this line to their RR.INI:

    sapi5=true

    Otherwise it will default to SAPI4... I have tested it and it seems to be working well on both of my machines (one has no SAPI 5 installed, the other has both).
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  9. #9
    FLAC
    Join Date
    Sep 2004
    Posts
    1,577
    Can you make it default to Sapi 5? And fall back to Sapi 4 if not available. That minimizes the user setup requirements. The override could then be to force SAPI 4 usage for someone who had installed SAPI 4 and preferred its choice of voices.

    I assume you are still using the async flag for the SAPI 5 call?
    Progress: 80% - Permanent install left.
    Motion LS800 Tablet PC and dock.
    Vista, Bu-535 GPS, RoadRunner, MPT2006.

Similar Threads

  1. How to find SAPI 6.1
    By 0l33l in forum PV FAQs
    Replies: 27
    Last Post: 08-03-2006, 05:52 PM
  2. sapi 6.1 from Office 2k3 CD
    By Custommx3 in forum PowerVoice
    Replies: 11
    Last Post: 08-27-2005, 11:41 PM
  3. Can't Get SAPI to work after Resume
    By Jstarko0329 in forum PowerVoice
    Replies: 5
    Last Post: 10-18-2004, 08:24 PM
  4. SAPI Engine
    By BeamRider in forum PowerVoice
    Replies: 5
    Last Post: 10-14-2004, 03:47 AM
  5. Delorme StreetAtlas 2003 SAPI 4 upgrade
    By gfoulks in forum GPS
    Replies: 0
    Last Post: 05-08-2003, 12:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •