1.1.0 • Published 2 years ago

node-openjtalk-binding-discordjs v1.1.0

Weekly downloads
-
License
(MIT OR Unlicense...
Repository
github
Last release
2 years ago

node-openjtalk-binding-discordjs

Glue code between node-openjtalk-binding and discordjs.

Requirements

  • Able to run node-gyp
  • c++ 14 can be compiled.
  • If you use Mac OS, 10.14 or later is required because std::get cannot use before 10.14.

Install

#npm
npm install node-openjtalk-binding-discordjs
#yarn
yarn add node-openjtalk-binding-discordjs

Example

v12

const { synthesis } = require("node-openjtalk-binding-discordjs");
const path  = require("path");

const htsvoice = readFileSync(path_to_htsvoice);

/* ... */

const stream = silenceOnError(synthesis(message.content, {
  htsvoice,
}),err => console.error("Stream Error:", err));

connection.play(stream, {
  type: "converted"
});

v13

const { synthesis } = require("node-openjtalk-binding-discordjs");
const path  = require("path");

const htsvoice = readFileSync(path_to_htsvoice);

/* ... */

const stream = silenceOnError(synthesis(message.content, {
  htsvoice,
}),err => console.error("Stream Error:", err));

const resource = createAudioResource(stream, {
  inputType: StreamType.Raw,
});

player.play(resource);

HTSVoice

Google it!

1.1.0

2 years ago

1.0.0

3 years ago

1.0.0-rc.5

3 years ago

1.0.0-rc.4

3 years ago

1.0.0-rc.3

3 years ago

1.0.0-rc.1

3 years ago

1.0.0-rc.2

3 years ago

1.0.0-rc.0

3 years ago