#I was able to access the file outside
1 messages · Page 1 of 1 (latest)
From looking in the documentation at https://elevenlabs.io/docs/api-reference/add-project
It looks like you need to include it in the "from_url" parameter.
from_url
string
An optional URL from which we will extract content to initialize the project. If this is set, 'from_url' must be null. If neither 'from_url' or 'from_document' are provided we will initialize the project as blank.
I read the Document.Just wanted to know how to pass text file url in which parametere
I tried passing firesbase storage url. Its saying not able to read the content.
And if you have done that and got
{"detail":{"status":"invalid_url","message":"The URL 'https://firebasestorage.googleapis.com/xxxxxxx/arabic.pdf?alt=media&token=dc91a0ee-2524-4d1b-9f94-065f9bb0e8a7' is either invalid or content cannot be extracted out of it."}}
The I assume there is some permission issue and the ElevenLabs APi cant access the data in the URL. I guess you'd have to try a different method. Or reach out to support at https://help.elevenlabs.io/hc/en-us/requests/new and see if they have a solution
or maybe @vale seal has some input
I tried passing this url as well https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
and you get the same error?
Yes
that's what I was going to suggest trying, actually, a URL that doesn't require auth
hm
I tried it using Elevenlabs Website as well. Same issue there. Not sure how to pass text content file.
interesting
They have another option to attach a file, which i tried and works fine. But API allows only URL passing
let me see if I've got a pdf to try this with
Ok sure
@twin ingot How about a URL that contains a different format to see if the issue is confined just to pdf files? Try an .epub or .txt and see if it works
I tried for txt file as well, same issue. I tried contacting Support team, they havent reponded.
Does anyone here from Elevenlabs?
that's actually what I was testing right now
txt works
pdf I cannot get to work no matter what URL I use
and that's using the same file host
Passing txt file URL?
yes
I am using the site as I do not have access to the API, but the site just calls the API so it should be the same
Possible to share the request body from the API?
Did you attach a txt file?
Attaching file worked for me
I was referring to passing URL
I did the following:
-Got a txt and a pdf file
-Tested uploading them directly to the site
-Tested uploading them to a third party file host and passing the URL
The TXT file works regardless of whether it's uploaded directly or put in as a URL.
The PDF file only works if it's uploaded directly.
so the problem seems to be specific to PDF files as URLs
since I used the same file host for both the txt and pdf urls, it shouldn't be a problem with that website
Here are the files (and the corresponding links, which expire in 60 minutes) that I used for testing
https://tmpfiles.org/dl/3311858/dummy-txt.txt
https://tmpfiles.org/dl/3311856/dummy.pdf
I'm gonna report this to elevenlabs proper since this screams bug
Ok i will try passing the txt url now
This url worked for me. Is there any problem if i pass Firebase txt file url?
Thanks @vale seal
There shouldn't be any issues - I would say try it, then we know for sure if it's just something to do with the file type
Ok sure, Btw there is no way we can pass plain text in the Project API right?
you mean directly uploading a txt file?
No, passing the content as string
Well, passing the content as a string, no
this is not accurate by the way
the API does allow uploading files directly
without having to pass URLs
I was able to get a file from Google Drive "somewhat" imported. It at least read the file, it only found the title of the pdf but it was able to access it. I don't have time to play around much right now but it's "doable" at least..
Can i get sample code in javascript? I wasnt able to figure out how to pass local text file in the JS request
@vale seal @rugged briar I would appreciate your help
https://stackoverflow.com/questions/36067767/how-do-i-upload-a-file-with-the-js-fetch-api
This is just a very generic example