// Native JSB

declare class TMGPTTBindings {
  constructor(contextBindings: TMGContextBindings);
  applyPTTAuthbuffer(userSig: string): number;
  setMaxMessageLength(msTime: number): number;
  startRecording(filePath: string): number;
  stopRecording(): number;
  cancelRecording(): number;
  uploadRecordedFile(filePath: string): number;
  downloadRecordedFile(fileId: string, filePath: string): number;
  playRecordedFile(filePath: string): number;
  playRecordedFile(filePath: string, voiceType: number): number;
  stopPlayFile(): number;
  speechToText(fileID: string, speechLanguage?: string, translateLanguage?: string): number;
  translateText(text: string, sourceLanguage: string, translateLanguage: string): number;
  getFileSize(filePath: string): number;
  getVoiceFileDuration(filePath: string): number;
  startRecordingWithStreamingRecognition(
      filePath: string, speechLanguage?: string, translateLanguage?: string): number;
  setPTTSourceLanguage(sourceLanguage: string): number;
  textToSpeech(
      serialNumber: number, text: string, voiceName: string, languageCode: string,
      speakingRate: number): number;
}
