{"id":16674809,"url":"https://github.com/sergix44/oddcast-tts-php","last_synced_at":"2025-04-09T20:23:40.166Z","repository":{"id":62542585,"uuid":"232377987","full_name":"sergix44/oddcast-tts-php","owner":"sergix44","description":"A PHP interface to the online Oddcast demo API.","archived":false,"fork":false,"pushed_at":"2020-11-13T18:10:23.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T22:22:55.587Z","etag":null,"topics":["oddcast","text-to-speech","tts-api","tts-engines"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/sergix44.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}},"created_at":"2020-01-07T17:24:41.000Z","updated_at":"2023-11-02T02:17:19.000Z","dependencies_parsed_at":"2022-11-02T16:16:10.238Z","dependency_job_id":null,"html_url":"https://github.com/sergix44/oddcast-tts-php","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergix44%2Foddcast-tts-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergix44%2Foddcast-tts-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergix44%2Foddcast-tts-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergix44%2Foddcast-tts-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergix44","download_url":"https://codeload.github.com/sergix44/oddcast-tts-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248105136,"owners_count":21048474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["oddcast","text-to-speech","tts-api","tts-engines"],"created_at":"2024-10-12T12:44:26.483Z","updated_at":"2025-04-09T20:23:40.125Z","avatar_url":"https://github.com/sergix44.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oddcast TTS Demo PHP library\n\nA library to interface with the online demo of Oddcast TTS engine.\n\n## Installation\n\n```\ncomposer require sergix44/oddcast-tts-php\n```\n\n## Example usage\n\nAll the voices are listed on the official Oddcast demo page: http://ttsdemo.com/\n\nEvery voice is ported in the corrisponding namespace e.g. the english voice `Julia`, is in the namespace `SergiX44/OddcastTTS/Voices/English/Julia_US.php`, and so on.\n\nThe default voice is Julia (English US)\n```php\nuse SergiX44\\OddcastTTS\\Oddcast;\n\n$tts = new Oddcast();\n$tts-\u003esetText('Hello my friend!')\n\n$url = $tts-\u003egetUrl(); // the url to the .mp3 file\n$stream = $tts-\u003egetAudio(); // the audio file\n$tts-\u003esave('path/to/file.mp3'); // save the mp3 on the filesystem\n```\nYou can easily change voice, in the main constructor:\n```php\n\nuse SergiX44\\OddcastTTS\\Oddcast;\nuse \\SergiX44\\OddcastTTS\\Voices\\Italian\\Raffaele;\n\n$tts = new Oddcast(Raffaele::class);\n$url = $tts-\u003esetText('Hello my friend!')-\u003egetUrl();\n```\nor via setter:\n```php\n\nuse SergiX44\\OddcastTTS\\Oddcast;\nuse \\SergiX44\\OddcastTTS\\Voices\\Italian\\Raffaele;\n\n$tts = new Oddcast();\n$url = $tts-\u003esetText('Hello my friend!')\n  -\u003esetVoice(Raffaele::class)\n  -\u003egetUrl(); // you can chain all the calls together\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergix44%2Foddcast-tts-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergix44%2Foddcast-tts-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergix44%2Foddcast-tts-php/lists"}