原文:CSDN大数据
↑ 点击上方蓝字关注我们,和小伙伴一起聊技术!
聊天机器人到底是什么呢?说白了,就是计算机程序通过听觉或文本方法进行对话。当今最流行的四个对话机器人是:苹果的Siri、微软Cortana、谷歌助理、亚马逊的Alexa。他们能够帮你查比分、打电话,当然,偶尔他们也会出错。
本文主要会详细介绍聊天机器人在文本方面的运作,我们将看到如何使用深度学习模型训练聊天机器人用我们所希望的方式在社交媒体上进行对话。
| #pragma once | |
| #include <chrono> | |
| #include <ofLog.h> | |
| #include <string> | |
| namespace AI | |
| { | |
| namespace PerformanceTools | |
| { |
| class Camera2d : public ofCamera { | |
| private: | |
| ofVec2f mouseStart; | |
| ofVec2f startPosition; | |
| float zoom; | |
| float maxZoom = .01; | |
| float minZoom = 1; | |
| float zoomSpeed = 1. / 500; | |
| public: | |
| void setup() { |
| #pragma once | |
| #include "ofMain.h" | |
| class ZoomableRegion2D { | |
| private: | |
| float speed = 5; | |
| float zoom = 1; | |
| ofVec2f offset, startOffset, startDrag; | |
| float startZoom; |
| #include "ofMain.h" | |
| class ofApp : public ofBaseApp { | |
| public: | |
| ofImage earth; | |
| ofQuaternion qTo; | |
| void setup() { | |
| ofBackground(0); |
| #include "ofMain.h" | |
| class ofApp : public ofBaseApp { | |
| public: | |
| ofImage earth; | |
| ofQuaternion qTo; | |
| void setup() { | |
| ofBackground(0); |
| // | |
| // ofBase64.h | |
| // | |
| // Created by shugohirao on 2018/05/09. | |
| // | |
| #pragma once | |
| #include "Poco/Base64Encoder.h" | |
| namespace ofBase64 { |
| /** | |
| * openFrameworks + ofxVideoRecorder setup to record video with h264 | |
| * You will need ffmpeg and libx264 in your system. On mac, you can use homebrew. | |
| * reason for yuv420p: | |
| * 'QuickTime only supports YUV planar color space with 4:2:0 chroma subsampling (use -vf format=yuv420p or -pix_fmt yuv420p) for H.264 video.' | |
| * as mentioned here: https://trac.ffmpeg.org/wiki/Encode/H.264 | |
| */ | |
| recorder.setVideoCodec("libx264"); | |
| string fileName = ofToDataPath("v" + ofGetTimestampString() + ".mp4"); |
| #include "ofMain.h" | |
| class ofApp : public ofBaseApp { | |
| public: | |
| ofImage img; | |
| ofEasyCam cam; | |
| ofSpherePrimitive sphere; | |
| float zoom = 0.5; | |
| float xoff = 0; | |
| float yoff = 0; |
原文:CSDN大数据
↑ 点击上方蓝字关注我们,和小伙伴一起聊技术!
聊天机器人到底是什么呢?说白了,就是计算机程序通过听觉或文本方法进行对话。当今最流行的四个对话机器人是:苹果的Siri、微软Cortana、谷歌助理、亚马逊的Alexa。他们能够帮你查比分、打电话,当然,偶尔他们也会出错。
本文主要会详细介绍聊天机器人在文本方面的运作,我们将看到如何使用深度学习模型训练聊天机器人用我们所希望的方式在社交媒体上进行对话。
For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.
If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.
You can check that your version of FFmpeg can encode Hap using
ffmpeg -encoders | grep hap