Gemini TTS API → save WAV and play it in Tasker

34 views
Skip to first unread message

Le- Ze

unread,
Mar 23, 2026, 10:01:42 AM (8 days ago) Mar 23
to Tasker

Hi, I'm trying to use Google Gemini TTS API in Tasker. The HTTP Request works fine and I get a JSON response back. The response contains base64 encoded PCM audio data. I need to:

  1. Extract the base64 from candidates[0].content.parts[0].inlineData.data
  2. Convert PCM to WAV (add header)
  3. Save as WAV file
  4. Play it

I'm using JavaScriptlet with writeFile() to save the file but it's not being created. Has anyone done this successfully? Is writeFile() the right function or is there a better way to save binary files in Tasker?
https://pastebin.com/hau0QrVE


Reply all
Reply to author
Forward
0 new messages