Skip to content

How do I use EASY API to send PTT audio from local file system #2661

Answered by smashah
ahmeaqas asked this question in Q&A
Discussion options

You must be logged in to vote

@HobbytronicsPK thanks.

data:audio/mpeg; is a mimetype that is prepended to a base64 encoded string of the file, not the file reference.

reference the file directly, e.g:

{ "args": { "to": "[email protected]", "file": "/home/user/downloads/aFile.mp3" } }

Or use a Direct Download URL

{ "args": { "to": "[email protected]", "file": "https://somewebsite.com/aFile.mp3" } }

or use https://base64.guru/ to convert your file to a DataURL and use that for the file property.

Make sure to use sendPtt

I just noticed that this is on the docker repo.

Unless you've mounted your host machines download folder onto the container as a volume, I would suggest just uploading it somewhere and using direct downloa…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ahmeaqas
Comment options

Answer selected by smashah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2660 on April 14, 2022 01:40.