Marak / say.js

TTS (text to speech) for node.js. send text from node.js to your speakers.
MIT License
1.49k stars 214 forks source link

No utf-8 encoding, unable to say languege specific letters #115

Closed Tymski closed 1 year ago

Tymski commented 3 years ago

For example When saying "Zażółć gęślą jaźń", polish letters will be skipped, even when explicitly setting a polish synthesizer.

Teg3z commented 3 years ago

Yeah, what encoding does it use?

nandumoura commented 3 years ago

yeah i have the same problem in latin characters like "ç ã õ á é" I change the encoding in the base file but dont work

RandoMixs commented 1 year ago

I have the same problem on Windows and this resolve utf 8 for me

131

Tymski commented 1 year ago

Example solution that changes the encoding to utf-8 using exec and chcp:

const { exec } = require('child_process');
const say = require('say');
exec('chcp 65001'); 
say.speak("Zażółć gęślą jaźń.", "Microsoft Paulina Desktop");
Tymski commented 1 year ago

Yeah, what encoding does it use?

Turns out it uses encoding from the current console.