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

move async call to proper pull of promise #1

Merged

Conversation

victorabarros
Copy link
Contributor

Move async calls to Promise.all handler.

See below the logs showing an improvement in running the conversation from 28˜31 seconds to 5~6 seconds.

Before:

victorbarros1130@Victors-MacBook-Pro w3d-podcast % yarn start 97598aa1-c776-4fd9-a72b-61b2075ce073
yarn run v1.22.19
warning ../package.json: No license field
$ node index.js 97598aa1-c776-4fd9-a72b-61b2075ce073
Conversão concluída! O arquivo 'tts_conversation.mp3' foi salvo no diretório atual.
✨  Done in 31.47s.
victorbarros1130@Victors-MacBook-Pro w3d-podcast % yarn start 97598aa1-c776-4fd9-a72b-61b2075ce073
yarn run v1.22.19
warning ../package.json: No license field
$ node index.js 97598aa1-c776-4fd9-a72b-61b2075ce073
Conversão concluída! O arquivo 'tts_conversation.mp3' foi salvo no diretório atual.
✨  Done in 27.88s.

After:

victorbarros1130@Victors-MacBook-Pro w3d-podcast % yarn start 97598aa1-c776-4fd9-a72b-61b2075ce073
yarn run v1.22.19
warning ../package.json: No license field
$ node index.js 97598aa1-c776-4fd9-a72b-61b2075ce073
Conversão concluída! O arquivo 'tts_conversation.mp3' foi salvo no diretório atual.
✨  Done in 5.57s.
victorbarros1130@Victors-MacBook-Pro w3d-podcast % yarn start 97598aa1-c776-4fd9-a72b-61b2075ce073
yarn run v1.22.19
warning ../package.json: No license field
$ node index.js 97598aa1-c776-4fd9-a72b-61b2075ce073
Conversão concluída! O arquivo 'tts_conversation.mp3' foi salvo no diretório atual.
✨  Done in 4.58s.

@danicuki
Copy link
Contributor

cool!!! Thanks!

@danicuki danicuki merged commit f3942cd into w3b3d3v:main Aug 16, 2023
1 check passed
@danicuki
Copy link
Contributor

https://www.youtube.com/watch?v=0mNx2jRxnSo

@victorabarros victorabarros deleted the victor/optimize-text-to-audio-call branch August 16, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants