智能面试——录音及播放下载js-audio-recorder — post请求,formdata传参

录音插件 js-audio-recorder

image.png

bug:本地调试调取不起来麦克风

  • 浏览器配置安全域名 chrome://flags/
  • Insecure origins treated as secure
  • 输入域名即可
  • 电脑需要连接上耳机
<template>
  <div class="BaseRecorder">
    <div class="BaseRecorder-record">
      <el-button @click="startRecorder()">开始录音</el-button>
      <el-button @click="pauseRecorder()">暂停录音</el-button>
      <el-button @click="resumeRecorder()">继续录音</el-button>
      <el-button @click="stopRecorder()">结束录音</el-button>
    </div>
    <div class="BaseRecorder-play">
      <el-button @click="playRecorder()">录音播放</el-button>
      <el-button @click="pausePlayRecorder()">暂停录音播放</el-button>
      <el-button @click="resumePlayRecorder()">恢复录音播放</el-button>
      <el-button @click="stopPlayRecorder()">停止录音播放</el-button>
    </div>
    <div class="BaseRecorder-download">
      <el-button @click="downPCM()">下载PCM</el-button>
      <el-button @click="downWAV()">下载WAV</el-button>
    </div>
    <div class="BaseRecorder-destroy">
      <el-button type="error" @click="destroyRecorder()">销毁录音</el-button>
    </div>
    <div class="BaseRecorder-wave">
      <canvas ref="record"></canvas>
      <canvas ref="play"></canvas>
    </div>
  </div>
</template>

<script>
import Recorder from "js-audio-recorder";

export default {
  name: "home",
  data() {
    return {
      recorder: null,
      // 波浪图-录音
      drawRecordId: null,
      // 波浪图-播放
      drawPlayId: null,
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    // 初始化
    init() {
      this.recorder = new Recorder({
        // 采样位数,支持 8 或 16,默认是16
        sampleBits: 16,
        // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值
        sampleRate: 48000,
        // 声道,支持 1 或 2, 默认是1
        numChannels: 1,
        // 是否边录边转换,默认是false
        compiling: false,
      });
    },
    // 开始录音
    startRecorder() {
      this.recorder.start().then(
        () => {
          console.log("开始录音", this.recorder);
          this.drawRecord();
          this.recorder.onprogress = (params) => {
            console.log(params);

            // 此处控制数据的收集频率
            if (this.recorder.config.compiling) {
              console.log("音频总数据:", params.data);
            }
          };
          // 定时获取录音的数据并播放
          this.recorder.config.compiling &&
            (playTimer = setInterval(() => {
              let newData = this.recorder.getNextData();
              if (!newData.length) {
                return;
              }
              let byteLength = newData[0].byteLength;
              let buffer = new ArrayBuffer(newData.length * byteLength);
              let dataView = new DataView(buffer);

              // 数据合并
              for (let i = 0, iLen = newData.length; i < iLen; ++i) {
                for (let j = 0, jLen = newData[i].byteLength; j < jLen; ++j) {
                  dataView.setInt8(i * byteLength + j, newData[i].getInt8(j));
                }
              }

              // 将录音数据转成WAV格式,并播放
              let a = encodeWAV(
                dataView,
                config.sampleRate,
                config.sampleRate,
                config.numChannels,
                config.sampleBits
              );
              let blob = new Blob([a], { type: "audio/wav" });

              blob.arrayBuffer().then((arraybuffer) => {
                console.log(arraybuffer);
                // Player.play(arraybuffer);
              });
            }, 3000));
        },
        (error) => {
          // 出错了
          console.log(`${error.name} : ${error.message}`);
        }
      );
    },
    // 继续录音
    resumeRecorder() {
      this.recorder.resume();
    },
    // 暂停录音
    pauseRecorder() {
      this.recorder.pause();
      this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
      this.drawRecordId = null;
    },
    // 结束录音
    stopRecorder() {
      this.recorder.stop();
      this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
      this.drawRecordId = null;
    },
    // 录音播放
    playRecorder() {
      this.recorder.play();
      this.drawPlay(); // 绘制波浪图
    },
    // 暂停录音播放
    pausePlayRecorder() {
      this.recorder.pausePlay();
    },
    // 恢复录音播放
    resumePlayRecorder() {
      this.recorder.resumePlay();
      this.drawPlay(); // 绘制波浪图
    },
    // 停止录音播放
    stopPlayRecorder() {
      this.recorder.stopPlay();
    },
    // 销毁录音
    destroyRecorder() {
      this.recorder.destroy().then(() => {
        this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
        this.drawRecordId = null;

        this.drawPlayId && cancelAnimationFrame(this.drawPlayId);
        this.drawPlayId = null;

        this.recorder = null;
      });
    },

    /**
     *  下载录音文件
     * */
    // 下载pcm
    downPCM() {
      console.log("pcm: ", this.recorder.getPCMBlob());
      // 这里传参进去的时文件名
      this.recorder.downloadPCM("新文件");
    },
    // 下载wav
    downWAV() {
      console.log("wav: ", this.recorder.getWAVBlob());
      // 这里传参进去的时文件名
      this.recorder.downloadWAV("新文件");
    },

    /**
     * 绘制波浪图-录音
     * */
    drawRecord() {
      this.drawRecordId = requestAnimationFrame(this.drawRecord);
      this.drawWave({
        canvas: this.$refs.record,
        dataArray: this.recorder.getRecordAnalyseData(),
        bgcolor: "rgb(255, 128, 200)",
        lineWidth: 1,
        lineColor: "rgb(0, 128, 255)",
      });
    },
    /**
     * 绘制波浪图-播放
     * */
    drawPlay() {
      this.drawPlayId = requestAnimationFrame(this.drawPlay);
      this.drawWave({
        canvas: this.$refs.play,
        dataArray: this.recorder.getPlayAnalyseData(),
      });
    },
    drawWave({
      canvas,
      dataArray,
      bgcolor = "rgb(200, 200, 200)",
      lineWidth = 2,
      lineColor = "rgb(0, 0, 0)",
    }) {
      if (!canvas) return;

      const ctx = canvas.getContext("2d");
      const bufferLength = dataArray.length;
      // 一个点占多少位置,共有bufferLength个点要绘制
      const sliceWidth = canvas.width / bufferLength;
      // 绘制点的x轴位置
      let x = 0;

      // 填充背景色
      ctx.fillStyle = bgcolor;
      ctx.fillRect(0, 0, canvas.width, canvas.height);

      // 设定波形绘制颜色
      ctx.lineWidth = lineWidth;
      ctx.strokeStyle = lineColor;

      ctx.beginPath();

      for (let i = 0; i < bufferLength; i++) {
        const v = dataArray[i] / 128;
        const y = (v * canvas.height) / 2;

        if (i === 0) {
          // 第一个点
          ctx.moveTo(x, y);
        } else {
          // 剩余的点
          ctx.lineTo(x, y);
        }
        // 依次平移,绘制所有点
        x += sliceWidth;
      }

      // 最后一个点
      ctx.lineTo(canvas.width, canvas.height / 2);
      ctx.stroke();
    },
  },
};
</script>
<style lang="scss" scoped>
.BaseRecorder {
  & > div {
    margin: 20px 0;
  }
  &-wave {
    canvas {
      width: 100%;
      border: 1px solid #ccc;
    }
  }
}
</style>

智能面试页面

image.png

<template>
  <div class="flex1 w100 h100 bg">
    <div style="width: 300px" class="bg-white h100 flex-column center">
      <div class="blue size-30 mb-60">Java面试专场</div>
      <div class="size-26">张三</div>
      <div class="gray-2 mt-20 mb-100">18378562388</div>
      <el-button type="success" round @click="start()">开始面试</el-button>
    </div>
    <div class="flex-1 h100 over-hidden">
      <div
        class="h100 w65 flex1 flex-column"
        style="margin: 0 auto; min-width: 800px"
      >
        <div class="flex-1 scroll w100 pt-30">
          <div
            v-for="(item, index) in list.filter((item) => item.show)"
            :key="index"
            class="mb-30"
          >
            <div class="flex_l mb-30">
              <i class="el-icon-question size-28 blue mr-10"></i>
              <div class="">
                {{ item.topic }}
              </div>
            </div>
            <div class="flex_l" v-if="item.file">
              <el-avatar
                class="mr-10"
                size="small"
                src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
              ></el-avatar>
              <el-card class="flex-1"> 语音已发送 </el-card>
            </div>
            <div class="flex_l" v-if="item.answer">
              <el-avatar
                class="mr-10"
                size="small"
                src="https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
              ></el-avatar>
              <el-card class="flex-1">
                {{ item.answer }}
              </el-card>
            </div>
          </div>
        </div>
        <div class="w100 flex1 pb-30">
          <el-input
            type="textarea"
            placeholder="请输入内容"
            v-model="textarea"
            maxlength="500"
            show-word-limit
            :autosize="{ minRows: 4 }"
          >
          </el-input>
          <div class="w10 text-center">
            <el-button
              type="success"
              icon="el-icon-microphone"
              circle
              class="size-16 mb-10"
              @click="startRecorder"
              :disabled="disabled"
            ></el-button>
            <el-button
              :disabled="disabled"
              type="primary"
              round
              @click="submit(1)"
              >提交</el-button
            >
          </div>
        </div>
      </div>
    </div>
    <!-- 结果 -->
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      title="面试结果"
      :visible.sync="centerDialogVisible"
      width="600px"
      center
      :show-close="false"
      style="top: 16vh"
    >
      <el-result
        :icon="score >= 80 ? 'success' : score >= 60 ? 'warning' : 'error'"
        :title="score >= 80 ? '优秀' : score >= 60 ? '良好' : '不合格'"
        subTitle="面试结果"
      >
        <template slot="extra">
          <el-button type="primary" size="medium" @click="back">返回</el-button>
        </template>
      </el-result>
    </el-dialog>
    <!-- 录音 -->
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      title="正在录音..."
      :visible.sync="audioVisible"
      width="600px"
      center
      :show-close="false"
      style="top: 16vh"
    >
      <div class="mb-20 size-18" v-if="list[index]">
        {{ list[index].topic }}
      </div>
      <div class="BaseRecorder-wave">
        <canvas ref="record"></canvas>
        <!-- <canvas ref="play"></canvas> -->
      </div>
      <div class="center mt-20">
        <el-button type="primary" size="medium" @click="submit(2)"
          >提交</el-button
        >
      </div>
    </el-dialog>
  </div>
  <!-- <div class="BaseRecorder">
    <div class="BaseRecorder-record">
      <el-button @click="startRecorder()">开始录音</el-button>
      <el-button @click="pauseRecorder()">暂停录音</el-button>
      <el-button @click="resumeRecorder()">继续录音</el-button>
      <el-button @click="stopRecorder()">结束录音</el-button>
    </div>
    <div class="BaseRecorder-play">
      <el-button @click="playRecorder()">录音播放</el-button>
      <el-button @click="pausePlayRecorder()">暂停录音播放</el-button>
      <el-button @click="resumePlayRecorder()">恢复录音播放</el-button>
      <el-button @click="stopPlayRecorder()">停止录音播放</el-button>
    </div>
    <div class="BaseRecorder-download">
      <el-button @click="downPCM()">下载PCM</el-button>
      <el-button @click="downWAV()">下载WAV</el-button>
    </div>
    <div class="BaseRecorder-destroy">
      <el-button type="error" @click="destroyRecorder()">销毁录音</el-button>
    </div>
    <div class="BaseRecorder-wave">
      <canvas ref="record"></canvas>
      <canvas ref="play"></canvas>
    </div>
  </div> -->
</template>

<script>
import Recorder from "js-audio-recorder";
// import { subText, subAudio } from "../api/test.js";
import axios from "axios";
export default {
  name: "home",
  data() {
    return {
      index: null,
      disabled: true,
      list: [
        {
          topic: "题目1:1+2等于几?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
        {
          topic: "题目2:2+2等于几?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
        {
          topic: "题目3:白日依山尽的下一句是什么?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
      ],
      textarea: "",
      config: {
        headers: {
          "Content-Type": "multipart/form-data",
        },
      },
      centerDialogVisible: false, //结果弹窗
      score: "", //得分
      audioVisible: false, //录音弹窗

      recorder: null,
      // 波浪图-录音
      drawRecordId: null,
      // 波浪图-播放
      drawPlayId: null,
    };
  },
  mounted() {
    this.init();
  },
  beforeDestroy() {
    this.destroyRecorder();
  },
  methods: {
    start(i = 0) {
      this.index = i;
      this.list[this.index].show = true;
      this.disabled = false;
    },
    // type 1 文字  2 语音
    async submit(type) {
      if (type == 1) {
        if (!this.textarea.trim()) {
          this.$message({
            message: "请输入答案",
            type: "warning",
          });
          return;
        }
        this.list[this.index].answer = this.textarea;
        this.disabled = true;
        this.textarea = "";

        const formData = new FormData();
        formData.append("topic", this.list[this.index].topic);
        formData.append("answer", this.list[this.index].answer);
        const { data } = await axios.post(
          "/ququ/recognize-text",
          formData,
          this.config
        );
        console.log(data.result, 99);
        this.list[this.index].result = data.result;
        this.index += 1;
        if (this.index == this.list.length) {
          this.centerDialogVisible = true;
          this.index = null;
          console.log(this.list, 88);
          this.score =
            (this.list.filter((item) => item.result == "对").length * 100) /
            this.list.length;
        } else {
          this.start(this.index);
        }
      } else {
        this.stopRecorder();
        this.audioVisible = false;
        this.list[this.index].file = this.recorder.getWAVBlob();
        this.disabled = true;

        const formData = new FormData();
        formData.append("topic", this.list[this.index].topic);
        formData.append("file", this.list[this.index].file);
        const { data } = await axios.post(
          "/ququ/recognize-video",
          formData,
          this.config
        );
        console.log(data.result, 99);
        this.list[this.index].result = data.result;
        this.index += 1;
        if (this.index == this.list.length) {
          this.centerDialogVisible = true;
          this.index = null;
          console.log(this.list, 88);
          this.score =
            (this.list.filter((item) => item.result == "对").length * 100) /
            this.list.length;
        } else {
          this.start(this.index);
        }
      }
    },
    back() {
      this.centerDialogVisible = false;
      this.list = [
        {
          topic: "题目1:1+2等于几?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
        {
          topic: "题目2:2+2等于几?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
        {
          topic: "题目3:白日依山尽的下一句是什么?",
          show: false,
          answer: "",
          result: "",
          file: "",
        },
      ];
    },

    // 初始化
    init() {
      this.recorder = new Recorder({
        // 采样位数,支持 8 或 16,默认是16
        sampleBits: 16,
        // 采样率,支持 11025、16000、22050、24000、44100、48000,根据浏览器默认值
        sampleRate: 48000,
        // 声道,支持 1 或 2, 默认是1
        numChannels: 1,
        // 是否边录边转换,默认是false
        compiling: false,
      });
    },
    // 开始录音
    startRecorder() {
      this.recorder.start().then(
        () => {
          console.log("开始录音", this.recorder);
          this.audioVisible = true;
          this.drawRecord();
          this.recorder.onprogress = (params) => {
            console.log(params);

            // 此处控制数据的收集频率
            if (this.recorder.config.compiling) {
              console.log("音频总数据:", params.data);
            }
          };
          // 定时获取录音的数据并播放
          this.recorder.config.compiling &&
            (playTimer = setInterval(() => {
              let newData = this.recorder.getNextData();
              if (!newData.length) {
                return;
              }
              let byteLength = newData[0].byteLength;
              let buffer = new ArrayBuffer(newData.length * byteLength);
              let dataView = new DataView(buffer);

              // 数据合并
              for (let i = 0, iLen = newData.length; i < iLen; ++i) {
                for (let j = 0, jLen = newData[i].byteLength; j < jLen; ++j) {
                  dataView.setInt8(i * byteLength + j, newData[i].getInt8(j));
                }
              }

              // 将录音数据转成WAV格式,并播放
              let a = encodeWAV(
                dataView,
                config.sampleRate,
                config.sampleRate,
                config.numChannels,
                config.sampleBits
              );
              let blob = new Blob([a], { type: "audio/wav" });

              blob.arrayBuffer().then((arraybuffer) => {
                console.log(arraybuffer);
                // Player.play(arraybuffer);
              });
            }, 3000));
        },
        (error) => {
          // 出错了
          console.log(`${error.name} : ${error.message}`);
        }
      );
    },
    // 继续录音
    resumeRecorder() {
      this.recorder.resume();
    },
    // 暂停录音
    pauseRecorder() {
      this.recorder.pause();
      this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
      this.drawRecordId = null;
    },
    // 结束录音
    stopRecorder() {
      this.recorder.stop();
      this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
      this.drawRecordId = null;
    },
    // 录音播放
    playRecorder() {
      this.recorder.play();
      this.drawPlay(); // 绘制波浪图
    },
    // 暂停录音播放
    pausePlayRecorder() {
      this.recorder.pausePlay();
    },
    // 恢复录音播放
    resumePlayRecorder() {
      this.recorder.resumePlay();
      this.drawPlay(); // 绘制波浪图
    },
    // 停止录音播放
    stopPlayRecorder() {
      this.recorder.stopPlay();
    },
    // 销毁录音
    destroyRecorder() {
      this.recorder.destroy().then(() => {
        this.drawRecordId && cancelAnimationFrame(this.drawRecordId);
        this.drawRecordId = null;

        this.drawPlayId && cancelAnimationFrame(this.drawPlayId);
        this.drawPlayId = null;

        this.recorder = null;
      });
    },

    /**
     *  下载录音文件
     * */
    // 下载pcm
    downPCM() {
      console.log("pcm: ", this.recorder.getPCMBlob());
      // 这里传参进去的时文件名
      this.recorder.downloadPCM("新文件");
    },
    // 下载wav
    downWAV() {
      console.log("wav: ", this.recorder.getWAVBlob());
      // 这里传参进去的时文件名
      this.recorder.downloadWAV("新文件");
    },

    /**
     * 绘制波浪图-录音
     * */
    drawRecord() {
      this.drawRecordId = requestAnimationFrame(this.drawRecord);
      this.drawWave({
        canvas: this.$refs.record,
        dataArray: this.recorder.getRecordAnalyseData(),
        bgcolor: "#a8e1fc",
        lineWidth: 1,
        lineColor: "rgb(255, 128, 200)",
      });
    },
    /**
     * 绘制波浪图-播放
     * */
    drawPlay() {
      this.drawPlayId = requestAnimationFrame(this.drawPlay);
      this.drawWave({
        canvas: this.$refs.play,
        dataArray: this.recorder.getPlayAnalyseData(),
      });
    },
    drawWave({
      canvas,
      dataArray,
      bgcolor = "rgb(200, 200, 200)",
      lineWidth = 2,
      lineColor = "rgb(0, 0, 0)",
    }) {
      if (!canvas) return;

      const ctx = canvas.getContext("2d");
      const bufferLength = dataArray.length;
      // 一个点占多少位置,共有bufferLength个点要绘制
      const sliceWidth = canvas.width / bufferLength;
      // 绘制点的x轴位置
      let x = 0;

      // 填充背景色
      ctx.fillStyle = bgcolor;
      ctx.fillRect(0, 0, canvas.width, canvas.height);

      // 设定波形绘制颜色
      ctx.lineWidth = lineWidth;
      ctx.strokeStyle = lineColor;

      ctx.beginPath();

      for (let i = 0; i < bufferLength; i++) {
        const v = dataArray[i] / 128;
        const y = (v * canvas.height) / 2;

        if (i === 0) {
          // 第一个点
          ctx.moveTo(x, y);
        } else {
          // 剩余的点
          ctx.lineTo(x, y);
        }
        // 依次平移,绘制所有点
        x += sliceWidth;
      }

      // 最后一个点
      ctx.lineTo(canvas.width, canvas.height / 2);
      ctx.stroke();
    },
  },
};
</script>
<style lang="scss" scoped>
.BaseRecorder {
  & > div {
    margin: 20px 0;
  }
  &-wave {
    canvas {
      width: 100%;
      border: 1px solid #ccc;
    }
  }
}
</style>

post请求,formdata传参

const formData = new FormData();
formData.append("topic", this.list[this.index].topic);
formData.append("answer", this.list[this.index].answer);
const { data } = await axios.post(
     "/ququ/recognize-text",
     formData,
     {
        headers: {
          "Content-Type": "multipart/form-data",
        },
     }
 );
console.log(data.result, 99);

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/531989.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

产品开发流程

产品开发流程 时间&#xff1a;2024年04月10日 作者&#xff1a;小蒋聊技术 邮箱&#xff1a;wei_wei10163.com 微信&#xff1a;wei_wei10 产品开发流程_小蒋聊技术_免费在线阅读收听下载 - 喜马拉雅欢迎收听小蒋聊技术的类最新章节声音“产品开发流程”。时间&#xff1a;…

单链表专题

文章目录 目录1. 链表的概念及结构2. 实现单链表2.1 链表的打印2.2 链表的尾插2.3 链表的头插2.4 链表的尾删2.5 链表的头删2.6 查找2.7 在指定位置之前插入数据2.8 在指定位置之后插入数据2.9 删除pos节点2.10 删除pos之后的节点2.11 销毁链表 3. 链表的分类 目录 链表的概念…

设计模式学习笔记 - 设计模式与范式 -行为型:10.迭代器模式(中):遍历集合时,为什么不能增删集合?

概述 上篇文章&#xff0c;我们通过给 ArrayList 和 LinkedList 容器实现迭代器&#xff0c;学习了迭代器模式的原理、实现和设计意图。迭代器模式主要主要是解耦容器代码和遍历代码。 本章&#xff0c;我们来深挖一下&#xff0c;如果在使用迭代器遍历集合的同时增加、删除集…

无尘净化棉签:清洁革新的里程碑

随着科技的不断进步&#xff0c;日常生活中的许多小物件也在不断地得到创新和改良。其中&#xff0c;棉签作为一种常见的清洁工具&#xff0c;经历了从传统到现代的革新&#xff0c;引入了无尘棉签的概念&#xff0c;为清洁领域带来了一场革命性的变革。本文优斯特将探讨无尘棉…

运维工具-Backup集合

RepositoryLicenseStarCreatedAtUpdatedAtDescriptionjeessy2/backup-xMIT2842021-11-132023-12-15带Web界面的数据库/文件备份增强工具noovertime7/gin-mysqlbakMIT382022-06-212023-02-06一款分布式高性能的备份系统&#xff0c;支持 MySQL、ElasticSearch 备份&#xff0c;多…

《高通量测序技术》分享,生物信息学生信流程的性能验证,以肿瘤NGS基因检测为例。

这是这本书&#xff0c;第四章第五节的内容&#xff0c;这一部分是以NGS检测肿瘤基因突变为例&#xff0c;描述了其原理和大概流程&#xff0c;这和以前我分享的病原宏基因组高通量测序性能确认方案可以互相补充&#xff0c;大家可以都看一下&#xff0c;但是想要真正的弄懂&am…

【Leetcode】1702. 修改后的最大二进制字符串

文章目录 题目思路代码复杂度分析时间复杂度空间复杂度 结果总结 题目 题目链接&#x1f517; 给你一个二进制字符串 b i n a r y binary binary &#xff0c;它仅有 0 0 0 或者 1 1 1 组成。你可以使用下面的操作任意次对它进行修改&#xff1a; 操作 1 &#xff1a;如果…

背 单 词

单词&#xff1a; 买考研词汇闪过 研究艾宾浩斯遗忘曲线 https://www.bilibili.com/video/BV18Y4y1h7YR/?spm_id_from333.337.search-card.all.click&vd_source5cbefe6dd70d6d84830a5891ceab2bf9 单词方法 闪记背两排&#xff08;5min&#xff09;重复一遍&#xff08;2mi…

解决Can‘t connect to HTTPS URL because the SSL module is not available

把C:\develop\An3\Library\bin的这些文件&#xff0c;复制到C:\develop\An3\DLLs中

2006年重邮801信号与系统考研真题与详解

本系列文章为重庆邮电大学801信号与系统考研真题与详解&#xff0c;前面文章链接如下&#xff1a; 2003年重邮801信号与系统考研真题与详解 2004年重邮801信号与系统考研真题与详解 2005年重邮801信号与系统考研真题与详解 文章目录 前言一对一极速提分辅导2006年重邮801信号与…

基于GAN的图像补全实战

数据与代码地址见文末 论文地址:http://iizuka.cs.tsukuba.ac.jp/projects/completion/data/completion_sig2017.pdf 1.概述 图像补全,即补全图像中的覆盖和缺失部分, 网络整体结构如下图所示,整体网络结构还是采取GAN,对于生成器,网络结构采取Unet的形式,首先使用卷积…

字节发布AnimateDiff-Lightning文生视频模型——可在线免费试玩

Sora文生视频大模型 随着Sora文生视频大模型的爆火&#xff0c;文生视频大模型必定是各大人工智能公司竞争的主要领域。虽然 Sora模型的视频效果绝对是领先地位&#xff0c;但是Sora模型目前还没有开放使用&#xff0c;我们并无法直接使用。前期我们也介绍过字节发布的MagicVi…

【优选算法专栏】专题十三:队列+宽搜(一)

本专栏内容为&#xff1a;算法学习专栏&#xff0c;分为优选算法专栏&#xff0c;贪心算法专栏&#xff0c;动态规划专栏以及递归&#xff0c;搜索与回溯算法专栏四部分。 通过本专栏的深入学习&#xff0c;你可以了解并掌握算法。 &#x1f493;博主csdn个人主页&#xff1a;小…

C++ 线程库(thread)与锁(mutex)

一.线程库(thread) 1.1 线程类的简单介绍 thread类文档介绍 在C11之前&#xff0c;涉及到多线程问题&#xff0c;都是和平台相关的&#xff0c;比如windows和linux下各有自己的接口&#xff0c;这使得代码的可移植性比较差。C11中最重要的特性就是对线程进行支持了&#xff…

群联AI云防护中的防盗链技术原理及其作用探析---

一、引言 随着云计算和AI技术的快速发展&#xff0c;云防护方案已经成为现代企业防范网络攻击和保护数字资产的重要手段之一。群联科技作为存储解决方案和技术服务的领导者&#xff0c;已将其AI技术应用于云端防护系统中&#xff0c;并特别强化了防盗链功能&#xff0c;以帮助…

element-plus blur和select冲突失效导致移除焦点清空文本框内容失效解决方案

问题 需求是做一个查询企业的功能&#xff0c;期望必须进行选择后进行查询&#xff0c;如果用户自主输入并没有进行选择&#xff0c;失去焦点的时候清空文本框里面的内容&#xff0c;给el-autocomplete添加blur事件后发现&#xff0c;在下拉没有出现之前快速失去焦点才能触发b…

SuperGluePretrainedNetwork调用接口版本(两个版本!)

本脚本是一个基于Python的应用&#xff0c;旨在演示如何使用SuperGlue算法进行图像之间的特征匹配。SuperGlue是一个强大的特征匹配工具&#xff0c;能够在不同的图像之间找到对应的关键点。这个工具尤其适用于计算机视觉任务&#xff0c;如立体视觉、图像拼接、对象识别和追踪…

express操作mysql数据库的方法总结

作为前端&#xff0c;我们无需去考虑数据库的问题&#xff0c;业务场景需要的话&#xff0c;我们可以mock数据&#xff0c;满足暂时的联调场景。但是对于数据库&#xff0c;我们前端可以不用&#xff0c;却不能不了解不懂。所以这篇文章整理下&#xff0c;nodejs框架express中怎…

【通信原理笔记】【三】模拟信号调制——3.5 角度调制(FM、PM)与其频谱特性

文章目录 前言一、相位与频率二、PM和FM的数学表示三、FM的频谱四、FM信号的带宽——卡松公式总结 前言 在之前介绍的几种调制方式中&#xff0c;我提到信噪比时计算的是用户解调后的信噪比&#xff0c;然而在北邮通信原理课中考虑的是解调器输入的信噪比&#xff0c;即考虑的…

H-GAP: Humanoid Control with a Generalist Planner

ICLR 2024 paper Intro 本文方法研究利用大量人类动捕数据以及衍生的类人轨迹数据&#xff0c;基于MPC实现下游任务中机器人运动控制。 method H-GAP 的算法框架分为三个部分&#xff1a;基于VQ-VAE对状态动作序列的离散化&#xff0c;基于Transformer对latent code的先验…