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 2mo 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 49% 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

2943d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f26c0a01344710bdf9a76c98652f23e98f69472c4b8791a7e079774e8a65f4f8?d=identicon)[sheawey](/maintainers/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

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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