# Orca Binding for Python
## Orca Text-to-Speech Engine
Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
Orca is an on-device text-to-speech engine producing high-quality, realistic, spoken audio with zero latency. Orca is:
- Private; All voice processing runs locally.
- Cross-Platform:
- Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
- Android and iOS
- Chrome, Safari, Firefox, and Edge
- Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano
## Compatibility
- Python 3.7+
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.
## Installation
```console
pip3 install pvorca
```
## AccessKey
Orca requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Orca
SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.
## Usage
Create an instance of the Orca engine:
```python
import pvorca
orca = pvorca.create(access_key='${ACCESS_KEY}')
```
Replace the `${ACCESS_KEY}` with your AccessKey obtained from [Picovoice Console](https://console.picovoice.ai/).
You can synthesize speech by calling one of the `synthesize` methods:
```python
# Return raw PCM
pcm = orca.synthesize(text='${TEXT}')
# Save the generated audio to a WAV file directly
orca.synthesize_to_file(text='${TEXT}', path='${OUTPUT_PATH}')
```
Replace `${TEXT}` with the text to be synthesized and `${OUTPUT_PATH}` with the path to save the generated audio as a
single-channel 16-bit PCM WAV file.\
When done make sure to explicitly release the resources with `orca.delete()`.
### Text input
Orca accepts the 26 lowercase (a-z) and 26 uppercase (A-Z) letters of the English alphabet, as well as
common punctuation marks. You can get a list of all supported characters by calling the
`valid_characters()` method provided in the Orca SDK you are using.
Pronunciations of characters or words not supported by this list can be achieved with
[custom pronunciations](#custom-pronunciations).
### Custom pronunciations
Orca allows to embed custom pronunciations in the text via the syntax: `{word|pronunciation}`.\
The pronunciation is expressed in [ARPAbet](https://en.wikipedia.org/wiki/ARPABET) phonemes, for example:
- "This is a {custom|K AH S T AH M} pronunciation"
- "{read|R IY D} this as {read|R EH D}, please."
- "I {live|L IH V} in {Sevilla|S EH V IY Y AH}. We have great {live|L AY V} sports!"
### Voices
Orca can synthesize speech with various voices, each of which is characterized by a model file located
in [lib/common](https://github.com/Picovoice/orca/tree/main/lib/common).
To create an instance of the engine with a specific voice, use:
```python
orca = pvorca.create(access_key='${ACCESS_KEY}', model_path='${MODEL_PATH}')
```
and replace `${MODEL_PATH}` with the path to the model file with the desired voice.
### Speech control
Orca allows for keyword arguments to be provided to the `synthesize` methods to control the synthesized speech:
- `speech_rate`: Controls the speed of the generated speech. Valid values are within [0.7, 1.3]. A higher (lower) value
produces speech that is faster (slower). The default is `1.0`.
### Orca properties
To obtain the set of valid characters, call `orca.valid_characters`.\
To retrieve the maximum number of characters allowed, call `orca.max_character_limit`.\
The sample rate of Orca is `orca.sample_rate`.
## Demos
[pvorcademo](https://pypi.org/project/pvorcademo/) provides command-line utilities for synthesizing audio using
Orca.
Raw data
{
"_id": null,
"home_page": "https://github.com/Picovoice/orca",
"name": "pvorca",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "Text-to-Speech,TTS,Speech Synthesis,Voice Generation,Speech Engine",
"author": "Picovoice",
"author_email": "hello@picovoice.ai",
"download_url": "https://files.pythonhosted.org/packages/9b/e3/6af4918084a09a7391d5d682e7fc4e6d1480b43de242b66e92b87000bb0d/pvorca-0.1.4.tar.gz",
"platform": null,
"description": "# Orca Binding for Python\n\n## Orca Text-to-Speech Engine\n\nMade in Vancouver, Canada by [Picovoice](https://picovoice.ai)\n\nOrca is an on-device text-to-speech engine producing high-quality, realistic, spoken audio with zero latency. Orca is:\n\n- Private; All voice processing runs locally.\n- Cross-Platform:\n - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)\n - Android and iOS\n - Chrome, Safari, Firefox, and Edge\n - Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano\n\n## Compatibility\n\n- Python 3.7+\n- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.\n\n## Installation\n\n```console\npip3 install pvorca\n```\n\n## AccessKey\n\nOrca requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Orca\nSDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.\nSignup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.\n\n## Usage\n\nCreate an instance of the Orca engine:\n\n```python\nimport pvorca\n\norca = pvorca.create(access_key='${ACCESS_KEY}')\n```\n\nReplace the `${ACCESS_KEY}` with your AccessKey obtained from [Picovoice Console](https://console.picovoice.ai/).\n\nYou can synthesize speech by calling one of the `synthesize` methods:\n\n```python\n# Return raw PCM\npcm = orca.synthesize(text='${TEXT}')\n\n# Save the generated audio to a WAV file directly\norca.synthesize_to_file(text='${TEXT}', path='${OUTPUT_PATH}')\n```\n\nReplace `${TEXT}` with the text to be synthesized and `${OUTPUT_PATH}` with the path to save the generated audio as a\nsingle-channel 16-bit PCM WAV file.\\\nWhen done make sure to explicitly release the resources with `orca.delete()`.\n\n### Text input\n\nOrca accepts the 26 lowercase (a-z) and 26 uppercase (A-Z) letters of the English alphabet, as well as\ncommon punctuation marks. You can get a list of all supported characters by calling the\n`valid_characters()` method provided in the Orca SDK you are using.\nPronunciations of characters or words not supported by this list can be achieved with\n[custom pronunciations](#custom-pronunciations).\n\n### Custom pronunciations\n\nOrca allows to embed custom pronunciations in the text via the syntax: `{word|pronunciation}`.\\\nThe pronunciation is expressed in [ARPAbet](https://en.wikipedia.org/wiki/ARPABET) phonemes, for example:\n\n- \"This is a {custom|K AH S T AH M} pronunciation\"\n- \"{read|R IY D} this as {read|R EH D}, please.\"\n- \"I {live|L IH V} in {Sevilla|S EH V IY Y AH}. We have great {live|L AY V} sports!\"\n\n### Voices\n\nOrca can synthesize speech with various voices, each of which is characterized by a model file located\nin [lib/common](https://github.com/Picovoice/orca/tree/main/lib/common).\nTo create an instance of the engine with a specific voice, use:\n\n```python\norca = pvorca.create(access_key='${ACCESS_KEY}', model_path='${MODEL_PATH}')\n```\n\nand replace `${MODEL_PATH}` with the path to the model file with the desired voice.\n\n### Speech control\n\nOrca allows for keyword arguments to be provided to the `synthesize` methods to control the synthesized speech:\n\n- `speech_rate`: Controls the speed of the generated speech. Valid values are within [0.7, 1.3]. A higher (lower) value\n produces speech that is faster (slower). The default is `1.0`.\n\n### Orca properties\n\nTo obtain the set of valid characters, call `orca.valid_characters`.\\\nTo retrieve the maximum number of characters allowed, call `orca.max_character_limit`.\\\nThe sample rate of Orca is `orca.sample_rate`.\n\n## Demos\n\n[pvorcademo](https://pypi.org/project/pvorcademo/) provides command-line utilities for synthesizing audio using\nOrca.\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Orca Text-to-Speech Engine.",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/Picovoice/orca"
},
"split_keywords": [
"text-to-speech",
"tts",
"speech synthesis",
"voice generation",
"speech engine"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "56a131be1dff18a47b88762e5d6137bee17fa6f744106a1527a576580b33c548",
"md5": "35fc315ab899262931be3d3eb73b9b11",
"sha256": "20a6fbd4263543845822199ec61c846abc6c6eefe724e6e9e70a6634c97063b8"
},
"downloads": -1,
"filename": "pvorca-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "35fc315ab899262931be3d3eb73b9b11",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 21715695,
"upload_time": "2024-02-15T15:40:58",
"upload_time_iso_8601": "2024-02-15T15:40:58.924718Z",
"url": "https://files.pythonhosted.org/packages/56/a1/31be1dff18a47b88762e5d6137bee17fa6f744106a1527a576580b33c548/pvorca-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9be36af4918084a09a7391d5d682e7fc4e6d1480b43de242b66e92b87000bb0d",
"md5": "b846668d2c14121e29091cfcac972f86",
"sha256": "8413bea22ca0087ce62c22859aebe7b4fcc65e83ee845a1d7cbd4ce608464480"
},
"downloads": -1,
"filename": "pvorca-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "b846668d2c14121e29091cfcac972f86",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 21701919,
"upload_time": "2024-02-15T15:41:03",
"upload_time_iso_8601": "2024-02-15T15:41:03.075462Z",
"url": "https://files.pythonhosted.org/packages/9b/e3/6af4918084a09a7391d5d682e7fc4e6d1480b43de242b66e92b87000bb0d/pvorca-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-15 15:41:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Picovoice",
"github_project": "orca",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pvorca"
}