@aristech-org/stt-client

中文文档
2.5.0发布于 2026/05/04MITTypeScriptES Module近 30 天下载 5428

A Node.js client library for the Aristech Speech-to-Text API

原始使用文档
文档目录4 节
  1. Installation
  2. Usage
  3. API Key
  4. Build

Aristech STT-Client for NodeJS

This is the NodeJS client implementation for the Aristech STT-Server.

Installation

npm install @aristech-org/stt-client

Usage

import { SttClient } from '@aristech-org/stt-client'

const client = new SttClient({
  apiKey: process.env['ARISTECH_STT_API_KEY'], // This is the default and can be omitted
})
const results = await client.recognizeFile('path/to/audio/file.wav')
console.log(results.map(r => r.chunks[0].alternatives[0].text).join('\n'))

There are several examples in the examples directory:

  • recognize.ts: Pretty much the same as the example above.
  • streaming.ts: Demonstrates how to stream audio to the server while receiving interim results.
  • models.ts: Demonstrates how to get the available models from the server.
  • nlpFunctions.ts: Demonstrates how to list the configured NLP-Servers and the coresponding functions.
  • nlpProcess.ts: Demonstrates how to perform NLP processing on a text by using the STT-Server as a proxy.
  • account.ts: Demonstrates how to retrieve the account information from the server.

To run the examples, use npx tsx. For example:

npx tsx examples/streaming.ts

API Key

If you didn't get an API key but a token, secret and host, you can generate an API key with our API key generator.

Alternatively you can still provide the connection options manually.
import { SttClient } from '@aristech-org/stt-client'

const client = new SttClient({
  host: 'stt.example.com:443',
  auth: {
    token: 'your-token',
    secret: 'your-secret'
  }
})

Build

To rebuild the generated typescript files from the proto file, run:

npm run generate

To build the library, run:

npm run build

版本与发布记录

@aristech-org/stt-client 共发布 18 个版本,首次发布于 2024/10/21;过去 12 个月发布了 2 个版本。

版本发布日期距今
2.5.0latest2026/05/046 个月前
2.4.02025/11/2611 个月前
2.3.02025/10/141.1 年前
2.2.22025/09/301.1 年前
2.2.12025/08/251.2 年前
2.2.02025/05/151.5 年前

关于 @aristech-org/stt-client 的常见问题

@aristech-org/stt-client 是什么?

A Node.js client library for the Aristech Speech-to-Text API

如何安装 @aristech-org/stt-client?

在项目目录运行 npm install @aristech-org/stt-client,或使用 pnpm add / yarn add / bun add。

@aristech-org/stt-client 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aristech-org/stt-client 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aristech-org/stt-client 可以商用吗?

@aristech-org/stt-client 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aristech-org/stt-client 的下载量有多少?

根据 npm 官方下载统计,@aristech-org/stt-client 在 2026/10/07 – 2026/11/05 这 30 天内被下载 5,428 次,日均约 181 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aristech-org/stt-client 还在维护吗?

最新版本 2.5.0 发布于 2026/05/04(6 个月前);至今共发布 18 个版本,其中过去 12 个月发布了 2 个;首次发布于 2024/10/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。