Created
July 26, 2017 21:59
-
-
Save spacelatte/e0b4427673e1eb35ad4af6429e33cc98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| const fs = require("fs") | |
| const abu = require("audio-buffer-utils") | |
| const abf = require("audio-buffer-from") | |
| const tts = require("google-tts-api") | |
| const mpg = require('fluent-ffmpeg') | |
| const dec = require("audio-decode") | |
| const lod = require("audio-loader") | |
| const ply = require("audio-play") | |
| const req = require("request") | |
| tts("hello world", "en", 1).then(function(url) { | |
| req({ url: url, encoding: null }, function(err, resp, body) { | |
| let buf = abu.create((body), 1, 24000) | |
| console.log(buf) | |
| ply(buf) | |
| return | |
| }) | |
| return | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment