Topics

PROC_callmethod failed error

 

Dear Sirs,

 

With the help of Richard who gave me precious indications last month, I was succeeding in writing a fine text to voice translation module.

Unfortunately, yesterday I got a curious error each time I use callmethod procedure.

The error message is :

PROC_callmethod failed in module C:\Program Files (x86)\BBC BASIC for Windows\lib\COMLIBA

Can anybody indicate me what can cause this error please ?

 

This is the set of instructions from which I get this error message :

 

     AFF$="R38" : NON$="au guichet M12"

     ON ERROR PROC_comexit : PRINT 'REPORT$ : END

      ON CLOSE PROC_comexit : QUIT

      PROC_cominit

      Pitch% = 0

      Speed% = 0

      Voice$ = ""

      Lang$ = "40C"

      tts% = FN_createobject("Sapi.SpVoice")

      phrase$="Ticket": CAC=30: GOSUB 300

      phrase$=AFF$: CAC=180: GOSUB 300

      phrase$=NON$: CAC=200: GOSUB 300

      PROC_releaseobject(tts%)

      PROC_comexit

      END

 

300 PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$)

       WAIT CAC

       RETURN

 

      DEF PROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)

      LOCAL qual$

       qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"

      IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"

      PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""",3)")

      ENDPROC

 

 

Salomon CHABI


 

Your code,as is, doesn't run overhere.
When I add   INSTALL @lib$+"COMLIB" as the first line of the program the code runs without error messages.

Pls. also eliminate the use of linenumbers, GOSUB's and RETURN's and replace with PROC's and FN's
It will be so much easier to debug.

 Eddy


From: CHABI Salomon <chabisalomon@...>
To: bb4w@groups.io
Sent: Thursday, April 27, 2017 4:37 AM
Subject: [bb4w] PROC_callmethod failed error

Dear Sirs,
 
With the help of Richard who gave me precious indications last month, I was succeeding in writing a fine text to voice translation module.
Unfortunately, yesterday I got a curious error each time I use callmethod procedure.
The error message is :
PROC_callmethod failed in module C:\Program Files (x86)\BBC BASIC for Windows\lib\COMLIBA
Can anybody indicate me what can cause this error please ?
 
This is the set of instructions from which I get this error message :
 
     AFF$="R38" : NON$="au guichet M12"
     ON ERROR PROC_comexit : PRINT 'REPORT$ : END
      ON CLOSE PROC_comexit : QUIT
      PROC_cominit
      Pitch% = 0
      Speed% = 0
      Voice$ = ""
      Lang$ = "40C"
      tts% = FN_createobject("Sapi.SpVoice")
      phrase$="Ticket": CAC=30: GOSUB 300
      phrase$=AFF$: CAC=180: GOSUB 300
      phrase$=NON$: CAC=200: GOSUB 300
      PROC_releaseobject(tts%)
      PROC_comexit
      END
 
300 PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$)
       WAIT CAC
       RETURN
 
      DEF PROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)
      LOCAL qual$
       qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"
      IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
      PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""",3)")
      ENDPROC
 
 
Salomon CHABI



Richard Russell
 

I wonder if this is a case when the PC has got 'confused' and simply needs to be rebooted.

Richard.


 

There is still a lot of "room for improvement" but the code herafter illustrates what I mean by replacing GOSUB, RETURN, linenumbers by PROC.
       INSTALL @lib$+"COMLIB"
      AFF$="R38" : NON$="au guichet M12"
      ON ERROR PROC_comexit : PRINT 'REPORT$ : END
      ON CLOSE PROC_comexit : QUIT
      PROC_cominit

      Pitch% = 0: Speed% = 0: Voice$ = "": Lang$ = "40C"
      tts% = FN_createobject("Sapi.SpVoice")
      phrase$="Ticket":CAC= 30:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
      phrase$=AFF$    :CAC=180:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
      phrase$=NON$    :CAC=200:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
      PROC_releaseobject(tts%)

      PROC_comexit
      END

      DEF PROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)
      LOCAL qual$
      qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"
      IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
      PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""",3)")
      ENDPROC

 Eddy




From: Eddy Jacobs <ejacobs99@...>
To: "bb4w@groups.io" <bb4w@groups.io>
Sent: Thursday, April 27, 2017 12:04 PM
Subject: Re: [bb4w] PROC_callmethod failed error

Your code,as is, doesn't run overhere.
When I add   INSTALL @lib$+"COMLIB" as the first line of the program the code runs without error messages.

Pls. also eliminate the use of linenumbers, GOSUB's and RETURN's and replace with PROC's and FN's
It will be so much easier to debug.

 Eddy


From: CHABI Salomon <chabisalomon@...>
To: bb4w@groups.io
Sent: Thursday, April 27, 2017 4:37 AM
Subject: [bb4w] PROC_callmethod failed error

Dear Sirs,
 
With the help of Richard who gave me precious indications last month, I was succeeding in writing a fine text to voice translation module.
Unfortunately, yesterday I got a curious error each time I use callmethod procedure.
The error message is :
PROC_callmethod failed in module C:\Program Files (x86)\BBC BASIC for Windows\lib\COMLIBA
Can anybody indicate me what can cause this error please ?
 
This is the set of instructions from which I get this error message :
 
     AFF$="R38" : NON$="au guichet M12"
     ON ERROR PROC_comexit : PRINT 'REPORT$ : END
      ON CLOSE PROC_comexit : QUIT
      PROC_cominit
      Pitch% = 0
      Speed% = 0
      Voice$ = ""
      Lang$ = "40C"
      tts% = FN_createobject("Sapi.SpVoice")
      phrase$="Ticket": CAC=30: GOSUB 300
      phrase$=AFF$: CAC=180: GOSUB 300
      phrase$=NON$: CAC=200: GOSUB 300
      PROC_releaseobject(tts%)
      PROC_comexit
      END
 
300 PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$)
       WAIT CAC
       RETURN
 
      DEF PROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)
      LOCAL qual$
       qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"
      IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
      PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""",3)")
      ENDPROC
 
 
Salomon CHABI





 

My dears,

I finally resolved the problem concerning the call-method error
previousely announced:

" PROC_callmethodfailed in module C:\Program Files (x86)\BBC BASIC for
Windows\lib\COMLIBA "

I found that this error occurs when either sound driver is not well
installed, or when no audio output (speakers or corresponding HDMI
output) is available.

Something appeared curious for me :
- I installed sound drivers and my program worked fine on the system
when connected by HDMI output to a TV.
- I then changed the output and used a VGA monitor combined with
speakers connected to audio output of the computer. Unfortunately, I
got at that time the error again.

Finally, I made specific driver installation conform to the type of
output used, and now it's ok!

Many thanks for your kind help.

Best regards.

Salomon




2017-04-27 11:20 UTC+01:00, Edja via Groups.Io <ejacobs99=yahoo.com@groups.io>:

There is still a lot of "room for improvement" but the code herafter
illustrates what I mean by replacing GOSUB, RETURN, linenumbers by PROC.
INSTALL @lib$+"COMLIB"
AFF$="R38" : NON$="au guichet M12"
ON ERROR PROC_comexit : PRINT 'REPORT$ : END
ON CLOSE PROC_comexit : QUIT
PROC_cominit

Pitch% = 0: Speed% = 0: Voice$ = "": Lang$ = "40C"
tts% = FN_createobject("Sapi.SpVoice")
phrase$="Ticket":CAC=
30:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
phrase$=AFF$
:CAC=180:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
phrase$=NON$
:CAC=200:PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$):WAIT CAC
PROC_releaseobject(tts%)

PROC_comexit
END

DEF PROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)
LOCAL qual$
qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE
ABSSPEED="""""+STR$speed%+"""""/>"
IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""",3)")
ENDPROC

Eddy


From: Eddy Jacobs <@Edja>
To: "bb4w@groups.io" <bb4w@groups.io>
Sent: Thursday, April 27, 2017 12:04 PM
Subject: Re: [bb4w] PROC_callmethod failed error

Your code,as is, doesn't run overhere.
When I add INSTALL @lib$+"COMLIB" as the first line of the program the
code runs without error messages.
Pls. also eliminate the use of linenumbers, GOSUB's and RETURN's and replace
with PROC's and FN's
It will be so much easier to debug.

Eddy

From: CHABI Salomon <@Abiola>
To: bb4w@groups.io
Sent: Thursday, April 27, 2017 4:37 AM
Subject: [bb4w] PROC_callmethod failed error

Dear Sirs, With the helpof Richard who gave me precious indications last
month, I was succeeding inwriting a fine text to voice translation
module.Unfortunately,yesterday I got a curious error each time I use
callmethod procedure.The error messageis : PROC_callmethodfailed in module
C:\Program Files (x86)\BBC BASIC for Windows\lib\COMLIBACan anybodyindicate
me what can cause this error please ? This is the set of instructions from
which I get this errormessage : AFF$="R38" :NON$="au guichet M12"
ON ERROR PROC_comexit :PRINT 'REPORT$ : END ON CLOSE PROC_comexit
:QUIT PROC_cominit Pitch% = 0 Speed% = 0 Voice$ =
"" Lang$ = "40C" tts% =FN_createobject("Sapi.SpVoice")
phrase$="Ticket":CAC=30: GOSUB 300 phrase$=AFF$: CAC=180:GOSUB 300
phrase$=NON$: CAC=200:GOSUB 300 PROC_releaseobject(tts%)
PROC_comexit END 300
PROCspeakasync(tts%,phrase$,Pitch%,Speed%,Voice$) WAIT CAC
RETURN DEFPROCspeakasync(tts%,phrase$,pitch%,speed%,voice$)
LOCAL qual$ qual$ =
"<PITCHABSMIDDLE="""""+STR$pitch%+"""""/><RATEABSSPEED="""""+STR$speed%+"""""/>"
IFvoice$<>"" qual$ += "<VOICEREQUIRED=""""NAME="+voice$+"""""/>"
PROC_callmethod(tts%,"Speak("""+qual$+phrase$+""",3)") ENDPROC Salomon
CHABI