API update request: ability to pick different voices per-locale
- Dominant language
- C
- Stars
- 331
- Forks
- 92
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 9
Description
Hello. While this may be seen as a duplicate or a continuation for #460, I think it deserves its place, because it's about API.
**What is needed for speechd is an ability to switch between two or more languages.**
Instead of only writing
```python
c.set_language('en')
c.set_voice('female1')
```
It would be very nice to use that API (imo).
```python
c.set_language_voice('en', 'female1')
```
It is not unheard of, either: RHVoice does that already and it works great.
```bash
echo "Voice test" | RHVoice-client -s Anna+CLB | aplay
```
There is a [web demo](https://ainy.github.io/rhvoice/), as well.
```python
c.set_language_voice('en', 'female1')
c.set_language_voice('ru', 'female1')
```
What it will allow to do is chaining different voices. It is, after all, very convenient to not switch voices manually each time.
I think I can track voices on the side of the synthesizer, but I am not sure it is that good of an idea: how do I even write blocking calls, so I switch in time?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the public API entry points shown in the issue: set_language(), set_voice(), and the proposed set_language_voice(). Compare the requested English/Russian voice chaining with the RHVoice-client example, then determine how blocking calls and voice switching are handled. Done means the API supports selecting voices per locale without manual switching and has coverage for the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100