0

Is there a way to know to detect punctuation such as periods and commas in the audio taken by Google Home or Assistant? The output text is one long sentence instead of sentences separated by periods.

I am thinking it can be found in the action package or the requests and responses of fulfillment url. The closest I found is the Google Speech-to-Text API which requires an audio file.

Thank you in advance.

Edit: I am using Actions SDK from Google Actions

1 Answers1

0

If the user does not provide the punctuation verbally you will only ever see a string of words with no punctuation.

You can instruct your users to dictate their punctuation, however.

It is not very hard. Let me show you how, by example.

Those last two sentences can be dictated:

it is not very hard period let me show you how comma by example period

That will get your desired outcome.

Mark Scheel
  • 2,963
  • 1
  • 20
  • 23
  • Is there an alternative solution? Our target audience is young children whom we are trying to improve their literacy. This may be difficult for them to say the punctuation. – Miles Chen Jun 29 '18 at 19:12
  • You can take the unpunctuated text and with custom fulfillment send it through a parser, don't know how successful that would be. Here is a tool that says it does that: https://github.com/ottokart/punctuator here is a similar question on Stack Overflow: https://stackoverflow.com/questions/31514136/how-to-add-punctuation-to-text-using-python – Mark Scheel Jun 29 '18 at 19:20
  • I see, the approach needs Google Home's text output. I aim to do it using the only Assistant itself or some configuration with it. Thanks for your help though. I appreciate it :) – Miles Chen Jun 29 '18 at 19:30