<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rollideo</title>
    <description>The latest articles on DEV Community by Rollideo (@rollideo).</description>
    <link>https://dev.to/rollideo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F5567%2F3aa6fdc0-4cf5-42f5-b572-b1b322b6299c.jpg</url>
      <title>DEV Community: Rollideo</title>
      <link>https://dev.to/rollideo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rollideo"/>
    <language>en</language>
    <item>
      <title>Create a video with auto-generated voice-overs with an API call</title>
      <dc:creator>FlyNestor</dc:creator>
      <pubDate>Thu, 28 Apr 2022 13:52:06 +0000</pubDate>
      <link>https://dev.to/rollideo/create-a-video-with-auto-generated-voice-overs-with-an-api-call-4pi9</link>
      <guid>https://dev.to/rollideo/create-a-video-with-auto-generated-voice-overs-with-an-api-call-4pi9</guid>
      <description>&lt;p&gt;If you want to generate videos with voice-overs and to skip the repetitive tasks of video creation, follow this tutorial.&lt;/p&gt;

&lt;p&gt;In this tutorial we are going to call an API with Python.&lt;/p&gt;

&lt;p&gt;On the website &lt;strong&gt;&lt;a href="https://rollideo.com/"&gt;Rollideo&lt;/a&gt;&lt;/strong&gt;, you can launch the video generation directly from the home page, or use the APIs for more automation.&lt;/p&gt;

&lt;p&gt;To use the Rollideo APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Create an account to get a free API key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; put your API key in the following code.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests, json, time

APIKEY = 'YOUR SECRET KEY HERE'
voice1 = "Joanna"

text1 = "A super easy tool to automatically create videos with auto-generated voice-overs and the exact subtitles. Example of a video sequence with " + voice1 +"'s voice."

picture1 = 'https://i.postimg.cc/3r4RL5YX/ocean1.jpg'

data = {
    'text_segments': [
   {
    'api_source_type': 'picture',
    'picture': picture1,
    'textforvideo': text1,  
    'voice_id': voice1  
   }
  ]
}

headers = {'x-api-key': f"{APIKEY}"}
response = requests.post('https://rollideo.com/create/video', headers=headers, json=data)
data2 = response.json()
print(data2)
launched = data2.get("launched", "ko")

if launched == "ok":
    # Use the Polling API endpoint to find out the status the above request /create/video.
    for i in range(1000):
        time.sleep(10)
        print(i)
        response2 = requests.post('https://rollideo.com/task/video', headers=headers, json=data2)
        success = response2.json().get("success", "not yet")
        if success == "ok" or success == "ko":
            print(response2.json())
            break
else:
    print("The launch of the task has failed")
    print(data2.get("message"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a free account, you can create a video with one sequence.&lt;/p&gt;

&lt;p&gt;You can upgrade your account to create longer videos with many sequences.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
