Re: [fpc-pascal] Playing with SpVoice (ole object)

2008-05-12 Thread Joao Morais
[EMAIL PROTECTED] wrote: Joao Morais wrote: s := 'hello world'; vsound.speak(s); speaks using a literal but says randomic words (sometimes says nothing) using a variable. Is there something that I am missing? You should use a variable of type WideString: VAR S: WideString; And all

Re: [fpc-pascal] Playing with SpVoice (ole object)

2008-05-12 Thread Joao Morais
Marco van de Voort wrote: {$mode objfpc}{$H+} uses comobj; var vsound: olevariant; s: string; begin vsound := createoleobject('SAPI.SpVoice'); writeln('playing using literal'); vsound.speak('hello world'); writeln('ok (press enter)'); readln; writeln('now playing using

Re: [fpc-pascal] Playing with SpVoice (ole object)

2008-05-12 Thread Marco van de Voort
> > {$mode objfpc}{$H+} > uses >comobj; > var >vsound: olevariant; >s: string; > begin >vsound := createoleobject('SAPI.SpVoice'); >writeln('playing using literal'); >vsound.speak('hello world'); >writeln('ok (press enter)'); >readln; >writeln('now playing using

Re: [fpc-pascal] Playing with SpVoice (ole object)

2008-05-12 Thread [EMAIL PROTECTED]
Joao Morais wrote: s := 'hello world'; vsound.speak(s); speaks using a literal but says randomic words (sometimes says nothing) using a variable. Is there something that I am missing? You should use a variable of type WideString: VAR S: WideString; And all will be good

[fpc-pascal] Playing with SpVoice (ole object)

2008-05-11 Thread Joao Morais
Hello, the following code: {$mode objfpc}{$H+} uses comobj; var vsound: olevariant; s: string; begin vsound := createoleobject('SAPI.SpVoice'); writeln('playing using literal'); vsound.speak('hello world'); writeln('ok (press enter)'); readln; writeln('now playing using a stri