omnivoice-server 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omnivoice_server-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- omnivoice_server-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +124 -0
- omnivoice_server-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- omnivoice_server-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +78 -0
- omnivoice_server-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +27 -0
- omnivoice_server-0.1.0/.github/SETUP_METADATA.md +67 -0
- omnivoice_server-0.1.0/.github/repo-metadata.md +26 -0
- omnivoice_server-0.1.0/.github/workflows/ci.yml +37 -0
- omnivoice_server-0.1.0/.github/workflows/publish.yml +42 -0
- omnivoice_server-0.1.0/.gitignore +37 -0
- omnivoice_server-0.1.0/CHANGELOG.md +53 -0
- omnivoice_server-0.1.0/CONTRIBUTING.md +39 -0
- omnivoice_server-0.1.0/Dockerfile +46 -0
- omnivoice_server-0.1.0/LICENSE +21 -0
- omnivoice_server-0.1.0/PKG-INFO +664 -0
- omnivoice_server-0.1.0/PUBLISH_READINESS_FINAL.md +104 -0
- omnivoice_server-0.1.0/PYPI_PUBLISH_CHECKLIST.md +118 -0
- omnivoice_server-0.1.0/README.md +625 -0
- omnivoice_server-0.1.0/SECURITY.md +58 -0
- omnivoice_server-0.1.0/benchmarks/results/cpu_step32.csv +6 -0
- omnivoice_server-0.1.0/benchmarks/results/cpu_step8.csv +6 -0
- omnivoice_server-0.1.0/benchmarks/results/report.md +23 -0
- omnivoice_server-0.1.0/benchmarks/run_benchmark.py +284 -0
- omnivoice_server-0.1.0/benchmarks/sample_ref.wav +0 -0
- omnivoice_server-0.1.0/docker-compose.yml +45 -0
- omnivoice_server-0.1.0/docs/README.md +30 -0
- omnivoice_server-0.1.0/docs/architecture/README.md +29 -0
- omnivoice_server-0.1.0/docs/architecture/overview.md +535 -0
- omnivoice_server-0.1.0/docs/design/README.md +13 -0
- omnivoice_server-0.1.0/docs/design/dataflow.md +282 -0
- omnivoice_server-0.1.0/docs/plan/README.md +9 -0
- omnivoice_server-0.1.0/docs/roadmap/README.md +9 -0
- omnivoice_server-0.1.0/docs/system/README.md +14 -0
- omnivoice_server-0.1.0/docs/system/ecosystem.md +286 -0
- omnivoice_server-0.1.0/docs/system/specification.md +2649 -0
- omnivoice_server-0.1.0/docs/verification/CRITICAL_FINDINGS.md +145 -0
- omnivoice_server-0.1.0/docs/verification/FINAL_VERIFICATION.md +167 -0
- omnivoice_server-0.1.0/docs/verification/MPS_ISSUE.md +84 -0
- omnivoice_server-0.1.0/docs/verification/README_SECTION.md +49 -0
- omnivoice_server-0.1.0/docs/verification/VERIFICATION_RESULTS.md +167 -0
- omnivoice_server-0.1.0/examples/curl_examples.sh +185 -0
- omnivoice_server-0.1.0/examples/python_client.py +300 -0
- omnivoice_server-0.1.0/examples/streaming_player.py +116 -0
- omnivoice_server-0.1.0/omnivoice_server/__init__.py +3 -0
- omnivoice_server-0.1.0/omnivoice_server/__main__.py +3 -0
- omnivoice_server-0.1.0/omnivoice_server/app.py +105 -0
- omnivoice_server-0.1.0/omnivoice_server/cli.py +114 -0
- omnivoice_server-0.1.0/omnivoice_server/config.py +122 -0
- omnivoice_server-0.1.0/omnivoice_server/routers/__init__.py +1 -0
- omnivoice_server-0.1.0/omnivoice_server/routers/health.py +37 -0
- omnivoice_server-0.1.0/omnivoice_server/routers/models.py +81 -0
- omnivoice_server-0.1.0/omnivoice_server/routers/speech.py +269 -0
- omnivoice_server-0.1.0/omnivoice_server/routers/voices.py +213 -0
- omnivoice_server-0.1.0/omnivoice_server/services/__init__.py +1 -0
- omnivoice_server-0.1.0/omnivoice_server/services/inference.py +185 -0
- omnivoice_server-0.1.0/omnivoice_server/services/metrics.py +48 -0
- omnivoice_server-0.1.0/omnivoice_server/services/model.py +102 -0
- omnivoice_server-0.1.0/omnivoice_server/services/profiles.py +117 -0
- omnivoice_server-0.1.0/omnivoice_server/utils/__init__.py +1 -0
- omnivoice_server-0.1.0/omnivoice_server/utils/audio.py +99 -0
- omnivoice_server-0.1.0/omnivoice_server/utils/text.py +90 -0
- omnivoice_server-0.1.0/pyproject.toml +75 -0
- omnivoice_server-0.1.0/tests/conftest.py +86 -0
- omnivoice_server-0.1.0/tests/test_clone.py +27 -0
- omnivoice_server-0.1.0/tests/test_health.py +23 -0
- omnivoice_server-0.1.0/tests/test_speech.py +64 -0
- omnivoice_server-0.1.0/tests/test_streaming.py +107 -0
- omnivoice_server-0.1.0/tests/test_voices.py +79 -0
- omnivoice_server-0.1.0/voice_samples/INDEX.md +20 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Describe the bug
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
## To Reproduce
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
1.
|
|
15
|
+
2.
|
|
16
|
+
3.
|
|
17
|
+
|
|
18
|
+
## Expected behavior
|
|
19
|
+
A clear and concise description of what you expected to happen.
|
|
20
|
+
|
|
21
|
+
## Environment
|
|
22
|
+
- OS: [e.g., macOS 13.0, Ubuntu 22.04]
|
|
23
|
+
- Python version: [e.g., 3.10.8]
|
|
24
|
+
- Device: [e.g., CPU, CUDA, MPS]
|
|
25
|
+
- omnivoice-server version: [e.g., 0.1.0]
|
|
26
|
+
|
|
27
|
+
## Logs
|
|
28
|
+
```
|
|
29
|
+
Paste relevant logs here
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Additional context
|
|
33
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug or unexpected behavior
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to report a bug! Please fill out the form below.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Bug Description
|
|
15
|
+
description: A clear description of what the bug is
|
|
16
|
+
placeholder: When I try to..., the server...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: steps
|
|
22
|
+
attributes:
|
|
23
|
+
label: Steps to Reproduce
|
|
24
|
+
description: Steps to reproduce the behavior
|
|
25
|
+
placeholder: |
|
|
26
|
+
1. Start server with `omnivoice-server --device cpu`
|
|
27
|
+
2. Send request to `/v1/audio/speech`
|
|
28
|
+
3. See error...
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: expected
|
|
34
|
+
attributes:
|
|
35
|
+
label: Expected Behavior
|
|
36
|
+
description: What you expected to happen
|
|
37
|
+
placeholder: The server should return a WAV file
|
|
38
|
+
validations:
|
|
39
|
+
required: true
|
|
40
|
+
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: actual
|
|
43
|
+
attributes:
|
|
44
|
+
label: Actual Behavior
|
|
45
|
+
description: What actually happened (include error messages)
|
|
46
|
+
placeholder: |
|
|
47
|
+
Error: ...
|
|
48
|
+
Traceback: ...
|
|
49
|
+
validations:
|
|
50
|
+
required: true
|
|
51
|
+
|
|
52
|
+
- type: input
|
|
53
|
+
id: version
|
|
54
|
+
attributes:
|
|
55
|
+
label: omnivoice-server Version
|
|
56
|
+
description: Output of `omnivoice-server --version` or git commit hash
|
|
57
|
+
placeholder: "0.1.0"
|
|
58
|
+
validations:
|
|
59
|
+
required: true
|
|
60
|
+
|
|
61
|
+
- type: dropdown
|
|
62
|
+
id: os
|
|
63
|
+
attributes:
|
|
64
|
+
label: Operating System
|
|
65
|
+
options:
|
|
66
|
+
- Linux
|
|
67
|
+
- macOS
|
|
68
|
+
- Windows
|
|
69
|
+
- Other
|
|
70
|
+
validations:
|
|
71
|
+
required: true
|
|
72
|
+
|
|
73
|
+
- type: input
|
|
74
|
+
id: python
|
|
75
|
+
attributes:
|
|
76
|
+
label: Python Version
|
|
77
|
+
description: Output of `python --version`
|
|
78
|
+
placeholder: "3.10.12"
|
|
79
|
+
validations:
|
|
80
|
+
required: true
|
|
81
|
+
|
|
82
|
+
- type: dropdown
|
|
83
|
+
id: device
|
|
84
|
+
attributes:
|
|
85
|
+
label: Device
|
|
86
|
+
description: What device are you using for inference?
|
|
87
|
+
options:
|
|
88
|
+
- CPU
|
|
89
|
+
- CUDA (NVIDIA GPU)
|
|
90
|
+
- MPS (Apple Silicon)
|
|
91
|
+
- Other
|
|
92
|
+
validations:
|
|
93
|
+
required: true
|
|
94
|
+
|
|
95
|
+
- type: textarea
|
|
96
|
+
id: config
|
|
97
|
+
attributes:
|
|
98
|
+
label: Configuration
|
|
99
|
+
description: Relevant configuration (CLI flags, environment variables)
|
|
100
|
+
placeholder: |
|
|
101
|
+
--device cpu
|
|
102
|
+
--num-step 32
|
|
103
|
+
OMNIVOICE_API_KEY=...
|
|
104
|
+
validations:
|
|
105
|
+
required: false
|
|
106
|
+
|
|
107
|
+
- type: textarea
|
|
108
|
+
id: logs
|
|
109
|
+
attributes:
|
|
110
|
+
label: Server Logs
|
|
111
|
+
description: Relevant server logs (if applicable)
|
|
112
|
+
placeholder: Paste logs here
|
|
113
|
+
render: shell
|
|
114
|
+
validations:
|
|
115
|
+
required: false
|
|
116
|
+
|
|
117
|
+
- type: textarea
|
|
118
|
+
id: additional
|
|
119
|
+
attributes:
|
|
120
|
+
label: Additional Context
|
|
121
|
+
description: Any other context about the problem
|
|
122
|
+
placeholder: This started happening after...
|
|
123
|
+
validations:
|
|
124
|
+
required: false
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Is your feature request related to a problem?
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
## Describe the solution you'd like
|
|
13
|
+
A clear and concise description of what you want to happen.
|
|
14
|
+
|
|
15
|
+
## Describe alternatives you've considered
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
## Additional context
|
|
19
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for suggesting a feature! Please describe what you'd like to see.
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem Statement
|
|
15
|
+
description: What problem does this feature solve? (optional)
|
|
16
|
+
placeholder: I'm frustrated when...
|
|
17
|
+
validations:
|
|
18
|
+
required: false
|
|
19
|
+
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: solution
|
|
22
|
+
attributes:
|
|
23
|
+
label: Proposed Solution
|
|
24
|
+
description: Describe the feature you'd like to see
|
|
25
|
+
placeholder: I'd like the server to support...
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: use-case
|
|
31
|
+
attributes:
|
|
32
|
+
label: Use Case
|
|
33
|
+
description: How would you use this feature?
|
|
34
|
+
placeholder: |
|
|
35
|
+
I want to build an app that...
|
|
36
|
+
This feature would allow me to...
|
|
37
|
+
validations:
|
|
38
|
+
required: true
|
|
39
|
+
|
|
40
|
+
- type: textarea
|
|
41
|
+
id: alternatives
|
|
42
|
+
attributes:
|
|
43
|
+
label: Alternatives Considered
|
|
44
|
+
description: Have you considered any alternative solutions or workarounds?
|
|
45
|
+
placeholder: I tried using... but it doesn't work because...
|
|
46
|
+
validations:
|
|
47
|
+
required: false
|
|
48
|
+
|
|
49
|
+
- type: dropdown
|
|
50
|
+
id: priority
|
|
51
|
+
attributes:
|
|
52
|
+
label: Priority
|
|
53
|
+
description: How important is this feature to you?
|
|
54
|
+
options:
|
|
55
|
+
- Nice to have
|
|
56
|
+
- Would be helpful
|
|
57
|
+
- Important for my use case
|
|
58
|
+
- Blocking my project
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
|
|
62
|
+
- type: checkboxes
|
|
63
|
+
id: contribution
|
|
64
|
+
attributes:
|
|
65
|
+
label: Contribution
|
|
66
|
+
description: Would you be willing to contribute this feature?
|
|
67
|
+
options:
|
|
68
|
+
- label: I'm willing to submit a PR for this feature
|
|
69
|
+
required: false
|
|
70
|
+
|
|
71
|
+
- type: textarea
|
|
72
|
+
id: additional
|
|
73
|
+
attributes:
|
|
74
|
+
label: Additional Context
|
|
75
|
+
description: Any other context, screenshots, or examples
|
|
76
|
+
placeholder: Here's a mockup of what I'm thinking...
|
|
77
|
+
validations:
|
|
78
|
+
required: false
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Brief description of the changes in this PR.
|
|
3
|
+
|
|
4
|
+
## Type of Change
|
|
5
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
6
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
7
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
8
|
+
- [ ] Documentation update
|
|
9
|
+
|
|
10
|
+
## How Has This Been Tested?
|
|
11
|
+
Describe the tests you ran to verify your changes.
|
|
12
|
+
|
|
13
|
+
- [ ] Test A
|
|
14
|
+
- [ ] Test B
|
|
15
|
+
|
|
16
|
+
## Checklist
|
|
17
|
+
- [ ] My code follows the style guidelines of this project
|
|
18
|
+
- [ ] I have performed a self-review of my own code
|
|
19
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
20
|
+
- [ ] I have made corresponding changes to the documentation
|
|
21
|
+
- [ ] My changes generate no new warnings
|
|
22
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
23
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
24
|
+
- [ ] Any dependent changes have been merged and published
|
|
25
|
+
|
|
26
|
+
## Related Issues
|
|
27
|
+
Closes #(issue number)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# How to Add Repository Metadata on GitHub
|
|
2
|
+
|
|
3
|
+
After pushing your commits, go to your GitHub repository and add the following metadata:
|
|
4
|
+
|
|
5
|
+
## 1. Repository Description
|
|
6
|
+
|
|
7
|
+
Go to: `https://github.com/maemreyo/omnivoice-server`
|
|
8
|
+
|
|
9
|
+
Click the ⚙️ (Settings) icon next to "About" on the right sidebar, then add:
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
```
|
|
13
|
+
OpenAI-compatible TTS server for OmniVoice - Zero-shot voice cloning and multi-language text-to-speech
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Website:**
|
|
17
|
+
```
|
|
18
|
+
https://github.com/maemreyo/omnivoice-server
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 2. Repository Topics
|
|
22
|
+
|
|
23
|
+
In the same "About" settings dialog, add these topics (click "Add topics"):
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
text-to-speech
|
|
27
|
+
tts
|
|
28
|
+
voice-cloning
|
|
29
|
+
omnivoice
|
|
30
|
+
openai-compatible
|
|
31
|
+
fastapi
|
|
32
|
+
pytorch
|
|
33
|
+
python
|
|
34
|
+
speech-synthesis
|
|
35
|
+
ai
|
|
36
|
+
machine-learning
|
|
37
|
+
voice-synthesis
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## 3. Social Preview Image (Optional)
|
|
41
|
+
|
|
42
|
+
Go to: `Settings` → `General` → `Social preview`
|
|
43
|
+
|
|
44
|
+
Upload an image (1280x640px recommended):
|
|
45
|
+
- Use a waveform visualization of the voice samples
|
|
46
|
+
- Or use the OmniVoice logo
|
|
47
|
+
- Or create a simple banner with "OmniVoice Server" text
|
|
48
|
+
|
|
49
|
+
## 4. Repository Settings
|
|
50
|
+
|
|
51
|
+
While in Settings, also verify:
|
|
52
|
+
- ✅ Issues enabled
|
|
53
|
+
- ✅ Discussions enabled (optional, for community Q&A)
|
|
54
|
+
- ✅ Wiki disabled (use docs/ instead)
|
|
55
|
+
- ✅ Projects disabled (unless needed)
|
|
56
|
+
|
|
57
|
+
## Result
|
|
58
|
+
|
|
59
|
+
After adding metadata, your repository will show:
|
|
60
|
+
- Description in search results
|
|
61
|
+
- Topics as clickable tags
|
|
62
|
+
- Social preview when shared on social media
|
|
63
|
+
- Better discoverability on GitHub
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
**Note**: These settings are stored on GitHub's servers, not in git, so they must be configured through the web interface.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Repository Metadata
|
|
2
|
+
|
|
3
|
+
This file contains metadata for the GitHub repository.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
OpenAI-compatible TTS server for OmniVoice - Zero-shot voice cloning and multi-language text-to-speech
|
|
7
|
+
|
|
8
|
+
## Topics
|
|
9
|
+
- text-to-speech
|
|
10
|
+
- tts
|
|
11
|
+
- voice-cloning
|
|
12
|
+
- omnivoice
|
|
13
|
+
- openai-compatible
|
|
14
|
+
- fastapi
|
|
15
|
+
- pytorch
|
|
16
|
+
- python
|
|
17
|
+
- speech-synthesis
|
|
18
|
+
- ai
|
|
19
|
+
- machine-learning
|
|
20
|
+
- voice-synthesis
|
|
21
|
+
|
|
22
|
+
## Website
|
|
23
|
+
https://github.com/maemreyo/omnivoice-server
|
|
24
|
+
|
|
25
|
+
## Social Preview
|
|
26
|
+
Use one of the voice sample waveforms or the OmniVoice logo
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: "3.12"
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: |
|
|
19
|
+
pip install ruff
|
|
20
|
+
- name: Run ruff
|
|
21
|
+
run: ruff check omnivoice_server/ tests/
|
|
22
|
+
|
|
23
|
+
test:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
strategy:
|
|
26
|
+
matrix:
|
|
27
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
- uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
pip install -e ".[dev]"
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: pytest tests/ -v
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write # Required for trusted publishing
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
name: Publish to PyPI
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.10'
|
|
23
|
+
|
|
24
|
+
- name: Install build dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install build hatchling
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: python -m build
|
|
31
|
+
|
|
32
|
+
- name: Publish to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
with:
|
|
35
|
+
# Uses OIDC trusted publishing - no API token needed
|
|
36
|
+
# Configure at: https://pypi.org/manage/account/publishing/
|
|
37
|
+
# Publisher: GitHub
|
|
38
|
+
# Owner: maemreyo
|
|
39
|
+
# Repository: omnivoice-server
|
|
40
|
+
# Workflow: publish.yml
|
|
41
|
+
# Environment: (leave blank)
|
|
42
|
+
verbose: true
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
**/__pycache__/**
|
|
2
|
+
.omc
|
|
3
|
+
|
|
4
|
+
# Environment and secrets
|
|
5
|
+
.env
|
|
6
|
+
.env.local
|
|
7
|
+
*.env
|
|
8
|
+
|
|
9
|
+
# Python
|
|
10
|
+
*.pyc
|
|
11
|
+
*.pyo
|
|
12
|
+
*.pyd
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.so
|
|
15
|
+
*.egg
|
|
16
|
+
*.egg-info/
|
|
17
|
+
dist/
|
|
18
|
+
build/
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
|
|
22
|
+
# IDE
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
*.swp
|
|
26
|
+
*.swo
|
|
27
|
+
|
|
28
|
+
# OS
|
|
29
|
+
.DS_Store
|
|
30
|
+
Thumbs.db
|
|
31
|
+
|
|
32
|
+
# Temporary files
|
|
33
|
+
*.tmp
|
|
34
|
+
*.log
|
|
35
|
+
|
|
36
|
+
# Voice samples (stored in GitHub Releases)
|
|
37
|
+
voice_samples/*.wav
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-04-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial release of omnivoice-server
|
|
15
|
+
- OpenAI-compatible TTS API (`/v1/audio/speech`)
|
|
16
|
+
- Three voice modes:
|
|
17
|
+
- Auto: Model selects voice automatically
|
|
18
|
+
- Design: Specify voice attributes (gender, age, accent, etc.)
|
|
19
|
+
- Clone: Voice cloning from reference audio
|
|
20
|
+
- Voice profile management API (`/v1/voices/profiles`)
|
|
21
|
+
- Create, read, update, delete voice cloning profiles
|
|
22
|
+
- Persistent storage for reusable voice profiles
|
|
23
|
+
- One-shot voice cloning endpoint (`/v1/audio/speech/clone`)
|
|
24
|
+
- Streaming synthesis support (sentence-level chunking)
|
|
25
|
+
- Model listing endpoint (`/v1/models`)
|
|
26
|
+
- Health check endpoint (`/health`)
|
|
27
|
+
- Metrics endpoint (`/metrics`)
|
|
28
|
+
- CLI interface with `omnivoice-server` command
|
|
29
|
+
- Configuration via environment variables or CLI flags
|
|
30
|
+
- Optional Bearer token authentication
|
|
31
|
+
- Concurrent request handling with configurable limits
|
|
32
|
+
- Request timeout protection
|
|
33
|
+
- Audio format support: WAV and raw PCM
|
|
34
|
+
- Speed control (0.25x - 4.0x)
|
|
35
|
+
- Configurable inference steps (1-64)
|
|
36
|
+
- Python client examples
|
|
37
|
+
- cURL examples
|
|
38
|
+
- Streaming audio player example
|
|
39
|
+
- Comprehensive documentation
|
|
40
|
+
- CI/CD workflow with GitHub Actions
|
|
41
|
+
|
|
42
|
+
### Technical Details
|
|
43
|
+
|
|
44
|
+
- Built on FastAPI and Uvicorn
|
|
45
|
+
- Uses OmniVoice model from k2-fsa
|
|
46
|
+
- Supports CUDA, MPS, and CPU inference
|
|
47
|
+
- Thread pool executor for concurrent synthesis
|
|
48
|
+
- Pydantic-based configuration and validation
|
|
49
|
+
- Type hints throughout codebase
|
|
50
|
+
- Async/await for I/O operations
|
|
51
|
+
|
|
52
|
+
[unreleased]: https://github.com/maemreyo/omnivoice-server/compare/v0.1.0...HEAD
|
|
53
|
+
[0.1.0]: https://github.com/maemreyo/omnivoice-server/releases/tag/v0.1.0
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Contributing to OmniVoice Server
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing!
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
1. Fork and clone the repository
|
|
8
|
+
2. Install: `pip install -e ".[dev]"`
|
|
9
|
+
3. Create a branch: `git checkout -b feature/your-feature`
|
|
10
|
+
4. Make changes and add tests
|
|
11
|
+
5. Run tests: `pytest tests/ -v`
|
|
12
|
+
6. Run linting: `ruff check omnivoice_server/ tests/`
|
|
13
|
+
7. Commit: `git commit -m "feat: your feature"`
|
|
14
|
+
8. Push and create PR
|
|
15
|
+
|
|
16
|
+
## Code Style
|
|
17
|
+
|
|
18
|
+
- Follow PEP 8
|
|
19
|
+
- Use type hints
|
|
20
|
+
- Max line length: 100
|
|
21
|
+
- Run `ruff check --fix` before committing
|
|
22
|
+
|
|
23
|
+
## Testing
|
|
24
|
+
|
|
25
|
+
- Write tests for new features
|
|
26
|
+
- Maintain 80%+ coverage
|
|
27
|
+
- Use pytest fixtures
|
|
28
|
+
|
|
29
|
+
## Commit Convention
|
|
30
|
+
|
|
31
|
+
- `feat`: New feature
|
|
32
|
+
- `fix`: Bug fix
|
|
33
|
+
- `docs`: Documentation
|
|
34
|
+
- `test`: Tests
|
|
35
|
+
- `refactor`: Refactoring
|
|
36
|
+
|
|
37
|
+
## Questions?
|
|
38
|
+
|
|
39
|
+
Open an issue or discussion!
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Multi-stage build for omnivoice-server
|
|
2
|
+
FROM python:3.10-slim as builder
|
|
3
|
+
|
|
4
|
+
WORKDIR /build
|
|
5
|
+
|
|
6
|
+
# Install build dependencies
|
|
7
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
8
|
+
build-essential \
|
|
9
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
10
|
+
|
|
11
|
+
# Copy project files
|
|
12
|
+
COPY pyproject.toml README.md ./
|
|
13
|
+
COPY omnivoice_server ./omnivoice_server
|
|
14
|
+
|
|
15
|
+
# Install PyTorch CPU (smaller image, works everywhere)
|
|
16
|
+
RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu
|
|
17
|
+
|
|
18
|
+
# Install the package
|
|
19
|
+
RUN pip install --no-cache-dir .
|
|
20
|
+
|
|
21
|
+
# Runtime stage
|
|
22
|
+
FROM python:3.10-slim
|
|
23
|
+
|
|
24
|
+
WORKDIR /app
|
|
25
|
+
|
|
26
|
+
# Install runtime dependencies
|
|
27
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
28
|
+
libsndfile1 \
|
|
29
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
30
|
+
|
|
31
|
+
# Copy installed packages from builder
|
|
32
|
+
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
|
|
33
|
+
COPY --from=builder /usr/local/bin/omnivoice-server /usr/local/bin/omnivoice-server
|
|
34
|
+
|
|
35
|
+
# Create profile directory
|
|
36
|
+
RUN mkdir -p /app/profiles
|
|
37
|
+
|
|
38
|
+
# Expose server port
|
|
39
|
+
EXPOSE 8880
|
|
40
|
+
|
|
41
|
+
# Health check
|
|
42
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
|
43
|
+
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8880/health')" || exit 1
|
|
44
|
+
|
|
45
|
+
# Run server
|
|
46
|
+
CMD ["omnivoice-server", "--host", "0.0.0.0", "--port", "8880", "--profile-dir", "/app/profiles"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 zamery (maemreyo)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|