yacineMTB / talk

Let's make sand talk
585 stars 43 forks source link

Piper interface mismatch: Indice data out of bounds thrown #34

Open jmanhype opened 1 year ago

jmanhype commented 1 year ago

Non-zero status code returned while running Gather node. Name:'/enc_p/emb/Gather' Status Message: indices element out of data bounds, idx=144 must be within the inclusive range [-130,129] Aborted (core dumped)

The provided error indicates that there's an issue with the Piper ONNX model, which is used for generating synthetic speech. The model appears to have trouble with the 'Gather' operation—an operation that pulls out specific indices from a tensor—at a certain index in the input data.

Specifically, the error message 'indices element out of data bounds, idx=144 must be within the inclusive range [-130,129]' suggests the index at '144' is not within the limit set to run the Gather operation.

Without knowing the specifics of this STT model, it's hard to give a specific solution. However, you can try the following:

  1. Input Sanitization: Check and sanitize the input data to ensure it's within the expected limits and format for the model.
  2. Model Parameters: Verify if you're using the correct model, and the parameters for the model are set correctly. Make sure that your indices fall within the expected range.
  3. Model Version: If an update or different version of the model or the ONNX runtime library is available, try using that. Sometimes, these types of errors can occur due to a bug or incompatibility, which may be rectified in newer versions.
  4. Contact Software Providers: If none of the above works, your best bet would be to directly get in touch with the maintainers of the Piper model or the software you're using. Providing them with the error log can help them diagnose the issue more effectively.
jmanhype commented 1 year ago

This error information shows that there is an issue with the function or method called 'Gather' in the code. The text or data this function is trying to gather (" In essence TOM and ToT provide us with cognitive tools to reason about our own thoughts as well as those of others, making communication more effective in an uncertain world full of unpredictable events.") has an element that is outside of the boundaries set by the system, specifically at index number 144. The system specifies that this element must be within the inclusive range of [-130,129].

It seems like the range of the Gather function limits the data size or length and the input exceeds this limitation. You need to check what is it in your data at index 144 that leads to this error; it might be a word, character, or a sentence depending upon how your data has been structured for the Gather function.

As an immediate solution, you could truncate your text, eliminate any special characters or tokens that might not be recognisable to the gathering function or, ideally, reconfigure or debug your Gather function to accommodate your required or expected inputs. If there's a hard limit placed on the Gather function, and you cannot or do not wish to alter it, then you must ensure your inputs never exceed these given boundaries.

Also, make sure you're parsing your input correctly before feeding it into the model.

yacineMTB commented 1 year ago

I think we might want to figure out a different TTS solution fwiw something that can be abstracted by a network interface