{"id":22930545,"url":"https://github.com/kyle-seto/heygen-translation-client","last_synced_at":"2026-06-23T04:32:15.286Z","repository":{"id":266706337,"uuid":"899096341","full_name":"Kyle-Seto/heygen-translation-client","owner":"Kyle-Seto","description":"HeyGen Video Translation Client A Python client library for interacting with HeyGen's video translation API. This library simplifies polling for job statuses with built-in exponential backoff and error handling. Designed for seamless integration into workflows requiring automated video translation.","archived":false,"fork":false,"pushed_at":"2024-12-05T18:43:38.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T14:12:56.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kyle-Seto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-05T16:03:07.000Z","updated_at":"2024-12-05T18:43:42.000Z","dependencies_parsed_at":"2025-04-01T17:20:15.039Z","dependency_job_id":"e1495fc2-2ceb-477e-98e6-c7e1f5085040","html_url":"https://github.com/Kyle-Seto/heygen-translation-client","commit_stats":null,"previous_names":["kyle-seto/heygen-translation-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kyle-Seto/heygen-translation-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2Fheygen-translation-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2Fheygen-translation-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2Fheygen-translation-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2Fheygen-translation-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kyle-Seto","download_url":"https://codeload.github.com/Kyle-Seto/heygen-translation-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kyle-Seto%2Fheygen-translation-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34675970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T10:28:41.636Z","updated_at":"2026-06-23T04:32:15.271Z","avatar_url":"https://github.com/Kyle-Seto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HeyGen Video Translation Client Library\n\nA Python client library for seamlessly interacting with HeyGen's video translation service. This library provides a simple interface to translate videos using HeyGen's AI-powered translation capabilities.\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/Kyle-Seto/heygen-translation-client.git\ncd heygen-video-translation-client\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom client import VideoTranslationClient\n\n# Initialize client (defaults to http://localhost:5000 if no URL provided)\nclient = VideoTranslationClient()\n\n# Wait for completion with exponential backoff\nfinal_status = client.poll_until_complete(\n    initial_delay=1.0,    # Start with 1 second delay\n    max_delay=30.0,       # Never wait more than 30 seconds between retries\n    max_retries=20,       # Try up to 20 times\n    timeout=300.0         # Give up after 5 minutes\n)\nprint(f\"Final status: {final_status}\")\n```\n\n### Configuration Options\n\n#### Client Configuration\n- `base_url`: API endpoint URL for the video translation service\n- `initial_delay`: Time between first retry when using poll_until_complete (in seconds)\n- `max_delay`: Maximum wait time between status checks (in seconds)\n- `max_retries`: Maximum number of retries\n- `timeout`: Maximum time to wait for completion (in seconds, None for no timeout)\n\n#### Mock Server Configuration\n\u003e Note: These configurations are only for the included mock server used for testing. They are not part of the client library and won't affect the actual HeyGen API integration.\n\n- `base_processing_time`: Base time to simulate video processing (default: 30.0 seconds)\n- `processing_time_noise`: Random variation in processing time (±seconds, default: 5.0)\n- `error_probability`: Probability of simulated translation error (0.0 to 1.0, default: 0.2)\n\nFor example, the mock server with `base_processing_time=30.0` and `processing_time_noise=5.0` will simulate processing times between 25-35 seconds.\n\n## Error Handling\n\nThe client provides several custom exceptions for better error handling:\n\n#### ValueError: \"Invalid base URL\"\n- **Cause**: The provided URL is missing a scheme (http/https) or host\n- **Solution**: Ensure the URL includes both protocol and host, e.g., `http://localhost:5000` or `https://api.heygen.com`\n\n#### VideoTranslationTimeout\n- **Cause**: Operation took longer than the specified timeout duration\n- **Solution**: \n  - Increase the `timeout` parameter in `poll_until_complete`\n  - Check server load or network connectivity\n  - If using mock server, consider increasing `base_processing_time`\n\n#### MaxRetriesExceeded\n- **Cause**: Server didn't return a final status within the maximum number of retry attempts\n- **Solution**:\n  - Increase `max_retries` parameter\n  - Adjust retry timing with `initial_delay` and `max_delay`\n  - Check server logs for potential processing issues\n\n#### Network Request Failed\n- **Cause**: Connection issues between client and server\n- **Solution**:\n  - Verify the server is running and accessible\n  - Check network connectivity\n  - Ensure firewall settings allow the connection\n  - Verify the port is correct in the base URL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-seto%2Fheygen-translation-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyle-seto%2Fheygen-translation-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyle-seto%2Fheygen-translation-client/lists"}