⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 recognizer.h

📁 ears-0.32, linux下有用的语音信号处理工具包
💻 H
字号:
#pragma interface#ifndef Recognizer_h#define Recognizer_h#include <string>#include <list.h>class pattern;typedef list<string> SList;class RecognizerImplementation // This ABC and the class below form a bridge{public:  explicit RecognizerImplementation (bool d=0) : debug_(d) {}  virtual ~RecognizerImplementation() =0;  virtual void dimension (int, int) =0;  virtual void get (const string&, int, int) =0;  virtual void train() =0;  virtual int eval (const pattern&) =0;  virtual void write (ostream&) =0;  virtual void read  (istream&) =0;  virtual int training_needed() =0;  virtual const char* pat_type() =0;  virtual SList& deb_info() =0;protected:  bool debug_;};  class recognizer     // The class through which a recog is accessed{public:  recognizer (const string& m, bool debug=0);  ~recognizer()                 { delete p; }  void train()                  { p->train(); }  void dimension (int w, int n) { p->dimension (w,n); }  void get (const string& s, int wc, int pc)                                 { p->get (s,wc,pc); }  int operator<< (const pattern& s) { return p->eval (s); }  // evaluation  int training_needed()         { return p->training_needed(); }  const string pat_type()       { return p->pat_type(); }  SList& deb_info()             { return p->deb_info(); }  friend ostream& operator<< (ostream& o, const recognizer& p)	    { (p.p)->write(o); return o; }  friend istream& operator>> (istream& i, const recognizer& p)	    { (p.p)->read(i); return i; }private:  RecognizerImplementation* p;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -