S SimonInCanada Member Licensed User Longtime User Jun 26, 2020 #1 Hi The original TTS Example compiles and runs okay using TTS V1.0. When I try to include TTS in my own app using the example as a model, I get the compiler error "Input string was not in a correct format." on the line where I call TSS1.Speak; e.g. Dim S as String S = "Welcome!" TSS1.Speak(S, True) That is the ONLY error information and I don't know what it means. I tried, as in the example, adding an EditText view and setting similar properties to the example then some text, then feeding this to TSS1.Speak like the example does but this gives the same error.
Hi The original TTS Example compiles and runs okay using TTS V1.0. When I try to include TTS in my own app using the example as a model, I get the compiler error "Input string was not in a correct format." on the line where I call TSS1.Speak; e.g. Dim S as String S = "Welcome!" TSS1.Speak(S, True) That is the ONLY error information and I don't know what it means. I tried, as in the example, adding an EditText view and setting similar properties to the example then some text, then feeding this to TSS1.Speak like the example does but this gives the same error.
JohnC Expert Licensed User Longtime User Jun 26, 2020 #2 In the sample you uploaded: B4X: TTS1.Speak(EditText1.Text , True); You have a trailing semi-colon ( ; ) at the end of the line - just remove it and it should work. I'm guessing the trailing semicolon is a force of habit from java Upvote 0
In the sample you uploaded: B4X: TTS1.Speak(EditText1.Text , True); You have a trailing semi-colon ( ; ) at the end of the line - just remove it and it should work. I'm guessing the trailing semicolon is a force of habit from java
S SimonInCanada Member Licensed User Longtime User Jun 26, 2020 #3 JohnC said: In the sample you uploaded: B4X: TTS1.Speak(EditText1.Text , True); You have a trailing semi-colon ( ; ) at the end of the line - just remove it and it should work. I'm guessing the trailing semicolon is a force of habit from java Click to expand... You are quite right about the semicolon. What a clot! Actually, in this case this project consists of two embedded devices programmed in C, plus this app in B4A. Thanks again and sorry for wasting everybody's time! Upvote 0
JohnC said: In the sample you uploaded: B4X: TTS1.Speak(EditText1.Text , True); You have a trailing semi-colon ( ; ) at the end of the line - just remove it and it should work. I'm guessing the trailing semicolon is a force of habit from java Click to expand... You are quite right about the semicolon. What a clot! Actually, in this case this project consists of two embedded devices programmed in C, plus this app in B4A. Thanks again and sorry for wasting everybody's time!