Official Python SDK for the Tuplets API
Project description
Tuplets Python SDK
Official Python SDK for the Tuplets API.
Installation
pip install tuplets-ai
Usage
from tuplets_ai import JobCreateParams, TupletsClient
client = TupletsClient(api_key="tb_your_api_key")
job = client.jobs.create_from_file(
"interview.mp3",
params=JobCreateParams(language="en", diarization=True),
)
final_job = client.jobs.wait(job.id)
if final_job.status == "completed":
transcript = client.jobs.download_result(job.id)
print(transcript["text"])
Direct Uploads
from tuplets_ai import JobCreateParams, TupletsClient
client = TupletsClient(api_key="tb_your_api_key")
upload = client.uploads.create_target(
filename="large-audio.wav",
size=12_000_000,
content_type="audio/wav",
)
client.uploads.upload_file(upload, "large-audio.wav")
job = client.jobs.create_from_uploaded_audio(
object_key=upload.object_key,
upload_token=upload.upload_token,
params=JobCreateParams(language="en", transcription_model="premium"),
)
Async Usage
from tuplets_ai import AsyncTupletsClient, JobCreateParams
async def main() -> None:
async with AsyncTupletsClient(api_key="tb_your_api_key") as client:
job = await client.jobs.create_from_url(
"https://storage.example.com/call.mp3",
params=JobCreateParams(language="en", pii_processing=True),
)
final_job = await client.jobs.wait(job.id)
if final_job.status == "completed":
transcript = await client.jobs.download_result(job.id)
print(transcript["text"])
Supported Resources
client.jobsfor transcription job submission, polling, cancellation, and result downloadclient.uploadsfor signed browser/direct upload targetsclient.solutionsfor public solutions inquiries
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tuplets_ai-0.1.0.tar.gz
(7.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tuplets_ai-0.1.0.tar.gz.
File metadata
- Download URL: tuplets_ai-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c499b843417b51a7447c3bcd793dc160b6a4e9a5c012e2c428b0fa4478f09ff5
|
|
| MD5 |
277091a16c025e59a67a53d974a28cdd
|
|
| BLAKE2b-256 |
b7e22b0d40e89c51dd7db484afa2ac4079ef0f88e4bcaaa9641ba111977ec08e
|
File details
Details for the file tuplets_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tuplets_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02ccada61f69a57ac5463b213866d7121afa9ddd5759fa2ce082844ec70ebc2c
|
|
| MD5 |
18f1a0510484d222c49134ea5a8c4b68
|
|
| BLAKE2b-256 |
206bb64943a5b341fb6c8cb3b9e9fe703c303a59695742a5d95da73ac5b628c3
|