PHPackages                             delz/xfyun - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. delz/xfyun

ActiveLibrary[API Development](/categories/api)

delz/xfyun
==========

科大讯飞 REST API PHP SDK

0.2(8y ago)162384[1 issues](https://github.com/delznet/xfyun-php-sdk/issues)MITPHPPHP &gt;=7.0.0

Since Apr 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/delznet/xfyun-php-sdk)[ Packagist](https://packagist.org/packages/delz/xfyun)[ RSS](/packages/delz-xfyun/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

科大讯飞 REST API PHP SDK
=====================

[](#科大讯飞-rest-api-php-sdk)

如何获取
----

[](#如何获取)

```
composer require delz/xfyun

```

参考文档地址
------

[](#参考文档地址)

[http://doc.xfyun.cn/rest\_api/](http://doc.xfyun.cn/rest_api/)

调用语音合成接口
--------

[](#调用语音合成接口)

1. 实例化客户端对象

    $client = new Client("{APPID}","{APIKEY}");
2. 生成TTS对象，并发送请求

```
    try {
        $content = $client->createTTS()->setText('您好')->send();
        $file = fopen(__DIR__ . '/test.wav',"w");
        fwrite($file, $content);
        fclose($file);
    } catch(ApiException $e) {
        echo $e->getMessage();
    }

```

语音听写接口
------

[](#语音听写接口)

1. 实例化客户端对象

    $client = new Client("{APPID}","{APIKEY}");
2. 生成IAT对象，并发送请求

```
    try {
        $content = $client->createIAT()->setAudio(file_get_contents(__DIR__.'/test.wav'))->send();
        echo $content;
    } catch(ApiException $e) {
        echo $e->getMessage();
    }

```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2993d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6504428?v=4)[sheawey](/maintainers/sheawey)[@sheawey](https://github.com/sheawey)

---

Top Contributors

[![sheawey87](https://avatars.githubusercontent.com/u/212719452?v=4)](https://github.com/sheawey87 "sheawey87 (5 commits)")

### Embed Badge

![Health badge](/badges/delz-xfyun/health.svg)

```
[![Health](https://phpackages.com/badges/delz-xfyun/health.svg)](https://phpackages.com/packages/delz-xfyun)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
