Skip to content

Commit

Permalink
partial improvement, still blocked on the sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
lharries committed Apr 18, 2024
1 parent bc1dfc9 commit 9f732c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions examples/dubbing/python/create_a_dub.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,8 @@ def create_dub(
"xi-api-key": ELEVENLABS_API_KEY,
}

# response = client.dubbing.get_dubbing_project_metadata(dubbing_id=id)
# TODO: fix the get_dubbing_project_metadata, should allow for error being none
response = requests.get(
"https://api.elevenlabs.io/v1/dubbing/" + dubbing_id, headers=headers
)

if response.json()["status"] == "dubbed":
metadata = client.dubbing.get_dubbing_project_metadata(dubbing_id=dubbing_id)
if metadata.status == "dubbed":
# TODO: fix the response type of client.dubbing.get_dubbed_file
response = requests.get(
"https://api.elevenlabs.io/v1/dubbing/"
Expand All @@ -59,7 +54,7 @@ def create_dub(

return

elif response.json()["status"] == "dubbing":
elif metadata.status == "dubbing":
print("Dubbing in progress... Will check status again in 10 seconds")
time.sleep(10)
else:
Expand Down
2 changes: 1 addition & 1 deletion examples/dubbing/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elevenlabs==1.0.5
elevenlabs==1.1.2
python-dotenv==1.0.1

0 comments on commit 9f732c4

Please sign in to comment.