0

Using Google Apps Script I would like to ask user for audio input through a microphone, and then save the resulting file to google drive (preferably in flac format). I can then send the file to Google Cloud Speech API and get the text.

What are the approaches I can take to get the audio file from mic?

  • What did you tried? Do you already know how to create a UI? – Rubén Jan 04 '18 at 21:39
  • I can make an HTML side bar, so presumably I could try to run a recorder interface that way. However, the sidebar limits significantly what can work in there and it doesn't work well with mobile. Perhaps there is an external app or service I can connect to? I am very new to Apps script. In Android Java I would use SpeechRecognizer which has all that built in, but I don't think that works on apps script or JavaScript, and they want you to use the cloud speech service, which doesn't have built-in recording interface. – user9173873 Jan 05 '18 at 17:12
  • Don't know if this is helpful, but I would suggest taking a look at webRTC. https://codelabs.developers.google.com/codelabs/webrtc-web/#0 – Jason Allshorn Jan 05 '18 at 19:07

1 Answers1

0

AFAIK Google Apps Script doesn't include a service that helps to get the audio from a mic but you could use an external API or with JavaScript / HTML5 by creating a UI by using the HTML Service.

Related

Rubén
  • 24,097
  • 9
  • 55
  • 116
  • Thank you. I think to work around this, I will just redo the project as an Android App, and interact with Sheets through the API. – user9173873 Jan 16 '18 at 16:37