You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mac-say

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mac-say

The macOS built-in `say` CLI for JavaScript

0.3.2
latest
Source
npmnpm
Version published
Weekly downloads
13
-65.79%
Maintainers
1
Weekly downloads
 
Created
Source

mac-say

The macOS built-in say CLI for JavaScript

Install

npm i mac-say

Usage

import { say } from "mac-say";

await say("Hello, world!");
await say("Hello! My name is Cellos.", { voice: "Cellos" });

API

say(text, options?)

text

Type: string

The content to be converted to audible speech.

options

Type: SayOptions

Optional. All available options are listed below:

type SayOptions = {
	voice?: string;
	rate?: number;
	audioDevice?: string;
	quality?: number;
	inputFile?: string;
	outputFile?: string;
	networkSend?: string;
	channels?: number;
	skipRunningCheck?: boolean;
};

Please refer to man say for usage of all options.

getAudioDevices()

To obtain a list of audio output devices.

Returns a Promise<Device[]>.

getDataFormats(fileFormat)

To obtain a list of audio data formats for a file format specified explicitly or by file name.

Returns a Promise<DataFormat[]>.

fileForamt

Type: string

Formats other than linear PCM are specified by giving their format identifiers (aac, alac).

getFileFormats()

To obtain a list of writable file formats.

Returns a Promise<FileFormat[]>.

getVoices()

To obtain a list of voices installed in the system.

Returns a Promise<Voice[]>.

checkIfSayIsRunning()

To obtain the information of the say process.

Returns a Promise<ProcessDescriptor | undefined>.

killRunningSay()

To kill the say process if it's running.

  • Say - Spoken Content - macOS built-in Spoken Content interface

License

MIT

Keywords

say

FAQs

Package last updated on 04 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts