Skip to content

Latest commit

 

History

History

2-get-the-results

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Task #2 - Download results

Why

Golem users can download self-generated files on the provider node back to their computer.

In this exercise, you will learn how to run a script that produces a file and how to download that file to your node.

Task description

Create a script that will accept the user-provided text as input and convert it to .mp3 on the Golem Network, download the output, and save it on your disk. For this task, you can use the Golem-provided image containing both ffmpeg and espeak. The image's hash is 0e24cd9c3c019143fba94debce69f37353d0157ac4329050870e9ae8.

Steps

Please observe how long it takes to complete the technical part of the tasks. We will ask you for such information in the feedback form.

  1. Modify the main.mjs script to execute the text-2-speech conversion commands.

  2. Run the script and verify the output.

  3. Add changes in the text-2-speech directory.

  4. Fill out the feedback form and publish changes in your repository fork.

Helpful resources

  • Golem JS QuickStart.

  • The image has VOLUME defined as /golem/work.

  • The usage example of espeak command to convert text to speech in .wav format: espeak "Hello Golem" -w /golem/work/result.wav.

  • The usage example of ffmpeg command to convert .wav to a .mp3 file: ffmpeg -i /golem/work/result.wav /golem/work/result.mp3.

  • Golem JS data transfer examples.

  • You can always ask on the Discord #js-discussion channel in the SDK section.