{"id":29626691,"url":"https://github.com/lenisha/personal-voice","last_synced_at":"2026-06-29T03:31:27.254Z","repository":{"id":299896010,"uuid":"992347078","full_name":"lenisha/personal-voice","owner":"lenisha","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-20T00:23:02.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-21T07:41:47.425Z","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/lenisha.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,"zenodo":null}},"created_at":"2025-05-29T02:29:10.000Z","updated_at":"2025-06-20T00:23:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"cfa636b4-ab81-4eea-8a48-baf8736f308e","html_url":"https://github.com/lenisha/personal-voice","commit_stats":null,"previous_names":["lenisha/personal-voice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lenisha/personal-voice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fpersonal-voice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fpersonal-voice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fpersonal-voice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fpersonal-voice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenisha","download_url":"https://codeload.github.com/lenisha/personal-voice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenisha%2Fpersonal-voice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34912252,"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-29T02:00:05.398Z","response_time":58,"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":"2025-07-21T07:34:51.538Z","updated_at":"2026-06-29T03:31:27.216Z","avatar_url":"https://github.com/lenisha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Personal Voice Creation Tool\n\nThis utility helps you create a personal voice using Azure AI Speech Services. It creates a voice profile that you can use for text-to-speech synthesis that sounds like your own voice.\n\n## Requirements\n\n1. An Azure Speech resource with Personal Voice feature enabled\n2. Python 3.6+ with the following libraries:\n   - `requests` for API communication\n   - `pydub` for audio conversion\n   - FFmpeg installed on your system for use by pydub for audio conversion (on Windows, run `choco install ffmpeg`)\n3. Audio files:\n   - One consent recording (clear statement giving consent to use your voice)\n   - At least two sample audio recordings of your voice (clear, high-quality recordings)\n\n## Audio Recording Requirements\n\n- Format: WAV, M4A, MP3, or other common audio formats (will be converted to the proper format automatically)\n- Consent file: Recording of you saying the required consent statement (see below)\n- Sample files: Clear recordings of your natural speech (20+ seconds each recommended)\n- Record in a quiet environment with minimal background noise\n- on Windows use Sound Recorder or Audacity to record your voice\n\n\n### Audio Format Conversion\n\nThe script will automatically convert your audio files to the required format (16-bit PCM WAV, 16kHz, mono):\n\n1. If `pydub` is installed, it will be used for the conversion\n2. If `pydub` fails or isn't available, FFmpeg will be used as a fallback\n3. If neither is available, the script will provide installation instructions\n4. Ensure you have FFmpeg installed \n  - Windows: `choco install ffmpeg` or follow https://www.geeksforgeeks.org/installation-guide/how-to-install-ffmpeg-on-windows/\n  - Linux:  `sudo apt install ffmpeg` on Linux, or download from [FFmpeg's official site](https://ffmpeg.org/download.html))\n\n## Consent Statement\n\nFor the consent recording, you should record yourself clearly saying:\n\n```\nI [state your name], am aware that [state company name] will use recordings of my voice to create and use a synthetic version of my voice.\n```\n\n## Create an Azure Speech Service\nCurrently EastUS and WestEurope regions support Personal Voice.\n\n- Create an Azure Speech resource in the Azure portal or AI Service in AI Foundry portal\n- Copy the `AZURE_SPEECH_KEY` and `AZURE_SPEECH_REGION` from the Azure portal to your environment variables or `src/.env` file\n\n\n## Create Personal Voice\n- Install the required Python packages:\n```bash\npip install -r src/requirements.txt\n```\n- Create personal voice using the provided script:\n\n```bash\n# Basic usage\npython src/create_personal_voice.py --consent /path/to/consent.wav --samples /path/to/sample1.wav /path/to/sample2.wav --name \"Your Name\" --company \"Your Company\"\n```\n\n- Advanced usage with all parameters\n```bash\npython create_personal_voice.py \\\n    --consent /path/to/consent.wav \\\n    --samples /path/to/sample1.wav /path/to/sample2.wav /path/to/sample3.wav \\\n    --name \"Your Name\" \\\n    --company \"Your Company\" \\\n    --locale \"en-US\" \\\n    --project-id \"YourProjectID\" \\\n    --consent-id \"YourConsentID\" \n```\n\n### My Example\n\n```bash\npython src\\create_personal_voice.py --consent consent2.m4a --samples sample.m4a sample2.m4a --name \"Elena Neroslavskaya\" --company \"Microsoft\"\n```\n\n- You will see similar output:\n```\n✓ Conversion successful: sample3-converted.wav\n  - Duration: 7.83 seconds\n  - Channels: 1\n  - Sample rate: 16000 Hz\n  - Sample width: 2 bytes\n\n[1/4] Creating project 'Project-xxxx'...\n✓ Project created successfully: Project-xxxx\n\n[2/4] Uploading consent for 'Elena Neroslaskaya'... from file 'consent-converted.wav'\n✓ Consent uploaded successfully: Consent-xxxx\nOperation ID: 9f24fdce-f4c5-4d87-\nMonitoring operation 9f24fdce-f4c5-4d87-a979-...\nAttempt 1/10... status code: 200\nOperation in progress: running (attempt 1/10)\nAttempt 2/10... status code: 200\n✓ Operation completed successfully\n\n[3/4] Creating personal voice 'Voice-xxx' with 3 sample(s)...\n✓ Personal voice created successfully!\n✓ Speaker Profile ID: 160faee9-0bc5-4221-8463-xxxxx\n\n[4/4] Checking status of voice 'Voice-xxx'...\nVoice Status: Running\nSpeaker Profile ID: 160faee9-0bc5-4221-8463-xxxxx\n\n============================================================\n PERSONAL VOICE DETAILS \n============================================================\nVoice ID:           Voice-xxx\nDisplay Name:       Voice-xxxx\nProject ID:         Project-xxx\nConsent ID:         Consent-xxx\nSpeaker Profile ID: 160faee9-0bc5-4221-8463-xxxxxx\nCreated:            2025-06-18 22:23:57 UTC\nLast Action:        2025-06-18 22:23:57 UTC\n============================================================\n\nTo use this voice in text-to-speech applications, use the Speaker Profile ID:\n\n160faee9-0bc5-4221-8463-xxxx\n\nExample SSML:\n\n\u003cspeak version='1.0' xmlns='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/mstts' xml:lang='en-US'\u003e\n    \u003cvoice name='DragonLatestNeural'\u003e \n        \u003cmstts:ttsembedding speakerProfileId='160faee9-0bc5-4221-8463-xxxxxx'\u003e \n            This is my personal voice created with Azure AI Speech Service.\n        \u003c/mstts:ttsembedding\u003e \n    \u003c/voice\u003e \n\u003c/speak\u003e\n\n✓ Personal Voice Creation Process Completed\nSave your Speaker Profile ID for future use: 160faee9-0bc5-4221-8463-xxxxxxx\n```\n\n## Using Your Personal Voice to Synthesize Speech\n\nOnce your personal voice is created, you'll receive a Speaker Profile ID that you can use in your text-to-speech as shown below \n\n- set `AZURE_SPEAKER_PROFILE_ID` environment variable in your `src/.env` file or pass it as a parameter in the script\n- place your text in the script file (by default it will use sample_text.txt)\n- run the script:\n\n```bash \npython src/text_to_speech.py \n```\nwill generate a file `audio/personal__output.wav` with the synthesized speech in your personal voice.\n\n- another example of using personal voice parameters\n\n```bash\npython src/text_to_speech.py --input \u003cpath to test file\u003e  --peronsl-voice \"\u003cspeaker id\u003e\" --variants\n```\nwill generate few files with various rates and pauses with the personal voice in audio folder.\n\n- Possible variants of personal voice parameters:\n```bash\n--variants \u003ctrue/false\u003e to generte multiple variants of the personal voice\n--rate \u003crate value\u003e\n--reduce-pauses \u003ctrue/false\u003e\n--input \u003cpath to text file\u003e\n--personal-voice \"\u003cspeaker id\u003e\"\n--output \u003coutput file name\u003e\n```\n\n## Improving Transcripts with OpenAI\n\nYou can use the `src/improve_trancript.py` script to enhance the accuracy and readability of your transcripts using OpenAI's language models.\n\n#### Prerequisites\n\n- An OpenAI API key set as the `AZURE_OPENAI_KEY`, `AZURE_OPENAI_ENDPOINT` and `AZURE_OPENAI_DEPLOYMENT` environment variable or in your `src/.env` file.\n- The transcript file you want to improve (plain text format recommended).\n\n#### Usage\n\nBasic usage:\n\n```bash\npython src/improve_trancript.py --input /path/to/transcript.txt --output /path/to/improved_transcript.txt\n```\n\nOptional parameters:\n\n- `--model \u003cmodel_name\u003e`: Specify the OpenAI model (default: `gpt-3.5-turbo`).\n- `--formality \u003cformality_level\u003e`: Set the formality level of the output (default: `formal`, options: `casual`, `neutral`).\n\n\nExample with all parameters:\n\n```bash\npython src/improve_trancript.py \\\n    --input transcript.txt \\\n    --output improved_transcript.txt \\\n    --model gpt-4o \n```\n\nThe improved transcript will be saved to the specified output file.\n\n\n## References\n\n- [Create a project for personal voice](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/personal-voice-create-project)\n- [Add user consent to the project](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/personal-voice-create-consent)\n- [Get a speaker profile ID](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/personal-voice-create-voice)\n- [Use personal voice in your application](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/personal-voice-how-to-use)\n- [Speech SDK documentation](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/get-started-text-to-speech)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenisha%2Fpersonal-voice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenisha%2Fpersonal-voice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenisha%2Fpersonal-voice/lists"}