Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file not shown.
Binary file not shown.
Binary file added .vs/OpenVoice/v17/.wsuo
Binary file not shown.
105 changes: 105 additions & 0 deletions .vs/OpenVoice/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\spsee\\OpenVoice\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\spsee\\OpenVoice\\requirements.txt||{8B382828-6202-11D1-8870-0000F87579D2}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:requirements.txt||{8B382828-6202-11D1-8870-0000F87579D2}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\spsee\\OpenVoice\\openvoice\\openvoice_app.py||{8B382828-6202-11D1-8870-0000F87579D2}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:openvoice\\openvoice_app.py||{8B382828-6202-11D1-8870-0000F87579D2}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\spsee\\OpenVoice\\openvoice\\api.py||{8B382828-6202-11D1-8870-0000F87579D2}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:openvoice\\api.py||{8B382828-6202-11D1-8870-0000F87579D2}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\spsee\\OpenVoice\\demo_part3.ipynb||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:demo_part3.ipynb||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\spsee\\OpenVoice\\setup.py||{8B382828-6202-11D1-8870-0000F87579D2}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:setup.py||{8B382828-6202-11D1-8870-0000F87579D2}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": 0,
"Children": [
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "requirements.txt",
"DocumentMoniker": "C:\\Users\\spsee\\OpenVoice\\requirements.txt",
"RelativeDocumentMoniker": "requirements.txt",
"ToolTip": "C:\\Users\\spsee\\OpenVoice\\requirements.txt",
"RelativeToolTip": "requirements.txt",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003109|",
"WhenOpened": "2024-05-29T06:00:53.88Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "openvoice_app.py",
"DocumentMoniker": "C:\\Users\\spsee\\OpenVoice\\openvoice\\openvoice_app.py",
"RelativeDocumentMoniker": "openvoice\\openvoice_app.py",
"ToolTip": "C:\\Users\\spsee\\OpenVoice\\openvoice\\openvoice_app.py",
"RelativeToolTip": "openvoice\\openvoice_app.py",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|",
"WhenOpened": "2024-05-29T05:43:03.287Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "api.py",
"DocumentMoniker": "C:\\Users\\spsee\\OpenVoice\\openvoice\\api.py",
"RelativeDocumentMoniker": "openvoice\\api.py",
"ToolTip": "C:\\Users\\spsee\\OpenVoice\\openvoice\\api.py",
"RelativeToolTip": "openvoice\\api.py",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|",
"WhenOpened": "2024-05-29T05:42:57.701Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "demo_part3.ipynb",
"DocumentMoniker": "C:\\Users\\spsee\\OpenVoice\\demo_part3.ipynb",
"RelativeDocumentMoniker": "demo_part3.ipynb",
"ToolTip": "C:\\Users\\spsee\\OpenVoice\\demo_part3.ipynb",
"RelativeToolTip": "demo_part3.ipynb",
"ViewState": "AQIAAF0AAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|",
"WhenOpened": "2024-05-29T05:42:22.624Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "setup.py",
"DocumentMoniker": "C:\\Users\\spsee\\OpenVoice\\setup.py",
"RelativeDocumentMoniker": "setup.py",
"ToolTip": "C:\\Users\\spsee\\OpenVoice\\setup.py",
"RelativeToolTip": "setup.py",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|",
"WhenOpened": "2024-05-29T04:20:21.828Z",
"EditorCaption": ""
}
]
}
]
}
]
}
Binary file added .vs/OpenVoice/v17/TestStore/0/000.testlog
Binary file not shown.
Binary file added .vs/OpenVoice/v17/TestStore/0/testlog.manifest
Binary file not shown.
Binary file added .vs/OpenVoice/v17/workspaceFileList.bin
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
3 changes: 3 additions & 0 deletions .vs/PythonSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Interpreter": "env\\Scripts\\python.exe"
}
10 changes: 10 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ActiveTargetSystem": "WSL: Ubuntu",
"ExpandedNodes": [
"",
"\\openvoice",
"\\openvoice\\text"
],
"SelectedNode": "\\requirements.txt",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
122 changes: 107 additions & 15 deletions demo_part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "b7f043ee",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'torch'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[2], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mos\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mtorch\u001b[39;00m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mopenvoice\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m se_extractor\n\u001b[0;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mopenvoice\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mapi\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m BaseSpeakerTTS, ToneColorConverter\n",
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'torch'"
]
}
],
"source": [
"import os\n",
"import torch\n",
Expand All @@ -31,10 +43,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"id": "aacad912",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'torch' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[3], line 3\u001b[0m\n\u001b[0;32m 1\u001b[0m ckpt_base \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcheckpoints/base_speakers/EN\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m 2\u001b[0m ckpt_converter \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcheckpoints/converter\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m----> 3\u001b[0m device\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcuda:0\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m torch\u001b[38;5;241m.\u001b[39mcuda\u001b[38;5;241m.\u001b[39mis_available() \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mcpu\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 4\u001b[0m output_dir \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124moutputs\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m 6\u001b[0m base_speaker_tts \u001b[38;5;241m=\u001b[39m BaseSpeakerTTS(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/config.json\u001b[39m\u001b[38;5;124m'\u001b[39m, device\u001b[38;5;241m=\u001b[39mdevice)\n",
"\u001b[1;31mNameError\u001b[0m: name 'torch' is not defined"
]
}
],
"source": [
"ckpt_base = 'checkpoints/base_speakers/EN'\n",
"ckpt_converter = 'checkpoints/converter'\n",
Expand Down Expand Up @@ -70,10 +94,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "63ff6273",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'torch' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[4], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m source_se \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mload(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/en_default_se.pth\u001b[39m\u001b[38;5;124m'\u001b[39m)\u001b[38;5;241m.\u001b[39mto(device)\n",
"\u001b[1;31mNameError\u001b[0m: name 'torch' is not defined"
]
}
],
"source": [
"source_se = torch.load(f'{ckpt_base}/en_default_se.pth').to(device)"
]
Expand All @@ -88,10 +124,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "55105eae",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'se_extractor' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[5], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m reference_speaker \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mresources/example_reference.mp3\u001b[39m\u001b[38;5;124m'\u001b[39m \u001b[38;5;66;03m# This is the voice you want to clone\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m target_se, audio_name \u001b[38;5;241m=\u001b[39m se_extractor\u001b[38;5;241m.\u001b[39mget_se(reference_speaker, tone_color_converter, target_dir\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mprocessed\u001b[39m\u001b[38;5;124m'\u001b[39m, vad\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mTrue\u001b[39;00m)\n",
"\u001b[1;31mNameError\u001b[0m: name 'se_extractor' is not defined"
]
}
],
"source": [
"reference_speaker = 'resources/example_reference.mp3' # This is the voice you want to clone\n",
"target_se, audio_name = se_extractor.get_se(reference_speaker, tone_color_converter, target_dir='processed', vad=True)"
Expand All @@ -107,10 +155,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "73dc1259",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'output_dir' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[6], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m save_path \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00moutput_dir\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/output_en_default.wav\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;66;03m# Run the base speaker tts\u001b[39;00m\n\u001b[0;32m 4\u001b[0m text \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mThis audio is generated by OpenVoice.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
"\u001b[1;31mNameError\u001b[0m: name 'output_dir' is not defined"
]
}
],
"source": [
"save_path = f'{output_dir}/output_en_default.wav'\n",
"\n",
Expand Down Expand Up @@ -139,10 +199,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "fd022d38",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'torch' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[7], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m source_se \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mload(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/en_style_se.pth\u001b[39m\u001b[38;5;124m'\u001b[39m)\u001b[38;5;241m.\u001b[39mto(device)\n\u001b[0;32m 2\u001b[0m save_path \u001b[38;5;241m=\u001b[39m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00moutput_dir\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/output_whispering.wav\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[0;32m 4\u001b[0m \u001b[38;5;66;03m# Run the base speaker tts\u001b[39;00m\n",
"\u001b[1;31mNameError\u001b[0m: name 'torch' is not defined"
]
}
],
"source": [
"source_se = torch.load(f'{ckpt_base}/en_style_se.pth').to(device)\n",
"save_path = f'{output_dir}/output_whispering.wav'\n",
Expand Down Expand Up @@ -172,10 +244,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"id": "a71d1387",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'BaseSpeakerTTS' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[8], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m ckpt_base \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mcheckpoints/base_speakers/ZH\u001b[39m\u001b[38;5;124m'\u001b[39m\n\u001b[1;32m----> 2\u001b[0m base_speaker_tts \u001b[38;5;241m=\u001b[39m BaseSpeakerTTS(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/config.json\u001b[39m\u001b[38;5;124m'\u001b[39m, device\u001b[38;5;241m=\u001b[39mdevice)\n\u001b[0;32m 3\u001b[0m base_speaker_tts\u001b[38;5;241m.\u001b[39mload_ckpt(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/checkpoint.pth\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 5\u001b[0m source_se \u001b[38;5;241m=\u001b[39m torch\u001b[38;5;241m.\u001b[39mload(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mckpt_base\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m/zh_default_se.pth\u001b[39m\u001b[38;5;124m'\u001b[39m)\u001b[38;5;241m.\u001b[39mto(device)\n",
"\u001b[1;31mNameError\u001b[0m: name 'BaseSpeakerTTS' is not defined"
]
}
],
"source": [
"\n",
"ckpt_base = 'checkpoints/base_speakers/ZH'\n",
Expand Down Expand Up @@ -207,6 +291,14 @@
"source": [
"**Tech for good.** For people who will deploy OpenVoice for public usage: We offer you the option to add watermark to avoid potential misuse. Please see the ToneColorConverter class. **MyShell reserves the ability to detect whether an audio is generated by OpenVoice**, no matter whether the watermark is added or not."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1cb144de-9bff-4024-a474-a49dd5d6b2e4",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -228,7 +320,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
19 changes: 19 additions & 0 deletions env/Lib/site-packages/Cython-3.0.10.dist-info/COPYING.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The original Pyrex code as of 2006-04 is licensed under the following
license: "Copyright stuff: Pyrex is free of restrictions. You may use,
redistribute, modify and distribute modified versions."

------------------

Cython, which derives from Pyrex, is licensed under the Apache 2.0
Software License. More precisely, all modifications and new code
made to go from Pyrex to Cython are so licensed.

See LICENSE.txt for more details.

------------------

The output of a Cython compilation is NOT considered a derivative
work of Cython. Specifically, though the compilation process may
embed snippets of varying lengths into the final output, these
snippets, as embedded in the output, do not encumber the resulting
output with any license restrictions.
1 change: 1 addition & 0 deletions env/Lib/site-packages/Cython-3.0.10.dist-info/INSTALLER
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
Loading