e.smali
.class public Lcom/iflytek/thirdparty/e;
.super Lcom/iflytek/thirdparty/d;
.source "SourceFile"
# instance fields
.field q:Z
.field private r:I
.field private s:Lcom/iflytek/cloud/util/AudioDetector;
.field private t:[B
# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;Landroid/os/HandlerThread;)V
.registers 10
.prologue
const/4 v1, 0x0
const/16 v0, 0x3e80
.line 36
invoke-direct {p0, p1, p2, p3}, Lcom/iflytek/thirdparty/d;-><init>(Landroid/content/Context;Lcom/iflytek/thirdparty/ad;Landroid/os/HandlerThread;)V
.line 28
iput v0, p0, Lcom/iflytek/thirdparty/e;->r:I
.line 29
iput-object v1, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
.line 30
const/4 v2, 0x0
iput-boolean v2, p0, Lcom/iflytek/thirdparty/e;->q:Z
.line 33
iput-object v1, p0, Lcom/iflytek/thirdparty/e;->t:[B
.line 38
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v2
.line 39
if-eqz v2, :cond_1b
const-string v3, "sample_rate"
invoke-virtual {v2, v3, v0}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
:cond_1b
iput v0, p0, Lcom/iflytek/thirdparty/e;->r:I
.line 41
const-string v0, "vad_enable"
const-string v3, "0"
const/4 v4, 0x1
invoke-virtual {v2, v0, v3, v4}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Ljava/lang/String;Z)V
.line 43
invoke-static {}, Lcom/iflytek/cloud/util/AudioDetector;->getDetector()Lcom/iflytek/cloud/util/AudioDetector;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
.line 44
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
if-nez v0, :cond_8f
.line 45
new-instance v3, Ljava/lang/StringBuffer;
invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V
.line 46
const-string v0, "sample_rate"
invoke-virtual {v3, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v0
const-string v4, "="
invoke-virtual {v0, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v0
iget v4, p0, Lcom/iflytek/thirdparty/e;->r:I
invoke-virtual {v0, v4}, Ljava/lang/StringBuffer;->append(I)Ljava/lang/StringBuffer;
.line 48
const-string v0, "vad_engine"
const-string v4, "meta"
invoke-virtual {v2, v0, v4}, Lcom/iflytek/thirdparty/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 49
const-string v4, ","
invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v4
const-string v5, "vad_engine"
invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v4
const-string v5, "="
invoke-virtual {v4, v5}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v4
invoke-virtual {v4, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
.line 50
if-eqz v2, :cond_d9
const-string v0, "vad_res_path"
invoke-virtual {v2, v0}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 51
:goto_6a
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_85
.line 52
const-string v1, ","
invoke-virtual {v3, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
const-string v4, "vad_res_path"
invoke-virtual {v1, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
const-string v4, "="
invoke-virtual {v1, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;
.line 55
:cond_85
invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {p1, v0}, Lcom/iflytek/cloud/util/AudioDetector;->createDetector(Landroid/content/Context;Ljava/lang/String;)Lcom/iflytek/cloud/util/AudioDetector;
move-result-object v0
iput-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
.line 58
:cond_8f
iget v0, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
if-lez v0, :cond_db
iget v0, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
.line 59
:goto_95
iget-object v1, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
const-string v3, "vad_bos"
invoke-static {v0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v3, v0}, Lcom/iflytek/cloud/util/AudioDetector;->setParameter(Ljava/lang/String;Ljava/lang/String;)V
.line 60
const-string v0, "vad_eos"
invoke-static {p0}, Lcom/iflytek/thirdparty/af;->b(Lcom/iflytek/thirdparty/s;)I
move-result v1
invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v2, v0, v1}, Lcom/iflytek/thirdparty/ad;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 61
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "meta vad eos on recog: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 62
iget-object v1, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
const-string v2, "vad_eos"
invoke-virtual {v1, v2, v0}, Lcom/iflytek/cloud/util/AudioDetector;->setParameter(Ljava/lang/String;Ljava/lang/String;)V
.line 63
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
const-string v1, "speech_timeout"
iget v2, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
invoke-static {v2}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v1, v2}, Lcom/iflytek/cloud/util/AudioDetector;->setParameter(Ljava/lang/String;Ljava/lang/String;)V
.line 64
return-void
:cond_d9
move-object v0, v1
.line 50
goto :goto_6a
.line 58
:cond_db
const v0, 0x7fffffff
goto :goto_95
.end method
.method private a([B)[B
.registers 13
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/4 v3, 0x0
const v10, 0x8000
const/4 v1, 0x1
const/4 v6, 0x0
.line 196
.line 198
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
if-eqz v0, :cond_c7
.line 203
array-length v0, p1
invoke-static {v10, v0}, Ljava/lang/Math;->min(II)I
move-result v0
move v5, v0
move v2, v6
move v7, v6
move-object v4, v3
move v0, v6
.line 204
:goto_14
if-lez v5, :cond_cf
.line 205
iget-object v4, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
invoke-virtual {v4, p1, v7, v5, v6}, Lcom/iflytek/cloud/util/AudioDetector;->detect([BIIZ)Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;
move-result-object v4
.line 207
iget v8, v4, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->error:I
if-eqz v8, :cond_28
.line 208
new-instance v0, Lcom/iflytek/cloud/SpeechError;
iget v1, v4, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->error:I
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.line 211
:cond_28
const/4 v8, 0x3
iget v9, v4, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->status:I
if-ne v8, v9, :cond_3a
.line 212
iget-object v8, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
invoke-virtual {v8}, Lcom/iflytek/cloud/util/AudioDetector;->reset()V
.line 230
:cond_32
add-int/2addr v7, v5
.line 231
array-length v5, p1
sub-int/2addr v5, v7
invoke-static {v10, v5}, Ljava/lang/Math;->min(II)I
move-result v5
goto :goto_14
.line 213
:cond_3a
iget v8, v4, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->status:I
if-eqz v8, :cond_32
.line 214
iget-boolean v8, p0, Lcom/iflytek/thirdparty/e;->q:Z
if-nez v8, :cond_57
.line 216
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v0, v0
sub-int v0, v7, v0
invoke-static {v2, v0}, Ljava/lang/Math;->max(II)I
move-result v0
.line 218
iput-boolean v1, p0, Lcom/iflytek/thirdparty/e;->q:Z
.line 220
const-string v2, "detectAudioData find start and begin session"
invoke-static {v2}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 221
invoke-direct {p0}, Lcom/iflytek/thirdparty/e;->j()V
move v2, v0
move v0, v1
.line 224
:cond_57
iget v8, v4, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->status:I
if-eq v1, v8, :cond_32
move-object v1, v4
.line 234
:goto_5c
if-eqz v1, :cond_63
.line 235
iget v4, v1, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->volume:I
invoke-virtual {p0, p1, v4}, Lcom/iflytek/thirdparty/e;->a([BI)V
.line 239
:cond_63
if-eqz v1, :cond_a7
iget-boolean v4, p0, Lcom/iflytek/thirdparty/e;->q:Z
if-eqz v4, :cond_a7
.line 240
if-eqz v0, :cond_81
.line 242
array-length v0, p1
sub-int/2addr v0, v2
iget-object v3, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v3, v3
add-int/2addr v0, v3
new-array v0, v0, [B
.line 243
iget-object v3, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v3, v3
if-gt v3, v2, :cond_94
.line 244
iget-object v3, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v3, v3
sub-int/2addr v2, v3
array-length v3, v0
invoke-static {p1, v2, v0, v6, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
:goto_80
move-object p1, v0
.line 255
:cond_81
const/4 v0, 0x2
iget v2, v1, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->status:I
if-eq v0, v2, :cond_8b
const/4 v0, 0x4
iget v1, v1, Lcom/iflytek/cloud/util/AudioDetector$DetectorResult;->status:I
if-ne v0, v1, :cond_93
.line 258
:cond_8b
const-string v0, "detectAudioData find eos or timeout"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 259
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->g()V
.line 273
:cond_93
:goto_93
return-object p1
.line 246
:cond_94
iget-object v3, p0, Lcom/iflytek/thirdparty/e;->t:[B
iget-object v4, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v4, v4
sub-int/2addr v4, v2
invoke-static {v3, v2, v0, v6, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 247
iget-object v3, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v3, v3
sub-int v2, v3, v2
array-length v3, p1
invoke-static {p1, v6, v0, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
goto :goto_80
.line 264
:cond_a7
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v0, v0
array-length v1, p1
invoke-static {v0, v1}, Ljava/lang/Math;->min(II)I
move-result v0
.line 265
iget-object v1, p0, Lcom/iflytek/thirdparty/e;->t:[B
iget-object v2, p0, Lcom/iflytek/thirdparty/e;->t:[B
iget-object v4, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v4, v4
sub-int/2addr v4, v0
invoke-static {v1, v0, v2, v6, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 266
array-length v1, p1
sub-int/2addr v1, v0
iget-object v2, p0, Lcom/iflytek/thirdparty/e;->t:[B
iget-object v4, p0, Lcom/iflytek/thirdparty/e;->t:[B
array-length v4, v4
sub-int/2addr v4, v0
invoke-static {p1, v1, v2, v4, v0}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
move-object p1, v3
.line 267
goto :goto_93
.line 270
:cond_c7
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x55f1
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
:cond_cf
move-object v1, v4
goto :goto_5c
.end method
.method private j()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 152
invoke-static {}, Lcom/iflytek/cloud/SpeechUtility;->getUtility()Lcom/iflytek/cloud/SpeechUtility;
move-result-object v0
if-eqz v0, :cond_16
.line 153
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_ssb"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 154
const-string v0, "begin session"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 155
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->d()V
.line 160
:goto_15
return-void
.line 157
:cond_16
const-string v0, "not init while begin session"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogE(Ljava/lang/String;)V
.line 158
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x4e2f
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/e;->exit(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_15
.end method
# virtual methods
.method protected a(Landroid/os/Message;)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
.line 180
iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast v0, [B
check-cast v0, [B
.line 181
if-eqz v0, :cond_b
array-length v1, v0
if-nez v1, :cond_c
.line 193
:cond_b
:goto_b
return-void
.line 185
:cond_c
invoke-direct {p0, v0}, Lcom/iflytek/thirdparty/e;->a([B)[B
move-result-object v0
.line 187
if-eqz v0, :cond_b
.line 189
iget-object v1, p0, Lcom/iflytek/thirdparty/e;->m:Ljava/util/concurrent/ConcurrentLinkedQueue;
invoke-virtual {v1, v0}, Ljava/util/concurrent/ConcurrentLinkedQueue;->add(Ljava/lang/Object;)Z
.line 191
const/4 v1, 0x1
invoke-virtual {p0, v0, v1}, Lcom/iflytek/thirdparty/e;->a([BZ)V
goto :goto_b
.end method
.method protected a([BZ)V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;
}
.end annotation
.prologue
const/4 v3, 0x0
.line 165
iget-boolean v0, p0, Lcom/iflytek/thirdparty/e;->c:Z
if-nez v0, :cond_1b
.line 166
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/iflytek/thirdparty/e;->c:Z
.line 167
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_fau"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 169
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_1b
.line 171
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->a:Lcom/iflytek/cloud/RecognizerListener;
const/16 v1, 0x55f2
const/4 v2, 0x0
invoke-interface {v0, v1, v3, v3, v2}, Lcom/iflytek/cloud/RecognizerListener;->onEvent(IIILandroid/os/Bundle;)V
.line 175
:cond_1b
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->h:Lcom/iflytek/thirdparty/c;
array-length v1, p1
invoke-virtual {v0, p1, v1}, Lcom/iflytek/thirdparty/c;->a([BI)V
.line 176
return-void
.end method
.method protected c()V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.prologue
const/4 v5, -0x1
.line 68
const-string v0, "start connecting"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 69
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "engine_type"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 72
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "net_check"
const/4 v3, 0x1
invoke-virtual {v1, v2, v3}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Z)Z
move-result v1
.line 73
if-eqz v1, :cond_2a
.line 74
const-string v1, "cloud"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_c7
.line 76
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/NetworkUtil;->checkNetwork(Landroid/content/Context;)V
.line 87
:cond_2a
:goto_2a
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "record_read_rate"
const/16 v2, 0x28
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
.line 89
sget-object v1, Lcom/iflytek/thirdparty/s$b;->c:Lcom/iflytek/thirdparty/s$b;
invoke-virtual {p0, v1}, Lcom/iflytek/thirdparty/e;->setStatus(Lcom/iflytek/thirdparty/s$b;)V
.line 91
iget v1, p0, Lcom/iflytek/thirdparty/e;->r:I
mul-int/lit16 v1, v1, 0x12c
mul-int/lit8 v1, v1, 0x2
div-int/lit16 v1, v1, 0x3e8
.line 92
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "MscRecognizerMeta last buffer len: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v2}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 93
new-array v1, v1, [B
iput-object v1, p0, Lcom/iflytek/thirdparty/e;->t:[B
.line 96
iget v1, p0, Lcom/iflytek/thirdparty/e;->f:I
if-eq v1, v5, :cond_ae
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->isRunning()Z
move-result v1
if-eqz v1, :cond_ae
.line 97
const-string v1, "start record"
invoke-static {v1}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 99
iget v1, p0, Lcom/iflytek/thirdparty/e;->f:I
const/4 v2, -0x2
if-ne v1, v2, :cond_ec
.line 102
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v1
const-string v2, "asr_source_path"
invoke-virtual {v1, v2}, Lcom/iflytek/thirdparty/ad;->e(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 103
new-instance v2, Lcom/iflytek/cloud/record/a;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getSampleRate()I
move-result v3
iget v4, p0, Lcom/iflytek/thirdparty/e;->f:I
invoke-direct {v2, v3, v0, v4, v1}, Lcom/iflytek/cloud/record/a;-><init>(IIILjava/lang/String;)V
iput-object v2, p0, Lcom/iflytek/thirdparty/e;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 115
:cond_88
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "rec_open"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 116
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->i:Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {v0, p0}, Lcom/iflytek/cloud/record/PcmRecorder;->startRecording(Lcom/iflytek/cloud/record/PcmRecorder$PcmRecordListener;)V
.line 118
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "speech_timeout"
invoke-virtual {v0, v1, v5}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;I)I
move-result v0
iput v0, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
.line 119
iget v0, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
if-eq v5, v0, :cond_ae
.line 121
const/16 v0, 0x9
sget-object v1, Lcom/iflytek/thirdparty/s$a;->b:Lcom/iflytek/thirdparty/s$a;
const/4 v2, 0x0
iget v3, p0, Lcom/iflytek/thirdparty/e;->mSpeechTimeOut:I
invoke-virtual {p0, v0, v1, v2, v3}, Lcom/iflytek/thirdparty/e;->sendMsg(ILcom/iflytek/thirdparty/s$a;ZI)V
.line 125
:cond_ae
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->a:Lcom/iflytek/cloud/RecognizerListener;
if-eqz v0, :cond_bb
iget v0, p0, Lcom/iflytek/thirdparty/e;->f:I
if-le v0, v5, :cond_bb
.line 127
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->a:Lcom/iflytek/cloud/RecognizerListener;
invoke-interface {v0}, Lcom/iflytek/cloud/RecognizerListener;->onBeginOfSpeech()V
.line 130
:cond_bb
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
if-nez v0, :cond_108
.line 131
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x520b
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.line 77
:cond_c7
const-string v1, "mixed"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_d7
const-string v1, "mixed"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2a
.line 80
:cond_d7
:try_start_d7
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->mContext:Landroid/content/Context;
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/NetworkUtil;->checkNetwork(Landroid/content/Context;)V
:try_end_dc
.catch Ljava/lang/Exception; {:try_start_d7 .. :try_end_dc} :catch_de
goto/16 :goto_2a
.line 81
:catch_de
move-exception v0
.line 82
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getParam()Lcom/iflytek/thirdparty/ad;
move-result-object v0
const-string v1, "engine_type"
const-string v2, "local"
invoke-virtual {v0, v1, v2}, Lcom/iflytek/thirdparty/ad;->a(Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_2a
.line 107
:cond_ec
new-instance v1, Lcom/iflytek/cloud/record/PcmRecorder;
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->getSampleRate()I
move-result v2
iget v3, p0, Lcom/iflytek/thirdparty/e;->f:I
invoke-direct {v1, v2, v0, v3}, Lcom/iflytek/cloud/record/PcmRecorder;-><init>(III)V
iput-object v1, p0, Lcom/iflytek/thirdparty/e;->i:Lcom/iflytek/cloud/record/PcmRecorder;
.line 109
const/4 v0, 0x3
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/e;->hasMessages(I)Z
move-result v0
if-eqz v0, :cond_88
.line 111
new-instance v0, Lcom/iflytek/cloud/SpeechError;
const/16 v1, 0x2786
invoke-direct {v0, v1}, Lcom/iflytek/cloud/SpeechError;-><init>(I)V
throw v0
.line 133
:cond_108
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->s:Lcom/iflytek/cloud/util/AudioDetector;
invoke-virtual {v0}, Lcom/iflytek/cloud/util/AudioDetector;->reset()V
.line 135
return-void
.end method
.method protected e()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/iflytek/cloud/SpeechError;,
Ljava/io/IOException;,
Ljava/lang/InterruptedException;
}
.end annotation
.prologue
.line 139
iget-boolean v0, p0, Lcom/iflytek/thirdparty/e;->q:Z
if-eqz v0, :cond_14
.line 140
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->o:Lcom/iflytek/thirdparty/u;
const-string v1, "app_lau"
invoke-virtual {v0, v1}, Lcom/iflytek/thirdparty/u;->a(Ljava/lang/String;)V
.line 142
iget-object v0, p0, Lcom/iflytek/thirdparty/e;->h:Lcom/iflytek/thirdparty/c;
invoke-virtual {v0}, Lcom/iflytek/thirdparty/c;->a()V
.line 144
invoke-virtual {p0}, Lcom/iflytek/thirdparty/e;->updateTimeoutMsg()V
.line 149
:goto_13
return-void
.line 146
:cond_14
const-string v0, "exit with no speech audio"
invoke-static {v0}, Lcom/iflytek/cloud/msc/util/log/DebugLog;->LogD(Ljava/lang/String;)V
.line 147
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/iflytek/thirdparty/e;->exit(Lcom/iflytek/cloud/SpeechError;)V
goto :goto_13
.end method