adachsoft/text-to-audio-contract 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adachsoft/text-to-audio-contract

最新稳定版本:0.1.0

Composer 安装命令:

composer require adachsoft/text-to-audio-contract

包简介

Vendor-agnostic PHP contract and DTOs for text-to-speech (TTS) providers.

README 文档

README

Shared contract library for text-to-speech (TTS) providers.

This package defines a minimal, vendor-agnostic PHP contract for converting text into audio, together with simple DTOs describing input and output payloads.

Installation

Require the package via Composer:

composer require adachsoft/text-to-audio-contract

Requirements

  • PHP 8.3+

Provided API

Interface

  • AdachSoft\\TextToAudioContract\\Contract\\TextToSpeechInterface
    • single method:
      • synthesize(TextToSpeechRequestDto $request): TextToSpeechResponseDto
      • throws TextToSpeechException on provider errors or synthesis failures

DTOs

  • AdachSoft\\TextToAudioContract\\Dto\\TextToSpeechRequestDto (final)
    • describes TTS input:
      • text to be spoken (no instructions)
      • logical voice identifier
      • output format (mp3, wav, opus)
      • optional language, speed, pitch, volume, style profile
  • AdachSoft\\TextToAudioContract\\Dto\\TextToSpeechResponseDto (final)
    • describes TTS result:
      • raw audio content (binary string)
      • format
      • optional duration (seconds) and sample rate

Exception

  • AdachSoft\\TextToAudioContract\\Exception\\TextToSpeechException

Versioning

This library is versioned using Git tags. The initial stable contract is released as 0.1.0.

Backwards compatibility of the public contract (interface and DTO shapes) is treated as a priority.

Development

This project uses the shared code style and quality configuration from adachsoft/php-code-style:

  • PHP-CS-Fixer configuration via .php-cs-fixer.php
  • PHPStan configuration via phpstan.neon
  • Rector configuration via rector.php

Basic commands (recommended via composer.json scripts):

  • Run tests: vendor/bin/phpunit
  • Run static analysis: composer stan
  • Check code style: composer cs:check
  • Fix code style: composer cs:fix
  • Run Rector: composer rector

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固