glebsons4ntos/filament-voice-transcribe 问题修复 & 功能扩展

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

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

glebsons4ntos/filament-voice-transcribe

Composer 安装命令:

composer require glebsons4ntos/filament-voice-transcribe

包简介

Filament fields to transcribe text and speak text using browser API.

README 文档

README

Latest Version on Packagist Total Downloads

Filament Voice Transcribe adds voice-powered components to Filament forms and infolists.

Use it to transcribe speech into form fields with the browser Speech Recognition API, or to read infolist text aloud with the browser Speech Synthesis API.

Requirements

  • PHP 8.2+
  • Laravel with Filament 5
  • A browser with Web Speech API support

Installation

Install the package via Composer:

composer require glebsons4ntos/filament-voice-transcribe

Publish the Filament assets:

php artisan filament:assets

You should run this command again after updating the package so Filament can publish the latest JavaScript and CSS assets.

Usage

Voice Input

Use VoiceInput when you need a regular text input with a voice button.

use GlebsonS4ntos\FilamentVoiceTranscribe\Forms\VoiceInput;

VoiceInput::make('name')
    ->voiceLanguage('pt-BR');

You may place the voice button before or after the input:

VoiceInput::make('name')
    ->voiceLanguage('pt-BR')
    ->prefixVoiceButton();

VoiceInput::make('name')
    ->voiceLanguage('pt-BR')
    ->suffixVoiceButton();

The button can also be rendered outside the input wrapper:

VoiceInput::make('name')
    ->voiceLanguage('pt-BR')
    ->inlineVoiceButton(false);

Voice Textarea

Use VoiceTextarea for longer text.

use GlebsonS4ntos\FilamentVoiceTranscribe\Forms\VoiceTextarea;

VoiceTextarea::make('description')
    ->voiceLanguage('pt-BR')
    ->rows(5);

The voice button can be positioned around the textarea:

VoiceTextarea::make('description')
    ->voiceLanguage('pt-BR')
    ->bottomRightVoiceButton();

Available positions:

->topLeftVoiceButton()
->topCenterVoiceButton()
->topRightVoiceButton()
->centerLeftVoiceButton()
->centerRightVoiceButton()
->bottomLeftVoiceButton()
->bottomCenterVoiceButton()
->bottomRightVoiceButton()

Voice Text Entry

Use VoiceTextEntry in infolists when you want to display text and let the user listen to it.

use GlebsonS4ntos\FilamentVoiceTranscribe\Infolists\VoiceTextEntry;

VoiceTextEntry::make('description')
    ->voiceLanguage('pt-BR');

It extends Filament's TextEntry, so you can combine it with common text entry methods:

VoiceTextEntry::make('description')
    ->voiceLanguage('pt-BR')
    ->copyable();

You may also move the voice button:

VoiceTextEntry::make('description')
    ->voiceLanguage('pt-BR')
    ->suffixVoiceButton();

Language

Set the browser speech language with voiceLanguage():

->voiceLanguage('pt-BR')
->voiceLanguage('en-US')
->voiceLanguage('es-ES')

The value should be a valid BCP 47 language tag supported by the browser and operating system.

Browser Support

This package uses the browser Web Speech API, so support depends on the user's browser and device.

  • Speech recognition is not available in every browser.
  • Voice transcription is automatically disabled when the browser does not support the Speech Recognition API.
  • Speech synthesis voices depend on the operating system and installed voices.
  • If a language voice is not installed, the browser may fall back to a default voice.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固