# @aristech-org/stt-client 中文文档

规范地址：https://npmcn.com/package/%40aristech-org/stt-client/

版本：2\.5\.0
npm 元数据更新时间：2026-05-04T08:27:22.131Z
中文译文更新时间：2026-11-06T19:11:03.596Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40aristech-org/stt-client
原文对照：https://npmcn.com/package/%40aristech-org/stt-client/?lang=original
项目主页：https://github.com/aristech-de/stt-clients/blob/main/node/README.md
源码仓库：https://github.com/aristech-de/stt-clients

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：156 kB，8 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：2 个
- 首次发布：2024-10-21T11:55:47.498Z
- 最新版本发布：2026-05-04T08:27:21.978Z
- 近 30 天下载量：5428（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：18（近 12 个月 2 个）

## 中文简介

Aristech 语音对文本 API 的节点客户端库

## 安装

```sh
npm install @aristech-org/stt-client
```

也可以使用：`pnpm add @aristech-org/stt-client`、`yarn add @aristech-org/stt-client`、`bun add @aristech-org/stt-client`

## README

# 节点JS的 Aristech STT - 客户端

这是Aristech STT-Server的节点JS客户端执行.

## 安装

```bash
npm install @aristech-org/stt-client
```

## 使用量

```typescript
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'))
```

报告有好几个例子 [实例](https://github.com/aristech-de/stt-clients/blob/main/node/examples/) 目录 :

-   [识别.ts](https://github.com/aristech-de/stt-clients/blob/main/node/examples/recognize.ts):与上例大致相同.
-   [流出中.ts](https://github.com/aristech-de/stt-clients/blob/main/node/examples/streaming.ts):演示如何在接收临时结果的同时将音频流到服务器.
-   [型号.ts](https://github.com/aristech-de/stt-clients/blob/main/node/examples/models.ts): 演示如何从服务器获取可用的模型.
-   [nlp 函数数](https://github.com/aristech-de/stt-clients/blob/main/node/examples/nlpFunctions.ts): 演示如何列出已配置的 NLP- Servers 和对应函数 .
-   [nlp 处理器](https://github.com/aristech-de/stt-clients/blob/main/node/examples/nlpProcess.ts):通过使用STT-Server作为代理来演示如何在文本上进行NLP处理.
-   [账户.ts](https://github.com/aristech-de/stt-clients/blob/main/node/examples/account.ts): 演示如何从服务器获取账户信息.

运行示例时使用 `npx tsx`。例如:

```sh
npx tsx examples/streaming.ts
```

### API 密钥

如果您没有获得 API 密钥而是一个符号, 秘密和主机, 您可以和我们一起生成 API 密钥 [API 密钥生成器](https://www.aristech.de/api-key-generator/?type=stt)。 。 。 .

或者您仍然可以手动提供连接选项 .

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

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

## 构建

要重建原始文件中生成的打字符文件, 运行 :

```bash
npm run generate
```

要建立图书馆,运行:

```bash
npm run build
```

## 常见问题

### @aristech-org/stt-client 是什么？

Aristech 语音对文本 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 和提交记录判断。

