eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

prosodydisplay.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #define FRAMEHEIGHT 120
  2. #define LINEBASE 20
  3. #define LINESEP 16
  4. #define SCROLLUNITS 20
  5. class ProsodyDisplay: public wxScrolledWindow
  6. {//========================================
  7. public:
  8. ProsodyDisplay(wxWindow *parent, const wxPoint& pos, const wxSize& size);
  9. ~ProsodyDisplay();
  10. virtual void OnDraw(wxDC& dc);
  11. void OnMouse(wxMouseEvent& event);
  12. void OnKey(wxKeyEvent& event);
  13. void OnMenu(wxCommandEvent& event);
  14. void Save(const wxString &path=_T(""));
  15. void LayoutData(PHONEME_LIST *phlist, int n_ph);
  16. private:
  17. void Redraw(wxDC& dc, int x1, int y1, int x2, int y2);
  18. void DrawEnv(wxDC& dc, int x1, int y1, int width, PHONEME_LIST *ph);
  19. void DrawPitchline(wxDC& dc, int line, int x1, int x2);
  20. void RefreshLine(int line);
  21. int GetWidth(PHONEME_LIST *p);
  22. void ChangePh(int pitch1, int pitch2);
  23. void SelectPh(int index);
  24. int linewidth; // height for drawing pitch
  25. double scalex; // scale length values
  26. double scaley; // scale pitch values
  27. int selected_ph;
  28. int numph;
  29. PHONEME_LIST *phlist;
  30. int num_lines;
  31. short linetab[N_PHONEME_LIST/2];
  32. DECLARE_EVENT_TABLE()
  33. }; // end class ProsodyDisplay