SAM is a speech synthesis program that was created in 1982 by Mark Barton.
This is a wrapper for the reverse-engineered C version of SAM as created by s-macke.
Using npm:
npm install software-automatic-mouth
Using git:
git clone https://github.com/SeizedThoughts/node-software-automatic-mouth.git
To get started, just call import the package.
const SAM = require('software-automatic-mouth');
//YOUR CODE HERE
There are several options, passed by value, available for all methods. (Listed values are default.)
//This is the classic "SAM" voice
{
speed: 72,
pitch: 64,
throat: 128,
mouth: 128
}
A voice can be passed as a config without modification as they are themselves configs. Below are the voices that are available by default.
The default voice is voices.SAM
.
{
speed: 72,
pitch: 64,
throat: 110,
mouth: 160
}
{
speed: 100,
pitch: 64,
throat: 150,
mouth: 200
}
{
speed: 82,
pitch: 32,
throat: 145,
mouth: 145
}
{
speed: 92,
pitch: 60,
throat: 190,
mouth: 190
}
//This is the classic "SAM" voice
{
speed: 72,
pitch: 64,
throat: 128,
mouth: 128
}
{
speed: 82,
pitch: 72,
throat: 110,
mouth: 105
}
This takes in text and a config and returns a Promise
for a .wav buffer.
SAM.say('Hello, world!', SAM.voices.SAM).then((data) => {
require('fs').writeFileSync('hello-world.wav', data);
}).catch((err) => {
console.log(`SAM failed to generate audio. Reason: ${err.message}`);
})
The retry-agent
module exports the following:
{
say: require('./SAM/say'),
voices: require('./voices')
}
As described by s-macke:
The software is a reverse-engineered version of a software published more than 34 years ago by "Don't ask Software".
The company no longer exists. Any attempt to contact the original authors failed. Hence S.A.M. can be best described as Abandonware (http://en.wikipedia.org/wiki/Abandonware)
As long this is the case I cannot put my code under any specific open source software license. However the software might be used under the "Fair Use" act (https://en.wikipedia.org/wiki/FAIR_USE_Act) in the USA.
That being said, SAM's creator Mark Barton recently did an interview where he acknowledged the C reverse-engineered version and seemed to have no issue with its distribution.
If you would like to contribute or create an issue, please do so at the official GitHub page.