Topics

Text to File programme

 

Good morning my dears,

Many thanks!
I finally got a complete french version of windows 10 and installed it on one computer.
The text to voice translation programme works fine.

Once again, many thanks.

Best regards.

Salomon

2017-04-05 16:25 GMT+02:00 Richard Russell <news@...>:

On Wed, Apr 5, 2017 at 04:28 am, CHABI Salomon wrote:
Unfortunately, I need my work concerns FRENCH and not ENGLISH language.

As far as I am aware neither the supplied example program 'SPEAK.BBC' nor the examples at the Wiki are specific to English (apart from the spoken text itself!).  I would have expected them to work correctly in French if run on a PC configured for French as the main language.  Is that not what you are finding?  Or are you wanting to do French text-to-speech on a PC not configured for French as the main language?

Richard.



Richard Russell
 

On Wed, Apr 5, 2017 at 03:54 pm, CHABI Salomon wrote:
I tried this programme and got following error message :

Check in Control Panel what text-to-speech voices are installed.  It's under 'Speech Recognition... Change text-to-speech settings... Text to Speech... Voice selection'.  Are there any French voices listed there?

Richard.


 

Dear Richard,

I tried this programme and got following error message :

« PROC_callmethod failed in module c:\Program Files\BBC BASIC for Windows\lib\COMLIBA ».

 

But with the example from wiki below, everything is ok except that numbers are readed in english.

 

REM. Text-to-speech demonstration program using COMLIB

      REM. R.T.Russell, 24-Apr-2007

 

      INSTALL @lib$+"COMLIBA"

 

      ON ERROR PROC_comexit : PRINT 'REPORT$ : END

      ON CLOSE PROC_comexit : QUIT

 

      PROC_cominit

 

      Pitch% = 0

      Speed% = 0

      Voice$ = ""

 

      tts% = FN_createobject("Sapi.SpVoice")

      REPEAT

        READ phrase$

        PRINT phrase$

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

        REPEAT

          WAIT 100

          PRINT "Waiting..."

        UNTIL NOT FNisspeaking(tts%)

      UNTIL phrase$ = ""

      PROC_releaseobject(tts%)

      PROC_comexit

      END

 

      DATA "BBC BASIC for Windows is an advanced implementation of BBC BASIC for Microsoft Windows,"

      DATA "providing the programmer with a familiar language but with a modern interface."

      DATA "It combines the simplicity of BASIC with the sophistication of a structured language,"

      DATA "allowing you to write utilities and games, use sound and graphics, perform calculations"

      DATA "and create complete Windows applications."

      DATA "In short, using BBC BASIC you will be able to make your PC do what you want it to."

      DATA

 

      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

 

      DEF FNisspeaking(tts%)

      = FN_getvaluestr(tts%,"Status.RunningState") <> "1"

So I still need your help.


Salomon


2017-04-05 18:19 GMT+02:00 Richard Russell <news@...>:

On Wed, Apr 5, 2017 at 09:05 am, CHABI Salomon wrote:
My computer is configured in french.
But the programme reads the numbers for instance in english.

Interesting that the text-to-speech defaults to English, I wouldn't have expected that.  But, yes, you can try adding an explicit selection of French as the language to use:

      INSTALL @lib$+"COMLIBA"

      ON ERROR PROC_comexit : PRINT 'REPORT$ : END
      ON CLOSE PROC_comexit : QUIT

      PROC_cominit

      Pitch% = 0
      Speed% = 0
      Voice$ = ""
      Lang$ = "40C"

      REPEAT
        READ phrase$
        PRINT phrase$
        PROCspeak(phrase$,Pitch%,Speed%,Voice$,Lang$)
      UNTIL phrase$ = ""
      PROC_comexit
      END

      DATA "Parlez vous Français?"
      DATA

      DEF PROCspeak(phrase$,pitch%,speed%,voice$,lang$)
      tts% = FN_createobject("Sapi.SpVoice")
      IF tts% THEN
        LOCAL qual$
        qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"
        IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
        IF lang$<>"" qual$ += "<VOICE REQUIRED=""""LANGUAGE="+lang$+"""""/>"
        PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""")")
        PROC_releaseobject(tts%)
      ENDIF
      ENDPROC

Richard.


Richard Russell
 

On Wed, Apr 5, 2017 at 09:05 am, CHABI Salomon wrote:
My computer is configured in french.
But the programme reads the numbers for instance in english.

Interesting that the text-to-speech defaults to English, I wouldn't have expected that.  But, yes, you can try adding an explicit selection of French as the language to use:

      INSTALL @lib$+"COMLIBA"

      ON ERROR PROC_comexit : PRINT 'REPORT$ : END
      ON CLOSE PROC_comexit : QUIT

      PROC_cominit

      Pitch% = 0
      Speed% = 0
      Voice$ = ""
      Lang$ = "40C"

      REPEAT
        READ phrase$
        PRINT phrase$
        PROCspeak(phrase$,Pitch%,Speed%,Voice$,Lang$)
      UNTIL phrase$ = ""
      PROC_comexit
      END

      DATA "Parlez vous Français?"
      DATA

      DEF PROCspeak(phrase$,pitch%,speed%,voice$,lang$)
      tts% = FN_createobject("Sapi.SpVoice")
      IF tts% THEN
        LOCAL qual$
        qual$ = "<PITCH ABSMIDDLE="""""+STR$pitch%+"""""/><RATE ABSSPEED="""""+STR$speed%+"""""/>"
        IF voice$<>"" qual$ += "<VOICE REQUIRED=""""NAME="+voice$+"""""/>"
        IF lang$<>"" qual$ += "<VOICE REQUIRED=""""LANGUAGE="+lang$+"""""/>"
        PROC_callmethod(tts%, "Speak("""+qual$+phrase$+""")")
        PROC_releaseobject(tts%)
      ENDIF
      ENDPROC

Richard.

 

Dear Sir,

My computer is configured in french.
But the programme reads the numbers for instance in english.
Maybe I need to make some additional parameters configuration as to insure full french voice speech.

Salomon

Le 5 avr. 2017 3:25 PM, "Richard Russell" <news@...> a écrit :
On Wed, Apr 5, 2017 at 04:28 am, CHABI Salomon wrote:
Unfortunately, I need my work concerns FRENCH and not ENGLISH language.

As far as I am aware neither the supplied example program 'SPEAK.BBC' nor the examples at the Wiki are specific to English (apart from the spoken text itself!).  I would have expected them to work correctly in French if run on a PC configured for French as the main language.  Is that not what you are finding?  Or are you wanting to do French text-to-speech on a PC not configured for French as the main language?

Richard.


Richard Russell
 

On Wed, Apr 5, 2017 at 04:28 am, CHABI Salomon wrote:
Unfortunately, I need my work concerns FRENCH and not ENGLISH language.

As far as I am aware neither the supplied example program 'SPEAK.BBC' nor the examples at the Wiki are specific to English (apart from the spoken text itself!).  I would have expected them to work correctly in French if run on a PC configured for French as the main language.  Is that not what you are finding?  Or are you wanting to do French text-to-speech on a PC not configured for French as the main language?

Richard.


 

Dear Sirs,

I'm working on a text to voice converting programme.
I found very exciting and usefull the example in wiki.
Unfortunately, I need my work concerns FRENCH and not ENGLISH language.

Can anybody help me to find resources for French text to French voice translation?

Best regards.

Salomon CHABI