Priyank Bolia
Priyank Bolia

Reputation: 14449

Can we use Android TTS from web pages?

How do I use Android TTS API's from the web page?

Upvotes: 4

Views: 5456

Answers (1)

Roman Nurik
Roman Nurik

Reputation: 29745

You can't in the Android Browser, but you can in a WebView packaged in your app (as fiXedd alluded to).

Look into WebView#addJavascriptInterface for details on how you can expose a shim between a WebView and a Java class (which could expose TTS functions).

Upvotes: 5

Related Questions