Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option to Download MP3 File After Creation #18

Closed
Dor-J opened this issue Jun 18, 2023 · 2 comments
Closed

Add Option to Download MP3 File After Creation #18

Dor-J opened this issue Jun 18, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Dor-J
Copy link

Dor-J commented Jun 18, 2023

Description:

Hello,

I've been exploring the "aws-text-to-speech" project and I think it's fantastic. I appreciate the work that has been done so far.

I would like to propose a new feature that I believe could enhance the functionality of the service. Specifically, I think it would be beneficial to add an option for users to download the MP3 file directly after it has been created.

Feature Details:

Currently, the service converts text files to MP3 and sends the output to an email address. While this is useful, it might be more convenient for some users to have the option to download the MP3 file directly from the service. This could be particularly useful for users who want to use the audio file immediately or who prefer not to provide an email address.

Proposed Implementation:

I propose to modify the Lambda function that handles the text-to-speech conversion to include a download link for the MP3 file. This would involve generating a pre-signed URL for the MP3 file in the S3 bucket and returning this URL to the user.

Next Steps:

I am ready and willing to contribute this feature to the project. However, I wanted to discuss this idea with the maintainers before starting work on it to ensure it aligns with the project's goals. If this feature is approved, I can start working on it and submit a pull request once it's ready.

Thank you for considering my proposal. I look forward to hearing your thoughts on this proposed feature.

Best regards,
Dor

@ran-isenberg ran-isenberg added good first issue Good for newcomers enhancement New feature or request labels Jun 18, 2023
@ran-isenberg
Copy link
Owner

Hi Dor!
Thanks for taking the time to open this feature request!
I think it sounds great and very doable.
The current solution deleted the file from the bucket and sends it via email and I'd like to still have the email option.
So, what I suggest is that you an environment variable, something like 'GENERATE_PRESIGNED_URL'.
It will always sends the email BUT if the GENERATE_PRESIGNED_URL is True, it will send it with the presigned url and will not delete the mp3 file. As it is run in async manner, the email is only way to interact with the user.
I will also make sure I put all the mp3 files under an 'output' prefix , i dont remember if that's the case.
Anyway, if the GENERATE_PRESIGNED_URL flag is False, it will send the email with an attachment and delete the file as before.

please don't forget to add tests and make sure you run 'make pr' so it fixes any linting issues.
I will handle the documentation myself.
WDYT?

and again, thank you for the initiative!

@ran-isenberg ran-isenberg self-assigned this Jun 19, 2023
@ran-isenberg
Copy link
Owner

closing since over a month has passed without user engagement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants