Skip to content

Commit

Permalink
Merge pull request #1 from Samyak2/examples
Browse files Browse the repository at this point in the history
Examples
  • Loading branch information
Samyak2 authored Jul 9, 2022
2 parents e793c22 + bceb5b8 commit 31f87c7
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
tts
gosling

inputs/
outputs/
input*.txt
input.ssml
input*.ssml
output*.mp3
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@ You will need:
- Internet connection every time you need some text spoken to you.
- I have only tested this on Linux. Commands for playing audio will be different on other platforms.

## Examples

### Simple text with default options

https://user-images.githubusercontent.com/34161949/178104531-73298a8e-753f-4910-94c6-7cea9a85337a.mp4

### Numbers and punctuation with default options

(the multiple exclamations are something that I have seen other TTSs struggle with):
```
Welcome to gosling!!! It has options such as "Pitch adjustment" in the range -20.0 to 20.0, "Speaking rate/speed" in the range 0.25 to 4.0 and "Volume gain" (in dB) in the range -96.0 to 16.0.
```
https://user-images.githubusercontent.com/34161949/178104603-f8c46b93-4d38-4f71-bdc0-d3d4b3e47b05.mp4
### Other languages
Kannada:
https://user-images.githubusercontent.com/34161949/178105235-19e921c7-355b-4e66-8c3e-e962718002aa.mp4
Check out the [full voice list](https://cloud.google.com/text-to-speech/docs/voices), use `Wavenet` or `Neural2` based voices for better quality.
## Installation
### Pre-built binaries
Expand Down
10 changes: 10 additions & 0 deletions scripts/create_video.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -euxo pipefail

imagepath="$1"
inputaudiopath="$2"
outputvideopath="$3"

ffmpeg -loop 1 -i "$imagepath" -i "$inputaudiopath" -c:a copy -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -shortest -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" "$outputvideopath"

0 comments on commit 31f87c7

Please sign in to comment.