{"id":24692495,"url":"https://github.com/insooeric/texttospeech","last_synced_at":"2026-04-12T03:02:57.142Z","repository":{"id":274252502,"uuid":"911907030","full_name":"insooeric/TextToSpeech","owner":"insooeric","description":"Text To Speech backend with statistics","archived":false,"fork":false,"pushed_at":"2025-01-27T21:23:24.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T02:13:37.490Z","etag":null,"topics":["backend-api","docker","dotnet-core","openai","statistics"],"latest_commit_sha":null,"homepage":"https://insooeric.github.io/#/playground","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/insooeric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-01-04T06:40:52.000Z","updated_at":"2025-03-12T20:35:53.000Z","dependencies_parsed_at":"2025-01-26T03:01:58.070Z","dependency_job_id":null,"html_url":"https://github.com/insooeric/TextToSpeech","commit_stats":null,"previous_names":["insooeric/texttospeech"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insooeric%2FTextToSpeech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insooeric%2FTextToSpeech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insooeric%2FTextToSpeech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insooeric%2FTextToSpeech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insooeric","download_url":"https://codeload.github.com/insooeric/TextToSpeech/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894318,"owners_count":20527677,"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":["backend-api","docker","dotnet-core","openai","statistics"],"created_at":"2025-01-26T20:15:30.527Z","updated_at":"2025-12-30T23:54:07.872Z","avatar_url":"https://github.com/insooeric.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Text To Speech\nA simple .NET Core Project using OpenAI and Firebase for Statistics.\n\n### DEMO LINK! =\u003e [Text To Speech](https://insooeric.github.io/#/playground#Text-To-Speech)\n---\n\n## Tables of Contents\n\n1. [Overview](#overview)\n2. [Text To Speech](#text-to-speech)\n3. [Speech To Text](#speech-to-text)\n4. [Statistics](#statistics)\n\n---\n\n## Overview\nThis project is built in .NET Core using several API endpoints:\n- `/api/tts-ai` endpoint for text to speech\n- `/api/global-statistic` endpoint for overall statistics\n- `/api/language-statistic` endpoint for statistics in selected language\n\n---\n\n## Text To Speech\nEndpoint: `/api/tts-ai`\n\n### Limitation\n- Both input text and voice type is required.\n- Input text should never exceed 40 words.\n\n### Request Body\n\n```jsonc\n{\n    \"Input\": \"Hello, My name Is Insoo Son. I'm from South Korea.\",\n    \"Voice\": \"alloy\"\n}\n```\n\n### Response\n\n**On success**\n- It returns an audio file named `speech.mp3` in Blob type.\n\n**On failiar**\n```jsonc\n{\n    \"Message\": \"Input text is required.\"\n}\n```\n\n```jsonc\n{\n    \"Message\": \"Input text exceeds the 40-word limit. Please shorten your text.\"\n}\n```\n\n```jsonc\n{\n    \"Message\": \"OpenAI API key is missing or not configured.\"\n}\n```\n\nThere may be an error caused by in sufficient credit. (meaning I would have to charge for it)\n\n---\n\n## Speech To Text\n**Note** that end point is not configured; however, I am using it for statistics purpose.\n`Middlewares/AudioAnalyzer.cs` includes a code that performs API call for speech to text.\n\n---\n\n## Statistics\n\n### Global Statistic\nEndpoint: `/api/global-statistic`\n\n#### Request Body\n- Not required\n\n#### Response\n\n**On success**\n```jsonc\n{\n   \"message\":\"Successfully retrieved global statistics.\",\n   \"data\":{\n      \"globalTotalRequests\":74,\n      \"globalTotalDuration\":179.09999895095825,\n      \"globalTotalAverageDuration\":2.4202702560940303,\n      \"globalTotalSentences\":84,\n      \"globalAverageDurationPerSentences\":2.1321428446542647,\n      \"globalToneTypeCounts\":{\n         \"alloy\":40,\n         \"echo\":6,\n         \"fable\":2,\n         \"nova\":16,\n         \"onyx\":8,\n         \"shimmer\":2\n      }\n   }\n}\n```\n\n**On failiar**\n```jsonc\n{\n  \"message\": \"Error communicating with Firebase.\",\n  \"details\": \"\u003cSpecific error goes here\u003e\"\n}\n```\n\n```jsonc\n{\n  \"message\": \"An unexpected error occurred.\",\n  \"details\": \"\u003cSpecific error goes here\u003e\"\n}\n```\n\n\n### Language Statistic\nEndpoint: `/api/language-statistic`\n\n#### Request Body\n- Not required\n\n#### Response\n\n**On success**\n```jsonc\n{\n   \"message\":\"Successfully retrieved language statistics.\",\n   \"data\":{\n      \"languages\":{\n         \"english\":{\n            \"langTotalRequest\":45,\n            \"langTotalDuration\":103.24999868869781,\n            \"langAverageDuration\":2.2944444153043957,\n            \"langTotalSentences\":52,\n            \"langAverageDurationPerSentences\":1.9855768978595734,\n            \"langToneTypeCounts\":{\n               \"alloy\":27,\n               \"echo\":6,\n               \"fable\":1,\n               \"nova\":8,\n               \"onyx\":1,\n               \"shimmer\":2\n            }\n         }\n         \"korean\":{\n            \"langTotalRequest\":26,\n            \"langTotalDuration\":66.4300000667572,\n            \"langAverageDuration\":2.5550000025675845,\n            \"langTotalSentences\":29,\n            \"langAverageDurationPerSentences\":2.2906896574743865,\n            \"langToneTypeCounts\":{\n               \"alloy\":12,\n               \"fable\":1,\n               \"nova\":7,\n               \"onyx\":6\n            }\n         },\n        ...\n      }\n   }\n}\n```\n\n\n**On failiar**\n```jsonc\n{\n  \"message\": \"Error communicating with Firebase.\",\n  \"details\": \"\u003cSpecific error goes here\u003e\"\n}\n```\n\n```jsonc\n{\n  \"message\": \"An unexpected error occurred.\",\n  \"details\": \"\u003cSpecific error goes here\u003e\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsooeric%2Ftexttospeech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsooeric%2Ftexttospeech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsooeric%2Ftexttospeech/lists"}