• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Speech synthesis API in android

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
im trying to add a voice-based chatbot URL in android's webview.
currently, I can able to provide voice input to the same, but in return,
I'm not able to get voice output, the URL is working as expected in the android chrome browser.
the only problem facing with a webview. URL uses the Speech Synthesis API.
any solution for this?.   or any other speech synthesis API works with the webview.
 
Saloon Keeper
Posts: 7094
165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why WebView? It's severely limited in how far it can interact with the device; I doubt that there is a voice input/output solution that works with it.

If the web site that is displayed in the WebView is under your control, you can use a JavaScript interface to send the text to speak to native code in your app, and then use Android's speech synthesis API to speak it.
 
Ranch Hand
Posts: 82
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Speechly has a great free tier. You should check out Speechly | Spoken language understanding API for developers

Speechly is actually more than speech recognition API: it returns with the actual transcript but also with the user intent and entities. This helps to build complex voice user interfaces, because, for any task, there’s an almost unlimited way of saying that in natural language; for example “switch off the kitchen light”, “turn off the kitchen light”, “make kitchen dark” all share the same intent (turn_off_lights) and the same entity (kitchen).

If you would only use speech recognition, you’d need to make some kind of grep for all those different utterances and copypaste it for every room. With Speechly, the API would return something like
INTENT: turn_off_lights
ENTITY: kitchen(room)

I hope this will help you
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic