Generate a video about ai automation using the stock video and GPT3 to generate voice to overlay over the video. Have the voice talk about the future of ai automation.Cut the voice to the length of the video
Run Agent
{ "graph":{ "acyclic":false, "pipe_collision":false }, "nodes":{ "0x229384f2a40":{ "type_":"nodes.basic.BasicNodeA", "icon":"c:\\Users\\Public\\cheatlayer\\examples\\Move.png", "name":"Start Node 0", "color":[ 13, 18, 23, 255 ], "border_color":[ 74, 84, 85, 255 ], "text_color":[ 255, 255, 255, 180 ], "disabled":false, "selected":false, "visible":true, "width":160, "height":71.2, "pos":[ -327.5193798449613, -160.23255813953492 ], "port_deletion_allowed":false, "subgraph_session":{}, "custom":{ "Initial Program":"", "Data":"{\"type\": \"Start Node\", \"x\": 0, \"y\": 0, \"Application\": \"\"}" } }, "0x229384f3d60":{ "type_":"nodes.basic.BasicNodeA", "icon":"c:\\Users\\Public\\cheatlayer\\examples\\Move.png", "name":"Bash Commands 5", "color":[ 13, 18, 23, 255 ], "border_color":[ 74, 84, 85, 255 ], "text_color":[ 255, 255, 255, 180 ], "disabled":false, "selected":true, "visible":true, "width":160, "height":71.2, "pos":[ -130.0, 213.60000000000002 ], "port_deletion_allowed":false, "subgraph_session":{}, "custom":{ "code":" \npip3 install gTTS\npip3 install requests\npip3 install pydub\npip3 install moviepy\n\n\n", "Data":"{\"type\": \"bash\", \"code\": \" \\npip3 install gTTS\\npip3 install requests\\npip3 install pydub\\npip3 install moviepy\\n\\n\\n\"}" } }, "0x22938720160":{ "type_":"nodes.basic.BasicNodeA", "icon":"c:\\Users\\Public\\cheatlayer\\examples\\Move.png", "name":"Python Code 6", "color":[ 13, 18, 23, 255 ], "border_color":[ 74, 84, 85, 255 ], "text_color":[ 255, 255, 255, 180 ], "disabled":false, "selected":false, "visible":true, "width":160, "height":71.2, "pos":[ 131.0077519379845, 213.60000000000005 ], "port_deletion_allowed":false, "subgraph_session":{}, "custom":{ "code":" \nimport requests\nimport json\nfrom gtts import gTTS\nfrom pydub import AudioSegment\nfrom moviepy.editor import VideoFileClip, AudioFileClip\n\n# Search for videos about AI automation\nresponse = videoSearch('AI automation')\nvideos = response['videos']\n\n# Download the first video\nvideo_url = videos[0]['video_files'][0]['link']\nr = requests.get(video_url)\nwith open('video.mp4', 'wb') as f:\n f.write(r.content)\n\n# Generate voice using GPT-3\nvoice_text = gpt3Prompt(\"Talk about the future of AI automation\", \"\")\ntts = gTTS(text=voice_text, lang='en')\ntts.save(\"voice.mp3\")\n\n# Cut the voice to the length of the video\nvideo = VideoFileClip('video.mp4')\nvoice = AudioFileClip('voice.mp3')\nduration = float(video.duration)\nvoice = voice.subclip(0, duration)\n\n# Overlay voice over the video\nfinal_video = video.set_audio(voice)\nfinal_video.write_videofile('final_video.mp4')\n", "Data":"{\"type\": \"python\", \"code\": \" \\nimport requests\\nimport json\\nfrom gtts import gTTS\\nfrom pydub import AudioSegment\\nfrom moviepy.editor import VideoFileClip, AudioFileClip\\n\\n# Search for videos about AI automation\\nresponse = videoSearch('AI automation')\\nvideos = response['videos']\\n\\n# Download the first video\\nvideo_url = videos[0]['video_files'][0]['link']\\nr = requests.get(video_url)\\nwith open('video.mp4', 'wb') as f:\\n f.write(r.content)\\n\\n# Generate voice using GPT-3\\nvoice_text = gpt3Prompt(\\\"Talk about the future of AI automation\\\", \\\"\\\")\\ntts = gTTS(text=voice_text, lang='en')\\ntts.save(\\\"voice.mp3\\\")\\n\\n# Cut the voice to the length of the video\\nvideo = VideoFileClip('video.mp4')\\nvoice = AudioFileClip('voice.mp3')\\nduration = float(video.duration)\\nvoice = voice.subclip(0, duration)\\n\\n# Overlay voice over the video\\nfinal_video = video.set_audio(voice)\\nfinal_video.write_videofile('final_video.mp4')\\n\"}" } } }, "connections":[ { "out":[ "0x229384f2a40", "out A" ], "in":[ "0x229384f3d60", "in A" ] }, { "out":[ "0x229384f3d60", "out A" ], "in":[ "0x22938720160", "in A" ] } ] }
Step 1: Use Cheat Layer on websites to discover new Cheat Codes by asking it to automate what you want.
Step 2: If the custom automation is useful, share it with the community by clicking the "Submit Cheat Code" button.
Step 3: Earn 1,000 Cheat Cloud Points for every Cheat Code you submit! In the future we'll be able to pay creators for every run directly, so users can discover valuable automations using language alone!