Git Product home page Git Product logo

v0ice-b0t-ds1's Introduction

简单的语音客服 dsl

开发环境

  • 操作系统:
    • 发行版:Ubuntu 22.04.1
    • 内核:Linux version 5.15.74.2-microsoft-standard-WSL2
  • 语言:
    • c++: std 17+
  • 编译工具:
    • cmake:3.14+
    • clang or g++
  • 数据库:sqlite3

目录结构

.
├── CMakeLists.txt			# cmake脚本
├── DslConfig.h.in			# dsl的宏定义
├── README.md				
├── clang_format.bash		# clang-format 脚本
├── client					# 客户端源代码
├── doc						# 文档
├── server					# 服务端源代码
├── test					# 测试脚本源代码
└── thirdparty				# 第三方库

安装方法

依赖库

部分已经下载到thirdparty文件夹中,还有一部分需要手动安装

安装命令

以使用g++ 和 cmake为例

进入项目根目录

cmake -S . -B build

进入build目录

cd build

cmake --build .

进入bin目录

cd ../bin

cmake -S . -B build
cd build
cmake --build .
cd ../bin
$ tree
.
├── dsl_client
└── dsl_server

测试安装命令

cmake -S . -B build -DTESTS=ON

cd build

cmake --build .

cd ../bin

cmake -S . -B build -DTESTS=ON
cd build
cmake --build .
cd ../bin
$ tree
.
├── dsl_client
├── dsl_server
└── test
    ├── test_server_interpreter
    ├── test_*
    .
    .
    .
    └── test_string

使用方法

服务端

./dsl_server --help
Usage: dsl [-h] [--file PATH] [--port PORT] [--log PATH] [--debug] [--database PATH]

Optional arguments:
  -h, --help            shows help message and exits
  -v, --version         prints version information and exits
  -f, --file PATH       path to script file [default: "./script"]
  -p, --port PORT       port to listen [default: 9000]
  -l, --log PATH        path to save log file [default: ""]
  -d, --debug           debug mode
  --database PATH       path to database file [default: "./db/dsl.db"]

不指定参数的情况下将以默认路径来执行

客户端

./dsl_client --help
Usage: dsl-client [-h] [--server ADDRESS] [--port PORT] [--debug] [--log PATH] [--uid UID]

Optional arguments:
  -h, --help            shows help message and exits
  -v, --version         prints version information and exits
  -s, --server ADDRESS  server address [default: "127.0.0.1"]
  -p, --port PORT       port to server [default: 9000]
  -d, --debug           show log debug info,if log mode open
  -l, --log PATH        path to save log file, empty for no log [default: ""]
  -u, --uid UID         user id

数据库结构

userinfo

名称 类型 含义
id int 用户id,唯一识别用户信息
name varchar(64) 用户姓名
amount int 用户帐单
credit int 用户话费
data varchar(255) 用户信息
create table userinfo(
    id int primary key,
    name varchar(64),
    amount int,
    credit int,
    data varchar(255)
)

服务端详情

可进入server目录查看README.md

客户端详情

可进入client目录查看README.md

文档

可进入doc目录查看对应文档

v0ice-b0t-ds1's People

Contributors

chocolzs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.