diff --git a/.github/workflows/python-demo.yml b/.github/workflows/python-demo.yml index e35f1155..f14c2bb8 100644 --- a/.github/workflows/python-demo.yml +++ b/.github/workflows/python-demo.yml @@ -62,7 +62,7 @@ jobs: run: > python3 orca_demo_streaming.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} - --text "Hello, I am Orca!" + --text_to_stream "Hello, I am Orca!" - name: Test single run: > @@ -97,7 +97,7 @@ jobs: run: > python3 orca_demo_streaming.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} - --text "Hello, I am Orca!" + --text_to_stream "Hello, I am Orca!" - name: Test single run: > diff --git a/README.md b/README.md index 59b3153e..464685bf 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,6 @@ This enables seamless conversations with voice assistants, eliminating any audio ![](https://github.com/Picovoice/orca/blob/orca-prepare-v0.2/resources/assets/orca_streaming_animation.gif) -As demonstrated above, Orca starts converting text to audio right away, while other TTS systems, such as OpenAI TTS, -need to wait for the entire LLM output to be available, introducing a delay in the voice assistant's response. - Orca also supports single synthesis mode, where a complete text is synthesized in a single call to the Orca engine. ### Text input @@ -133,16 +130,20 @@ AccessKey also verifies that your usage is within the limits of your account. Ev ### Python Demos -To run the Python demo, run the following in the console: +Install the demo package: ```console pip3 install pvorcademo ``` +Run the streaming demo: + ```console -orca_demo_streaming --access_key ${ACCESS_KEY} --text-to-stream ${TEXT} +orca_demo_streaming --access_key ${ACCESS_KEY} --text_to_stream ${TEXT} ``` +Run the single synthesis demo: + ```console orca_demo --access_key ${ACCESS_KEY} --text ${TEXT} --output_path ${WAV_OUTPUT_PATH} ``` @@ -150,6 +151,8 @@ orca_demo --access_key ${ACCESS_KEY} --text ${TEXT} --output_path ${WAV_OUTPUT_P Replace `${ACCESS_KEY}` with yours obtained from Picovoice Console, `${TEXT}` with the text to be synthesized, and `${WAV_OUTPUT_PATH}` with a path to an output WAV file. +For more information about Python demos go to [demo/python](demo/python). + ### iOS Demo Run the following from [demo/ios](demo/ios) to install the Orca-iOS CocoaPod: diff --git a/demo/python/README.md b/demo/python/README.md index 3ffd1582..f8d11e8d 100644 --- a/demo/python/README.md +++ b/demo/python/README.md @@ -48,7 +48,7 @@ We stream that text to Orca and play the synthesized audio as soon as it gets ge To run it, execute the following: ```console -orca_demo_streaming --access_key ${ACCESS_KEY} --text-to-stream ${TEXT} +orca_demo_streaming --access_key ${ACCESS_KEY} --text_to_stream ${TEXT} ``` Replace `${ACCESS_KEY}` with your `AccessKey` obtained from Picovoice Console and `${TEXT}` with your text to be diff --git a/demo/python/orca_demo_streaming.py b/demo/python/orca_demo_streaming.py index f559ea5f..05b0d92e 100644 --- a/demo/python/orca_demo_streaming.py +++ b/demo/python/orca_demo_streaming.py @@ -300,22 +300,22 @@ def main() -> None: "-m", help="Absolute path to Orca model. Default: using the model provided by `pvorca`") parser.add_argument( - "--text-to-stream", + "--text_to_stream", "-t", required=True, help="Text to be streamed to Orca") parser.add_argument( - "--tokens-per-second", + "--tokens_per_second", type=int, default=15, help="Number of tokens per second to be streamed to Orca, simulating an LLM response.") parser.add_argument( - "--audio-wait-chunks", + "--audio_wait_chunks", type=int, default=None, help="Number of PCM chunks to wait before starting to play audio. Default: system-dependent.") parser.add_argument( - "--show-audio-devices", + "--show_audio_devices", action="store_true", help="Only list available audio output devices and exit") parser.add_argument('--audio-device-index', type=int, default=None, help='Index of input audio device')