Bug (or question) with PLAY.SETUP
Posted: Sat Oct 09, 2021 1:04 am
If I have the command "play.setup 1" at the beginning of my program (to direct PLAY output to an external DAC), is it "permanent" for the duration of the program?
Here is the program I wrote:
If I uncomment the first "play.voicerss" command, I hear "hello" as expected.
However, I need "play.setup 1" before "play.voicerss" under the "urlSpeak" label or no voice is heard.
Is there a reason for this?
Here is the program I wrote:
Note that my actual program has my VoiceRSS key, but I left it out here.i2c.setup 5, 4
oled.init 1
oled.color 1
play.setup 1
language$ = "en-gb"
voice$ = "Harry"
format$ = "44khz_16bit_mono"
key$ = "" ' removed my key
'play.voicerss "hello!", language$ + "&v=" + voice$ + "&f=" + format$, key$
onUrlMessage urlSpeak
wait
urlSpeak:
say$ = urlmsgget$("speak")
oled.cls
oled.print 0, 0, say$
play.setup 1 ' why is this necessary?
play.voicerss say$, language$ + "&v=" + voice$ + "&f=" + format$, key$
UrlMsgReturn "Message sent back " + time$
return
If I uncomment the first "play.voicerss" command, I hear "hello" as expected.
However, I need "play.setup 1" before "play.voicerss" under the "urlSpeak" label or no voice is heard.
Is there a reason for this?