Speech Recognizer for harbour App ?
Speech Recognizer for harbour App ?
hi,
it is no Problem to "read" a Text and that let Windows "speak" it
Cortana or Alexa can "listen" to what you speak ... Window have "SpeechRecognition" API
did somebody use "SpeechRecognition" API
... would be nice to use "SpeechRecognition" for ChatGPT
it is no Problem to "read" a Text and that let Windows "speak" it
Cortana or Alexa can "listen" to what you speak ... Window have "SpeechRecognition" API
did somebody use "SpeechRecognition" API
... would be nice to use "SpeechRecognition" for ChatGPT
greeting,
Jimmy
Jimmy
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Speech Recognizer for harbour App ?
With FWH please review samples\voice.prg
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oVoice := TOleAuto():New( "Sapi.SPVoice" )
oVoice:Speak( "Good morning" )
oVoice:Speak( "I am here to serve you" )
oVoice:Speak( "Is there something that I can do for you today ?" )
return nil
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Speech Recognizer for harbour App ?
Turn on voice typing
Press Windows logo key + H on a hardware keyboard when you are on an EDIT (GET) control
Press Windows logo key + H on a hardware keyboard when you are on an EDIT (GET) control
Re: Speech Recognizer for harbour App ?
hi Antonio,
i like to "speak" to harbour App like in ChatGPT Demo
as i understand newer Version of SAPI have also "SpeechRecognition" so i search for Sample
Yes, that is niceAntonio Linares wrote:https://chrome.google.com/webstore/deta ... kbhjdehggc
as i wrote it is easy to use "Sapi.SPVoice" to "read" TEXT and than let PC "speak" itAntonio Linares wrote:With FWH please review samples\voice.prg
i like to "speak" to harbour App like in ChatGPT Demo
as i understand newer Version of SAPI have also "SpeechRecognition" so i search for Sample
greeting,
Jimmy
Jimmy
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Speech Recognizer for harbour App ?
https://www.autoitscript.com/forum/topi ... cognition/
Code: Select all | Expand
Local $RecoContext =ObjCreate("SAPI.SpSharedRecoContext")
If @Error Then
Msgbox(0,"","Error Creating $RecoContext: "&@Error)
Exit
EndIf
Local $SinkObject =ObjEvent($RecoContext,"MyEvent_")
Local $Grammar =$RecoContext.CreateGrammar(1)
$Grammar.DictationLoad
$Grammar.DictationSetState(1) ;Start Listening
Sleep(5000)
$Grammar.DictationSetState(0) ;Stop Listening
Func MyEvent_Recognition($StreamNumber,$StreamPosition,$RecognitionType,$Result)
MsgBox(0,"",$Result.PhraseInfo.GetText)
EndFunc
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Speech Recognizer for harbour App ?
This is working. Wondering how to convert this to Harbour: Local $SinkObject =ObjEvent($RecoContext,"MyEvent_")
listen.prg
listen.prg
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local o := CreateObject( "SAPI.SpSharedRecoContext" )
local oGrammar := o:CreateGrammar( 1 )
oGrammar:DictationLoad()
oGrammar:DictationSetState( 1 )
Sleep( 5000 )
oGrammar:DictationSetState( 0 )
MsgInfo( "ok" )
return nil
Re: Speech Recognizer for harbour App ?
hi Antonio,
thx for 1st Step to recognize Speach under harbour
will search forr "SinkObject" for more Information
thx for 1st Step to recognize Speach under harbour
will search forr "SinkObject" for more Information
greeting,
Jimmy
Jimmy
- Massimo Linossi
- Posts: 506
- Joined: Mon Oct 17, 2005 10:38 am
- Location: Italy
Re: Speech Recognizer for harbour App ?
Hi Antonio.
Very nice work, many compliments.
I have a little question about. In these years I started to work in Linux and I've found that Tole or Createobject are not
working inside this OS. Is there a workaround for using them ? Any kind of library o something else ?
Thanks a lot
Massimo
Very nice work, many compliments.
I have a little question about. In these years I started to work in Linux and I've found that Tole or Createobject are not
working inside this OS. Is there a workaround for using them ? Any kind of library o something else ?
Thanks a lot
Massimo
- Antonio Linares
- Site Admin
- Posts: 42256
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Speech Recognizer for harbour App ?
Dear Massimo,
Answered by chatGPT 4:
Answered by chatGPT 4:
OLE (Object Linking and Embedding) is a technology developed by Microsoft, primarily for use in their Windows operating system and applications like Microsoft Office. It allows users to create compound documents by embedding or linking objects (such as images, spreadsheets, or other documents) from one application into another.
As OLE is a Microsoft technology, it is not natively supported on Linux. However, there are some workarounds that may allow you to use OLE objects on Linux:
Use Wine: Wine is a compatibility layer that allows you to run Windows applications on Linux. You can try installing and running a Windows application that supports OLE objects, such as Microsoft Office, using Wine. However, Wine may not provide full compatibility or the best performance for all applications.
Use a virtual machine: You can install a Windows virtual machine on your Linux system using software like VirtualBox or VMware. This will let you run a full instance of Windows alongside your Linux system, allowing you to use OLE objects within Windows applications.
Use alternative applications: There are many Linux applications that can handle files created with OLE objects, such as LibreOffice, Calligra Suite, or SoftMaker Office. These applications may not support all the features of OLE, but they can usually handle basic functionality like embedding or linking objects.
Use cloud-based services: You can use cloud-based office suites like Microsoft Office 365 or Google Workspace, which are accessible through a web browser on any platform, including Linux. These services often support OLE-like functionality, allowing you to work with files containing embedded or linked objects.
Keep in mind that none of these options provide native support for OLE objects on Linux, and your mileage may vary when it comes to compatibility and functionality.