rhasspy / piper

A fast, local neural text to speech system
https://rhasspy.github.io/piper-samples/
MIT License
6.68k stars 489 forks source link

[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION #601

Open Akash7677 opened 2 months ago

Akash7677 commented 2 months ago

I'm making one personal project. It's a basic LLM based chat application (server-client structure) where it will speak out loud the response from LLM.

I'm getting following error. it is not reproduced everytime but sometimes on certain text it is more frequent Error is as follows

Error: 500 - {"detail":"500: Speech synthesis failed: /home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'\n  warnings.warn(\n\u001b[1;31m2024-09-12 06:21:06.220239634 [E:onnxruntime:, sequential_executor.cc:516 ExecuteKernel] Non-zero status code returned while running Reshape node. Name:'/Reshape_1' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:28 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) i < input_shape.NumDimensions() was false. The dimension with value zero exceeds the dimension size of the input tensor.\n\u001b[m\nTraceback (most recent call last):\n  File \"/home/linuxbrew/.linuxbrew/bin/piper\", line 8, in <module>\n    sys.exit(main())\n             ^^^^^^\n  File \"/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/piper/__main__.py\", line 126, in main\n    for audio_bytes in audio_stream:\n  File \"/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/piper/voice.py\", line 123, in synthesize_stream_raw\n    yield self.synthesize_ids_to_raw(\n          ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/piper/voice.py\", line 166, in synthesize_ids_to_raw\n    audio = self.session.run(\n            ^^^^^^^^^^^^^^^^^\n  File \"/home/linuxbrew/.linuxbrew/opt/python@3.11/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py\", line 220, in run\n    return self._sess.run(output_names, input_feed, run_options)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nonnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running Reshape node. Name:'/Reshape_1' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/tensor/reshape_helper.h:28 onnxruntime::ReshapeHelper::ReshapeHelper(const onnxruntime::TensorShape&, onnxruntime::TensorShapeVector&, bool) i < input_shape.NumDimensions() was false. The dimension with value zero exceeds the dimension size of the input tensor.\n\n"}

I'm using piper installed with python 3.11

Embedded following command in the server side code

piper --model en_US-libritts_r-medium.onnx --sentence-silence 0.9 --length-scale 1.1 --output-raw --noise-scale 0.3

where text passed is as

The process of generating a ticket from my side typically involves the following steps:

1. Understanding the Issue: I will begin by asking you a few questions to understand the issue you're facing. This helps me gather essential information needed to create the ticket.

2. Summary and Description: Based on your responses, I will draft a brief summary and a detailed description of the issue. I will ensure that all relevant details are captured.

3. Assigning Categories and Projects: I will assign the appropriate project ID (in this case, projectid will always be 1) and category ID (categoryid will always be 5 for bugs) to the ticket.

4. Creating the Issue: Once I have all the necessary details, I will call the function to create the ticket in the system.

5. Confirmation: After the ticket is successfully created, I will provide you with the ticket ID and any other relevant information.

This streamlined process allows for efficient ticket generation while ensuring that all necessary details are captured accurately.

Any help or insight on this issue will be highly appriciated