这是indexloc提供的服务,不要输入任何密码
Skip to content

Audio | Create Speech | return file bytes (Uint8List) for work on web and improve speed #185

@Stefano-Trinca

Description

@Stefano-Trinca

Currently, the createSpeech function returns a File object. This implementation is not optimal for web environments and can be improved in terms of performance. It would be beneficial to add an option to return a Uint8List from the createSpeech function.

Proposed Change
Add an option to the createSpeech function to return the result as a Uint8List instead of a File. This can be achieved by adding a parameter to specify the desired return type and adjusting the implementation accordingly.

Benefits
Improved performance for web environments by returning Uint8List directly.
Enhanced flexibility for developers to choose the appropriate return type based on their needs.
Additional Context
This change will help developers who are building web applications using the dart_openai package to handle speech synthesis results more efficiently.

Thank you for considering this feature request. Your efforts in maintaining and improving this package are greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions