zoukankan      html  css  js  c++  java
  • 添加语音功能

    http://www.kuitao8.com/20150916/4055.shtml
    php利用安装ffmpeg-php扩展来获取对视频信息操作

    http://www.cnblogs.com/zox2011/archive/2013/03/20/2971724.html 

    FFmpegPHP的安装使用详解  

    https://github.com/PHP-FFMpeg/PHP-FFMpeg/
    PHP FFmpeg

    录音文件识别

    https://help.aliyun.com/document_detail/32378.html?spm=5176.doc52787.6.558.DTwmrC

    先用composer下载 ffmpeg

    (在homestead环境下安装较容易)

    vagrant 安装 ffmpeg  (apt-get install ffmpeg)(采用网易镜像) 

    例:转成8k采样率

       $ffmpeg = FFMpegFFMpeg::create(

            [

                'ffmpeg.binaries'  => '/usr/bin/ffmpeg',

                'ffprobe.binaries' => '/usr/bin/ffprobe',

            ]

        );

        $dir = resource_path('20170609171458.mp3');

        $audio = $ffmpeg->open( $dir );

        $audio->filters()->resample(8000);

        $format = new FFMpegFormatAudioMp3();

    //    $format->on('progress', function ($audio, $format, $percentage) {

    //        echo "$percentage % transcoded";

    //    });

        $format

            ->setAudioChannels(2);

        $audio->save($format, resource_path('convert.mp3'));

  • 相关阅读:
    链表详解自带代码
    队列
    单词翻转
    表达式求值
    一元多项式
    循环链表
    学生成绩管理系统
    双向循环链表
    双向链表
    静态链表
  • 原文地址:https://www.cnblogs.com/wzjwffg/p/9883925.html
Copyright © 2011-2022 走看看