… | |
… | |
45 | import android.content.res.Configuration; |
45 | import android.content.res.Configuration; |
46 | import android.os.Bundle; |
46 | import android.os.Bundle; |
47 | import android.os.Message; |
47 | import android.os.Message; |
48 | import android.speech.tts.TextToSpeech; |
48 | import android.speech.tts.TextToSpeech; |
49 | import android.util.Log; |
49 | import android.util.Log; |
|
|
50 | import android.view.View; |
50 | |
51 | |
51 | // new TTS, this is used now! |
52 | // new TTS, this is used now! |
52 | public class NavitSpeech2 implements TextToSpeech.OnInitListener, NavitActivityResult |
53 | public class NavitSpeech2 implements TextToSpeech.OnInitListener, NavitActivityResult |
53 | { |
54 | { |
54 | private static TextToSpeech mTts; |
55 | private static TextToSpeech mTts; |
… | |
… | |
226 | try |
227 | try |
227 | { |
228 | { |
228 | if (mTts != null) |
229 | if (mTts != null) |
229 | { |
230 | { |
230 | mTts.speak(what, TextToSpeech.QUEUE_FLUSH, null); |
231 | mTts.speak(what, TextToSpeech.QUEUE_FLUSH, null); |
|
|
232 | if (NavitGraphics.NavitMsgTv2_.getVisibility() == View.VISIBLE) |
|
|
233 | { |
|
|
234 | Navit.N_NavitGraphics.NavitMsgTv2_.append("SAY:" + what + "\n"); |
|
|
235 | } |
|
|
236 | if (Navit.PREF_show_debug_messages) |
|
|
237 | { |
231 | Navit.set_debug_messages3(what); |
238 | Navit.set_debug_messages3(what); |
|
|
239 | } |
232 | } |
240 | } |
233 | } |
241 | } |
234 | catch (Exception e) |
242 | catch (Exception e) |
235 | { |
243 | { |
236 | e.printStackTrace(); |
244 | e.printStackTrace(); |