newdeep 0.0.4
This is wrapper for marketanalyst api
Requires Python: >=3.6

# Welcome to dword
> An amazing library to create synthetic videos


We hope you enjoy this project

## Installation

1. Install the dword library

```
pip install dword
```

2. Make sure you have [ffmpeg installed.](https://ffmpeg.org/download.html)

## Quick start

```
from deepword.dword import dword
```

Make a dword which can be used to call all the other methods.

```
d_word = dword()
```

## Methods:


You can use the `get_credits` function to get the number of credits left in your deep word account

```python
d_word.get_credits()
```

    {"success":true,"available_credits":505,"used_credits":5,"total_credits":"510"}


You can use the `get_video_list` function to get a list of all generated videos from your deep word account

```python
d_word.get_video_list()
```

    {"status":true,"message":"Video list","count":182,"data":[{"email":"temp@yopmail.com","thumbnail":"thubnail-3r2fokh2yllec.png","title":"Female_Adult_Construction","video_url":"https://videos-deep-word123./output/3r2m8drffoszffkh2yllec.mp4","video_duration":"0","generate_date":"2020-11-04T05:27:09.000Z","output_status":"Progress"}]}



You can use the `download_video` function to download synthetic video generated in your deep word account

```python
d_word.download_video(video_id='b47y6ab8a4khn82sxo')
```

    Successfully generated video!

You can use the `download_all_videos` function to download all the synthetic videos from your deep word account
```python
d_word.download_all_videos()
```

    all the video downloaded successfully!

You can use the `text_to_speech` function to get audio from text using speaker's voice. Output will be stored as outfile"

```python
d_word.text_to_speech(text='Choose from the options below in order to get an audio file for your speaker to use.',speaker='en-US-Wavenet-C',gender='FEMALE',code='en-US',outfile=None)
```

    Successfully generated audio file!

You can use the `download_youtube_video` function to download a youtube video from it's url

```python
d_word.download_youtube_video(start_time='00:00:01',end_time='00:01:00',types='video',url='https://www.youtube.com/watch?v=VNs_cCtdbPc')
```

    downloaded youtube video successfully!


 
You can use the `trim_video` function to crop a video in place from start to end. If you don't want to crop inplace, provide output filename.
    For youtube videos you can `download_youtube_video` before cropping it

```python
d_word.trim_video(video_path='Anna.mp4',start_time='00:00:01',end_time='00:00:21',outfile=None)
```

    Video trim successfully!


You can use the `get_resolution` function to get the resolution of a video

```python
d_word.get_resolution(video_path='Anna.mp4')
```

    resolution of video 720.0 1280.0

You can use the `get_fps` function to get the fps of a video

```python
d_word.get_fps(video_path='Anna.mp4')
```

    video fps : 25.0
  
You can use the `trim_audio` function to crop an audio in place from start to end. If you don't want to crop inplace, provide output filename.

```python
d_word.trim_audio(audio_path='aaa.mp3',start_time='00:00:01',end_time='00:00:21',outfile=None)
```

    audio trim successfully!