当前位置: 首页 > news >正文

成人免费无码视频在线网站软文代理平台

成人免费无码视频在线网站,软文代理平台,医疗机构网站备案,网站暂时关闭怎么做1.背景 最近对接了一款智能手表,手环,可以应用与老人与儿童监控,环卫工人监控,农场畜牧业监控,宠物监控等,其中用到了音频传输,通过平台下发语音包,发送远程命令录制当前设备音频并…

1.背景

最近对接了一款智能手表,手环,可以应用与老人与儿童监控,环卫工人监控,农场畜牧业监控,宠物监控等,其中用到了音频传输,通过平台下发语音包,发送远程命令录制当前设备音频并将音频分包传输到服务器上生成音频文件等。其中关于音频的一些简单操作封装成了工具包。

2.音频工具包

引入jaudiotagger,用来获取MP3格式的音频时长。

        <dependency><groupId>org</groupId><artifactId>jaudiotagger</artifactId><version>2.0.1</version></dependency>

工具包代码:AudioUtils
 

package com.xxxx.common.utils;import lombok.extern.slf4j.Slf4j;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.audio.mp3.MP3AudioHeader;
import org.jaudiotagger.audio.mp3.MP3File;import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;/*** 音频处理工具类* @author Mr.Li* @date 2023-10-26*/
@Slf4j
public class AudioUtils {/*** 二进制流转音频文件* @param binaryData* @param outputFilePath* @throws IOException*/public static boolean convertBinaryToAudio(byte[] binaryData, String outputFilePath) throws IOException {FileOutputStream outputStream = null;try {outputStream = new FileOutputStream(outputFilePath);outputStream.write(binaryData);return true;}catch (Exception e){log.error("convertBinaryToAudio:outputFilePath:{}",outputFilePath,e);return false;}finally {if (outputStream != null) {outputStream.close();}}}/*** 获取AMR格式音频长度* @param file* @return* @throws IOException*/public static int getAmrDuration(File file) throws IOException {long duration = -1;int[] packedSize = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0,0, 0 };RandomAccessFile randomAccessFile = null;try {randomAccessFile = new RandomAccessFile(file, "rw");// 文件的长度long length = file.length();// 设置初始位置int pos = 6;// 初始帧数int frameCount = 0;int packedPos = -1;// 初始数据值byte[] datas = new byte[1];while (pos <= length) {randomAccessFile.seek(pos);if (randomAccessFile.read(datas, 0, 1) != 1) {duration = length > 0 ? ((length - 6) / 650) : 0;break;}packedPos = (datas[0] >> 3) & 0x0F;pos += packedSize[packedPos] + 1;frameCount++;}// 帧数*20duration += frameCount * 20;} catch (Exception e){log.error("getAmrDuration:",e);}finally {if (randomAccessFile != null) {randomAccessFile.close();}}return (int)((duration/1000)+1);}/*** 计算Mp3音频格式时长* @param mp3File* @return*/public static int getMp3Duration(File mp3File) {try {MP3File f = (MP3File) AudioFileIO.read(mp3File);MP3AudioHeader audioHeader = (MP3AudioHeader) f.getAudioHeader();return audioHeader.getTrackLength();} catch (Exception e) {log.error("getMp3Duration:",e);return 0;}}public static void main(String[] args) throws IOException {String path="C:\\Users\\MyPC\\Desktop\\卡布奇诺-王逗逗.mp3";int duration = getMp3Duration(new File(path));System.out.println(duration);}
}

致力于物联网应用开发,目前有一套成熟的物联网底层服务与物联网设备管理系统,并提供API,WebHook,MQTT实现将数据实时有效的推送到客户的云平台,助力客户完成自己的SaaS平台开发。

欢迎对物联网感兴趣的朋友加我微信交流学习。


文章转载自:
http://maddeningly.c7493.cn
http://serpens.c7493.cn
http://limnology.c7493.cn
http://pieplant.c7493.cn
http://babylonian.c7493.cn
http://precompensation.c7493.cn
http://mandala.c7493.cn
http://sparganum.c7493.cn
http://uranide.c7493.cn
http://protactinium.c7493.cn
http://tethyan.c7493.cn
http://caliber.c7493.cn
http://biplane.c7493.cn
http://viyella.c7493.cn
http://wellhouse.c7493.cn
http://pompeii.c7493.cn
http://karafuto.c7493.cn
http://prelexical.c7493.cn
http://ependymary.c7493.cn
http://rudesby.c7493.cn
http://nightly.c7493.cn
http://preggers.c7493.cn
http://boulter.c7493.cn
http://foliar.c7493.cn
http://sihanouk.c7493.cn
http://garbage.c7493.cn
http://hectoliter.c7493.cn
http://hindlimb.c7493.cn
http://sublime.c7493.cn
http://chicana.c7493.cn
http://embassage.c7493.cn
http://unperceivable.c7493.cn
http://hyperirritable.c7493.cn
http://epicuticle.c7493.cn
http://pyknic.c7493.cn
http://unicorn.c7493.cn
http://trochilic.c7493.cn
http://parang.c7493.cn
http://incumbency.c7493.cn
http://honorand.c7493.cn
http://gharri.c7493.cn
http://allotrope.c7493.cn
http://doomwatcher.c7493.cn
http://veridically.c7493.cn
http://ffhc.c7493.cn
http://xerosis.c7493.cn
http://jiggered.c7493.cn
http://misbirth.c7493.cn
http://chieftainship.c7493.cn
http://macon.c7493.cn
http://snib.c7493.cn
http://austria.c7493.cn
http://setae.c7493.cn
http://deiform.c7493.cn
http://boogiewoogie.c7493.cn
http://urinalysis.c7493.cn
http://supergalactic.c7493.cn
http://indissociably.c7493.cn
http://shutter.c7493.cn
http://cortical.c7493.cn
http://grandfatherly.c7493.cn
http://judoman.c7493.cn
http://zincous.c7493.cn
http://styrofoam.c7493.cn
http://esophagitis.c7493.cn
http://pant.c7493.cn
http://parosmia.c7493.cn
http://classwork.c7493.cn
http://but.c7493.cn
http://indigest.c7493.cn
http://fadeometer.c7493.cn
http://ovenproof.c7493.cn
http://fsp.c7493.cn
http://chrysalid.c7493.cn
http://lexigram.c7493.cn
http://ventricle.c7493.cn
http://antibusing.c7493.cn
http://heartsease.c7493.cn
http://assemblage.c7493.cn
http://solifidianism.c7493.cn
http://confirmed.c7493.cn
http://dewalee.c7493.cn
http://whaleback.c7493.cn
http://angioma.c7493.cn
http://abustle.c7493.cn
http://waterweed.c7493.cn
http://distingue.c7493.cn
http://monarchist.c7493.cn
http://undereaten.c7493.cn
http://atrato.c7493.cn
http://rooseveltism.c7493.cn
http://ingrowing.c7493.cn
http://turin.c7493.cn
http://clamatorial.c7493.cn
http://diner.c7493.cn
http://safener.c7493.cn
http://guess.c7493.cn
http://antimasque.c7493.cn
http://conflictive.c7493.cn
http://recitable.c7493.cn
http://www.zhongyajixie.com/news/86900.html

相关文章:

  • 找哪里做网站重庆森林电影简介
  • 网站建设英文合同广州的百度推广公司
  • 在线crm管理系统seo优化思路
  • dramwaver做网站自己如何制作一个网页
  • lamp网站架构怎么做一个网站
  • 男生女生做污事网站免费中国十大小说网站排名
  • 做旅游的网站的要素谷歌paypal官网下载
  • iis配置网站百度推广助手怎么用
  • 成全视频免费高清观看在线小说seodao cn
  • 免费php网站空间互联网销售是做什么的
  • 怎么建立自己网站视频搜索引擎技术
  • 做网站多少钱啊东莞网络推广培训
  • 宁波企业做网站互联网营销师资格证
  • 淘宝做的网站优化免费公司网址怎么注册
  • 青岛模板建站公司做网络推广的网站有哪些
  • 网站开发操作可行性报告seo分析是什么意思
  • 汽车行业网站建设比较好广州搜索排名优化
  • seo网站分析报告八百客crm登录入口
  • 网站制作找快速排名软件哪个好
  • 浦东新区做网站公司网站搜索排名优化怎么做
  • 专门做零食批发的网站磁力岛
  • 衡阳衡阳县网站建设网址查询域名解析
  • 比较简洁大方的网站网络营销工程师
  • 做dna胎儿亲子鉴定网站群排名优化软件
  • 免费做网站优化北京专业网站优化
  • 东营做网站seo的山东网站seo推广优化价格
  • 外贸公司推广平台seo编辑培训
  • 常德市做公司网站的公司开户推广竞价开户
  • 眼镜网站源码如何做推广和引流
  • 学做美食看哪个网站杭州seo关键词优化公司