Back

[SOLVED] Uploading Audio in Python

  • 0
  • Self Hosted
  • Storage
  • Cloud
ZachHandley
30 Sep, 2023, 23:19

in Svelte they have an @ SupportPatrol tag that can be tagged to help out

TL;DR
Summary: The user was having trouble uploading audio in Python. They found a solution by using the Appwrite SDK and creating an `InputFile` Pydantic object. They also mentioned that there is currently no Python documentation available for the Appwrite API. Solution: Use the Appwrite SDK and create an `InputFile` Pydantic object to upload audio in Python. Please note that there is currently no Python documentation available for the Appwrite API.
ZachHandley
30 Sep, 2023, 23:22

Oh there's literally 0 python documentation lol

Drake
30 Sep, 2023, 23:23

Best to just wait and not tag anyone

ZachHandley
30 Sep, 2023, 23:23

copy, my apologies

ZachHandley
30 Sep, 2023, 23:24

won't happen again <:blobSalute:470705834264100886>

ZachHandley
30 Sep, 2023, 23:24

Can I create an InputFile Pydantic Object?

Drake
30 Sep, 2023, 23:24

This looks odd...you should be passing an InputFile into create_file()

ZachHandley
30 Sep, 2023, 23:24

yeah so I'm using ElevenLabs API

ZachHandley
30 Sep, 2023, 23:24

to create audio

ZachHandley
30 Sep, 2023, 23:24

and it returns bytes

ZachHandley
30 Sep, 2023, 23:25
TypeScript
class InputFile(BaseModel):
    source_type: str
    data: bytes

can I use this?

ZachHandley
30 Sep, 2023, 23:25

I made this one I didn't see Appwrite's

ZachHandley
30 Sep, 2023, 23:26

ah my dumb self I just missed the import, I assumed it was with Storage

ZachHandley
30 Sep, 2023, 23:26

my apologies

ZachHandley
30 Sep, 2023, 23:26

also the new docs don't have Python as an example

ZachHandley
30 Sep, 2023, 23:26

and technically the SDK generator could have File: InputFile instead of Any, I need to look at that again

ZachHandley
30 Sep, 2023, 23:27

sorry I haven't fixed it yet, been packed with work and moving, but finishing up a lot of stuff here soon

ZachHandley
30 Sep, 2023, 23:27

yeah I was reading

D5
1 Oct, 2023, 06:53

In my case, no issue if you pin me, but others could answer you faster meanwhile 😅

ZachHandley
1 Oct, 2023, 18:17

❤️

ZachHandley
1 Oct, 2023, 18:17

[SOLVED] Uploading Audio in Python

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more