OpenVoice icon indicating copy to clipboard operation
OpenVoice copied to clipboard

Optimize sequence_to_text function with join method

Open vivekmaru36 opened this issue 1 year ago • 1 comments

This pull request modifies the init.py file to optimize the sequence_to_text function within the module. The update enhances the function's efficiency by replacing manual iteration and concatenation with the more efficient join method for string construction.

Changes:

Optimized sequence_to_text function for improved performance. Incorporated the join method for string concatenation. Introduced _id_to_symbol parameter for enhanced symbol lookup efficiency.

Purpose:

Enhancing the performance of the sequence_to_text function allows for more efficient text decoding from sequences of IDs, benefiting overall model operations and processing.

vivekmaru36 avatar Jan 06 '24 11:01 vivekmaru36

Sorry the for loop still exists. No performance gain from this PR

Zengyi-Qin avatar Jan 07 '24 21:01 Zengyi-Qin