Skip to content

How to use TTS in offline mode ? #5

@youcef23b

Description

@youcef23b

I found this code in the Demo app, but it work only on online mode, I want to use the TTS features in offline mode.

(findViewById(R.id.btn_start_tts)).setOnClickListener(new View.OnClickListener() {
TTSRequest ttsRequest = new TTSRequest("语音合成测试:北京海淀区天气晴朗,气温20度到26度");

        public void onClick(View v) {

            SpeechClient.getInstance().startTTS(ttsRequest, new TTSListener() {
                @Override
                public void onStart() {
                    Log.i(TAG, "onStart");
                }

                @Override
                public void onError(int errorCode) {
                    Log.i(TAG, "onError " + errorCode);
                }

                @Override
                public void onDone() {
                    Log.i(TAG, "onDone");
                }
            });
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions