华为HMS Core音频编辑服务(Audio Editor Kit)依托自身AI技术的研发优势,上线全新的歌声合成音色及伴奏,给音视频创作者提供更多的创作可能。在短视频场景中,用户自定义歌词的歌声结合视频让用户感受到身临其境,自由表达自己的情绪;在虚拟偶像场景中,歌声合成功能赋予虚拟歌手们演唱风格各异的歌曲,带来创意无限。

HMS Core音频编辑服务歌声合成的AI Singer模型能力通过字级别输入歌词进行音素转换,就可以为用户创作音乐,也可预置曲目合成歌声。通过自研音高模型,让音高曲线在保持输入曲谱的音高精准度的同时改善自然度,更接近人的真实演唱。使用最新的生成式模型,带来更好的音色还原度、建模更多的演唱细节,同时高清声码器能够真实还原48k高清音质。

另外,用户通过自由调整颤音、滑音、呼吸音等功能,可根据情感需求调整歌声演唱技巧。当前歌声合成服务已开放了情流行女声、国风女声和民谣男声音色,未来会持续更新更多音色。

华为HMS Core音频编辑服务(Audio Editor Kit)让机器“演唱”出真实度的歌声,仅需简单的集成获得,以下是开发者应用集成音频编辑服务歌声合成能力的具体步骤。

开发步骤

1. 开发准备

1.1注册成为开发者

在开发应用前需要在华为开发者联盟网站上注册成为开发者并完成实名认证,具体方法请参见帐号注册认证。

1.2创建项目及应用

参见创建项目,然后在项目下创建应用完成应用的创建,特殊配置如下:

选择平台:选择“Web”。

1.3打开相关服务

使用Audio Editor Kit服务需要您在AppGallery Connect上打开Audio Editor Kit服务开关,具体操作步骤请参见打开服务开关。

2.歌声合成功能集成

2.1同步接口(流式)

2.1.1获取access_token鉴权信息

使用开发者联盟界面获得的客户端ID以及对应密钥,发送HTTPS POST请求,获取查询access_token。获取方式请参见客户端模式(Client Credentials)。

2.1.2调用同步接口(流式)

通过以上步骤获取的access_token信息,发送HTTPS POST调用同步接口(流式)。

示例代码(Java)如下所示:

其中requestUrl = "https://audioeditor-api-drcn.cloud.huawei.com/v1/audioeditor/gateway/ai/ttsing/sync"。

请点击下载MusicXML文件,并上传:

  1. /**
  2. * 调用同步接口(流式)
  3. * @throws Exception IO异常
  4. */
  5. private static void syncTask() throws Exception {
  6. // 设置请求header
  7. PostMethod postMethod = new PostMethod(requestUrl);
  8. // 设置文本类型(String),例:"application/json;charset=utf-8"
  9. postMethod.setRequestHeader("Content-Type", contentType);
  10. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  11. postMethod.setRequestHeader("X-Request-ID", requestId);
  12. // 设置App包名(String),例:"com.huawei.demo"
  13. postMethod.setRequestHeader("X-Package-Name", pacageName);
  14. // 设置App所在国家(String),例:"cn"
  15. postMethod.setRequestHeader("X-Country-Code", countryCode);
  16. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  17. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  18. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  19. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  20. // 设置动态获取的AccessToken(String)
  21. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  22. // 设置请求body
  23. Map<String, Object> bodyMap = new HashMap<>();
  24. Map<String, Object> dataMap = new HashMap<>();
  25. Map<String, Object> configMap = new HashMap<>();
  26. // filePath是MusicXML文件路径(含文件名、后缀)
  27. String lyricFilePath = "filePath";
  28. dataMap.put("lyric", FileUtils.readFileToString(new File(lyricFilePath), "UTF-8"));
  29. dataMap.put("language", "chinese");
  30. configMap.put("type", 1);
  31. configMap.put("outputEncoderFormat", 0);
  32. configMap.put("wordDurationForceAlign", "false");
  33. bodyMap.put("data", dataMap);
  34. bodyMap.put("config", configMap);
  35. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  36. postMethod.setRequestEntity(requestEntity);
  37. HttpClient httpClient = new HttpClient();
  38. int ret = httpClient.executeMethod(postMethod);
  39. if (ret == 200) {
  40. Header responseHeader = postMethod.getResponseHeader("content-type");
  41. if ("application/octet-stream".equals(responseHeader.getValue())) {
  42. InputStream rpsContent = postMethod.getResponseBodyAsStream();
  43. // filePath是要保存文件的路径(含文件名、PCM文件后缀)
  44. String filePath = "filePath";
  45. FileUtils.copyInputStreamToFile(rpsContent, new File(filePath));
  46. } else {
  47. String errorString = postMethod.getResponseBodyAsString();
  48. System.out.println(errorString);
  49. }
  50. } else {
  51. System.out.println("callApi failed: ret =" + ret + " rsp=" + postMethod.getResponseBodyAsString());
  52. }
  53. }

使用预置曲目输入歌词:

  1. /**
  2. * 调用同步接口(流式)
  3. * @throws Exception IO异常
  4. */
  5. private static void syncTask() throws Exception {
  6. // 设置请求header
  7. PostMethod postMethod = new PostMethod(requestUrl);
  8. // 设置文本类型(String),例:"application/json;charset=utf-8"
  9. postMethod.setRequestHeader("Content-Type", contentType);
  10. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  11. postMethod.setRequestHeader("X-Request-ID", requestId);
  12. // 设置App包名(String),例:"com.huawei.demo"
  13. postMethod.setRequestHeader("X-Package-Name", pacageName);
  14. // 设置App所在国家(String),例:"cn"
  15. postMethod.setRequestHeader("X-Country-Code", countryCode);
  16. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  17. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  18. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  19. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  20. // 设置动态获取的AccessToken(String)
  21. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  22. // 设置请求body
  23. Map<String, Object> bodyMap = new HashMap<>();
  24. Map<String, Object> dataMap = new HashMap<>();
  25. Map<String, Object> configMap = new HashMap<>();
  26. String[] lyrics = {"跟随心跳的节拍", "感受自由的畅快", "把烦恼通通抛开", "我们一起嗨", "调整呼吸的节拍", "保持最好的状态", "奔向耀眼的未来", "哦康忙北北"};
  27. dataMap.put("lyrics", lyrics);
  28. dataMap.put("accompanimentId", "1");
  29. dataMap.put("isAutoFill", "false");
  30. dataMap.put("language", "chinese");
  31. configMap.put("type", 1);
  32. configMap.put("outputEncoderFormat", 0);
  33. configMap.put("wordDurationForceAlign", "false");
  34. bodyMap.put("data", dataMap);
  35. bodyMap.put("config", configMap);
  36. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  37. postMethod.setRequestEntity(requestEntity);
  38. HttpClient httpClient = new HttpClient();
  39. int ret = httpClient.executeMethod(postMethod);
  40. if (ret == 200) {
  41. Header responseHeader = postMethod.getResponseHeader("content-type");
  42. if ("application/octet-stream".equals(responseHeader.getValue())) {
  43. InputStream rpsContent = postMethod.getResponseBodyAsStream();
  44. // filePath是要保存文件的路径(含文件名、PCM文件后缀)
  45. String filePath = "filePath";
  46. FileUtils.copyInputStreamToFile(rpsContent, new File(filePath));
  47. } else {
  48. String errorString = postMethod.getResponseBodyAsString();
  49. System.out.println(errorString);
  50. }
  51. } else {
  52. System.out.println("callApi failed: ret =" + ret + " rsp=" + postMethod.getResponseBodyAsString());
  53. }
  54. }

注意:

上述代码中xxxxx对应的值请根据实际情况填写,具体取值请参见同步接口(流式)

2.2异步接口

2.2.1创建异步任务

通过access_token信息,发送HTTPS POST创建歌声合成异步任务。

示例代码(Java)如下所示:

其中requestUrl = "https://audioeditor-api-drcn.cloud.huawei.com/v1/audioeditor/gateway/ai/ttsing/async/task/create"。

请点击下载MusicXML文件,并上传:

  1. /**
  2. * 调用创建异步任务接口
  3. * @throws Exception IO异常
  4. */
  5. private static void creatAsyncTask() throws Exception {
  6. // 设置请求header
  7. PostMethod postMethod = new PostMethod(requestUrl);
  8. // 设置文本类型(String),例:"application/json;charset=utf-8"
  9. postMethod.setRequestHeader("Content-Type", contentType);
  10. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  11. postMethod.setRequestHeader("X-Request-ID", requestId);
  12. // 设置App包名(String),例:"com.huawei.demo"
  13. postMethod.setRequestHeader("X-Package-Name", pacageName);
  14. // 设置App所在国家(String),例:"cn"
  15. postMethod.setRequestHeader("X-Country-Code", countryCode);
  16. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  17. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  18. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  19. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  20. // 设置动态获取的AccessToken(String)
  21. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  22. // 设置请求body
  23. Map<String, Object> bodyMap = new HashMap<>();
  24. Map<String, Object> dataMap = new HashMap<>();
  25. Map<String, Object> configMap = new HashMap<>();
  26. // filePath是MusicXML文件路径(含文件名、后缀)
  27. String lyricFilePath = "filePath";
  28. dataMap.put("lyric", FileUtils.readFileToString(new File(lyricFilePath), "UTF-8"));
  29. dataMap.put("language", "chinese");
  30. configMap.put("type", 1);
  31. configMap.put("outputEncoderFormat", 0);
  32. configMap.put("wordDurationForceAlign", "false");
  33. bodyMap.put("data", dataMap);
  34. bodyMap.put("config", configMap);
  35. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  36. postMethod.setRequestEntity(requestEntity);
  37. HttpClient httpClient = new HttpClient();
  38. int ret = httpClient.executeMethod(postMethod);
  39. String rpsContent = postMethod.getResponseBodyAsString();
  40. if (ret == 200) {
  41. System.out.println(rpsContent);
  42. } else {
  43. System.out.println("callApi failed: ret =" + ret + " rsp=" + rpsContent);
  44. }
  45. }

使用预置曲目输入歌词:

  1. /**
  2. * 调用创建异步任务接口
  3. * @throws Exception IO异常
  4. */
  5. private static void creatAsyncTask() throws Exception {
  6. // 设置请求header
  7. PostMethod postMethod = new PostMethod(requestUrl);
  8. // 设置文本类型(String),例:"application/json;charset=utf-8"
  9. postMethod.setRequestHeader("Content-Type", contentType);
  10. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  11. postMethod.setRequestHeader("X-Request-ID", requestId);
  12. // 设置App包名(String),例:"com.huawei.demo"
  13. postMethod.setRequestHeader("X-Package-Name", pacageName);
  14. // 设置App所在国家(String),例:"cn"
  15. postMethod.setRequestHeader("X-Country-Code", countryCode);
  16. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  17. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  18. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  19. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  20. // 设置动态获取的AccessToken(String)
  21. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  22. // 设置请求body
  23. Map<String, Object> bodyMap = new HashMap<>();
  24. Map<String, Object> dataMap = new HashMap<>();
  25. Map<String, Object> configMap = new HashMap<>();
  26. String[] lyrics = {"跟随心跳的节拍", "感受自由的畅快", "把烦恼通通抛开", "我们一起嗨", "调整呼吸的节拍", "保持最好的状态", "奔向耀眼的未来", "哦康忙北北"};
  27. dataMap.put("lyrics", lyrics);
  28. dataMap.put("accompanimentId", "1");
  29. dataMap.put("isAutoFill", "false");
  30. dataMap.put("language", "chinese");
  31. configMap.put("type", 1);
  32. configMap.put("outputEncoderFormat", 0);
  33. configMap.put("wordDurationForceAlign", "false");
  34. bodyMap.put("data", dataMap);
  35. bodyMap.put("config", configMap);
  36. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  37. postMethod.setRequestEntity(requestEntity);
  38. HttpClient httpClient = new HttpClient();
  39. int ret = httpClient.executeMethod(postMethod);
  40. String rpsContent = postMethod.getResponseBodyAsString();
  41. if (ret == 200) {
  42. System.out.println(rpsContent);
  43. } else {
  44. System.out.println("callApi failed: ret =" + ret + " rsp=" + rpsContent);
  45. }
  46. }

注意:

上述代码中xxxxx对应的值请根据实际情况填写,具体取值请参见创建异步任务

2.2.2查询异步任务状态

用户创建异步任务后,可以通过调用该接口,获取任务处理状态等信息。任务处理完成后,会返回任务的下载地址,直接访问该地址即可下载文件。

通过access_token信息,和创建异步任务获取到的taskId发送HTTPS POST查询歌声合成异步任务状态。

示例代码(Java)如下所示:

其中requestUrl = "https://audioeditor-api-drcn.cloud.huawei.com/v1/audioeditor/gateway/ai/ttsing/async/task/status"。

  1. /**
  2. * 调用查询异步任务状态接口
  3. * @param taskId 创建异步任务获取的taskId
  4. * @throws Exception IO异常
  5. */
  6. private static void queryAsyncTaskInfo(String taskId) throws Exception {
  7. // 设置请求header
  8. PostMethod postMethod = new PostMethod(requestUrl);
  9. // 设置文本类型(String),例:"application/json;charset=utf-8"
  10. postMethod.setRequestHeader("Content-Type", contentType);
  11. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  12. postMethod.setRequestHeader("X-Request-ID", requestId);
  13. // 设置App包名(String),例:"com.huawei.demo"
  14. postMethod.setRequestHeader("X-Package-Name", pacageName);
  15. // 设置App所在国家(String),例:"cn"
  16. postMethod.setRequestHeader("X-Country-Code", countryCode);
  17. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  18. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  19. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  20. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  21. // 设置动态获取的AccessToken(String)
  22. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  23. // 设置请求body
  24. Map<String, Object> bodyMap = new HashMap<>();
  25. // taskId对应的值是创建异步任务时返回的任务ID(taskId)
  26. bodyMap.put("taskId", taskId);
  27. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  28. postMethod.setRequestEntity(requestEntity);
  29. HttpClient httpClient = new HttpClient();
  30. int ret = httpClient.executeMethod(postMethod);
  31. String rpsContent = postMethod.getResponseBodyAsString();
  32. if (ret == 200) {
  33. System.out.println(rpsContent);
  34. } else {
  35. System.out.println("callApi failed: ret =" + ret + " rsp=" + rpsContent);
  36. }
  37. }

注意:

上述代码中xxxxx对应的值请根据实际情况填写,具体取值请参见查询异步任务状态

2.2.3取消异步任务

用户创建歌声合成异步任务后,可以通过调用此接口,取消指定异步任务并删除相应任务数据。

通过access_token信息和创建异步任务获取到的taskId,发送HTTPS POST取消异步任务。

示例代码(Java)如下所示:

其中requestUrl = "https://audioeditor-api-drcn.cloud.huawei.com/v1/audioeditor/gateway/ai/ttsing/async/task/cancel"。

  1. /**
  2. * 调用取消异步任务接口
  3. * @param taskId 创建异步任务获取的taskId
  4. * @throws Exception IO异常
  5. */
  6. private static void cancelAsyncTask(String taskId) throws Exception {
  7. // 设置请求header
  8. PostMethod postMethod = new PostMethod(requestUrl);
  9. // 设置文本类型(String),例:"application/json;charset=utf-8"
  10. postMethod.setRequestHeader("Content-Type", contentType);
  11. // 设置请求ID(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  12. postMethod.setRequestHeader("X-Request-ID", requestId);
  13. // 设置App包名(String),例:"com.huawei.demo"
  14. postMethod.setRequestHeader("X-Package-Name", pacageName);
  15. // 设置App所在国家(String),例:"cn"
  16. postMethod.setRequestHeader("X-Country-Code", countryCode);
  17. // 设置App标识(String),例:"9af1aeda-531b-407a-80b4-65b40ef77bd6"
  18. postMethod.setRequestHeader("HMS-APPLICATION-ID", applicationId);
  19. // 设置证书指纹(String),例:"xxxxxxxxxxxxxxx"
  20. postMethod.setRequestHeader("certFingerprint", certFingerprint);
  21. // 设置动态获取的AccessToken(String)
  22. postMethod.setRequestHeader("Authorization","Bearer " + accessToken);
  23. // 设置请求body
  24. Map<String, Object> bodyMap = new HashMap<>();
  25. // taskId对应的值是创建异步任务时返回的任务ID(taskId)
  26. bodyMap.put("taskId", taskId);
  27. RequestEntity requestEntity = new StringRequestEntity(JSONObject.toJSONString(bodyMap),"application/json" ,"UTF-8");
  28. postMethod.setRequestEntity(requestEntity);
  29. HttpClient httpClient = new HttpClient();
  30. int ret = httpClient.executeMethod(postMethod);
  31. String rpsContent = postMethod.getResponseBodyAsString();
  32. if (ret == 200) {
  33. System.out.println(rpsContent);
  34. } else {
  35. System.out.println("callApi failed: ret =" + ret + " rsp=" + rpsContent);
  36. }
  37. }

注意:

上述代码中xxxxx对应的值请根据实际情况填写,具体取值请参见取消异步任务

除了歌声合成能力,音频编辑服务还提供音频基础剪辑、AI配音、音源分离、空间渲染、变声降噪等音频处理能力,更多信息可以访问官网获得

了解更多详情>>

访问华为开发者联盟官网

获取开发指导文档

华为移动服务开源仓库地址:GitHubGitee

关注我们,第一时间了解 HMS Core 最新技术资讯~

AI赋能音乐创作,人人都是音视频创作者的更多相关文章

  1. android音视频点/直播模块开发

      音视频 版权声明:本文为博主原创文章,未经博主允许不得转载. 前言 随着音视频领域的火热,在很多领域(教育,游戏,娱乐,体育,跑步,餐饮,音乐等)尝试做音视频直播/点播功能,那么作为开发一个小白, ...

  2. Android音视频点/直播模块开发实践总结-zz

    随着音视频领域的火热,在很多领域(教育,游戏,娱乐,体育,跑步,餐饮,音乐等)尝试做音视频直播/点播功能.那么作为开发一个小白,如何快速学习音视频基础知识,了解音视频编解码的传输协议,编解码方式,以及 ...

  3. AI音乐创作,让每一个人都成为音乐家

    从录音带.MP3到专业的耳机.音箱,随着音乐消费方式的不断升级,音乐创作的专业"门槛"也在AI技术的加持下逐渐大众化,创作者的创新设计.创作频率也在持续增强,能降低创作门槛且智能化 ...

  4. 解密优酷智能生产技术,看 AI 赋能内容数字化

    2021 年,随着社会节奏的加快,用户碎片化消费时间不断增加,当前短视频的消费用户规模已超 7.73 亿人,短视频的市场规模超过 2000 亿元.短视频行业发展迅速,但也存在低质内容泛滥,精品内容稀缺 ...

  5. 网易云易盾CTO朱浩齐:我们是如何用AI赋能内容安全?

    本文由  网易云发布. 5月19日,LiveVideoStack携手网易云易盾,共同打造了“娱乐多媒体开发应用实践”专题,帮助开发者和泛娱乐平台运营人员,提升技术能力,突破难点,拓展思路与视野. 在专 ...

  6. 腾讯QQ会员技术团队:人人都可以做深度学习应用:入门篇(下)

    四.经典入门demo:识别手写数字(MNIST) 常规的编程入门有"Hello world"程序,而深度学习的入门程序则是MNIST,一个识别28*28像素的图片中的手写数字的程序 ...

  7. 【腾讯Bugly干货分享】人人都可以做深度学习应用:入门篇

    导语 2016年,继虚拟现实(VR)之后,人工智能(AI)的概念全面进入大众的视野.谷歌,微软,IBM等科技巨头纷纷重点布局,AI 貌似将成为互联网的下一个风口. 很多开发同学,对人工智能非常感兴趣, ...

  8. 【总结整理】面试pm常见的问题---摘自《人人都是产品经理》

    求职路上,“怼”来“怼”去的面试问题 人人都是产品经理社区 发布于 2018-10-29 19:53:06 举报 阅读数:1418 ​​在求职路上,面对那些被“怼”到过的面试问题,应该如何处理? 一个 ...

  9. 一张图表,人人都能建立自己的AARRR运营模型

    每次跟同行聊运营,聊用户,聊产品,最后都会回到AARRR模型上来,这个用户全生命周期模型概括了互联网产品运营的5个关键环节. 获客是运营的基础,促进用户活跃才能让产品有生命力,提升留存减少流失让用户规 ...

  10. 食物图片变菜谱:这篇CVPR论文让人人都可以学习新料理

    根据 Facebook 的统计,Instgram 上的美食图片数量已经超过 3 亿张.然而,获取食物烹饪方法的途径依然有限,例如,通过烹饪网站或相关教程.怎样能够挖掘丰富食物图片背后的烹饪方法,让每个 ...

随机推荐

  1. 这里聊聊扫地机的 IOT 开发

    以下内容为本人的著作,如需要转载,请声明原文链接微信公众号「englyf」https://www.cnblogs.com/englyf/p/16663833.html 消费者使用扫地机通常的方式是通过 ...

  2. 接口测试神器Apifox,亲测好用!

    自己关注的公众号比较多,之前有收到过有关 Apifox 的文章,自己也是大致看看,还没有用过它! 最近看到比较多有关 Apifox 的文章,所以自己就花了点时间去研究它,使用完后发现确实比Postma ...

  3. 使用pktmon抓包

    在Windows上遇到网络问题,需要抓包的时候之前我们会使用netmon和Microsoft Message Analyzer.随着时间的推移,微软已经停止了对Microsoft Message An ...

  4. thinkphp5.1 cookie跨域、thinkphp5.1 session跨域、tp5.1cookie跨域

    cookie跨域: //config/cookie.php return [ //... //仅7.3.0及以上适用 'samesite' => 'None', //是否加密cookie值,fa ...

  5. Elasticsearch:Java 运用示例

    在今天的文章中,我们来介绍如何使用Java来访问Elasticsearch. 首先,我们必须在我们的系统中安装Elasticsearch. Maven 配置 针对Java的开发,我们必须在pom.xm ...

  6. 使用filebeat过滤掉部分字段

    host,agent,ecs三个字段也是不让drop的 processors: - drop_fields: fields: ["log","input",&q ...

  7. Linux恢复误删除的文件或者目录

    文章转载自:https://www.jianshu.com/p/662293f12a47 linux不像windows有个回收站,使用rm -rf *基本上文件是找不回来的. 那么问题来了: 对于li ...

  8. 【前端必会】webpack的目标代码

    背景 webpack生成什么样的代码呢?同的模块依赖的写法(import.export export default),会导致生成代码的不同,下面介绍普通的import与export 开始 导出PI1 ...

  9. python_flask开发环境设置

    flask开发环境设置,在powershell终端窗口,可以通过一下方式设置: # 设置当前app实例 $env:FLASK_APP="app:create_app()" #将当前 ...

  10. Linx__Ubuntu_APT

    apt介绍 apt是Advanced Packaging Tool的简称. 在Ubuntu下,我们可以使用apt命令进行软件包的更新,安装,删除,清理等 类似于Windows的软件管理工具. 就是Ce ...