Top Banner
8/14/2019 S916_1.0 http://slidepdf.com/reader/full/s91610 1/133 REF: S916 MCU-Layer 1 audio features Ver 1.0 PRELIMINARY documents contain information on a product under development and is issued for evaluation purposes only. Features characteristic data and other information are subject to change. UNDER NON DISCLOSURE AGREEMENT DO NOT COPY PAGE: 1/133 MCU-Layer 1 Audio features S916 Ver 1.0 File : W:\Layer1\Document\S916.doc Department:  Application Specific Product / Wireless Communications System Originator Approval Quality Name F.Mazard A.Vallauri Date 1/29/01 1/29/01 Signature
133

S916_1.0

Jun 04, 2018

Download

Documents

anite99
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 1/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 1/133

MCU-Layer 1 Audio features

S916

Ver 1.0

File: W:\Layer1\Document\S916.doc

Department:  Application Specific Product / Wireless Communications System

Originator Approval Quality

Name F.Mazard A.Vallauri

Date 1/29/01 1/29/01

Signature

Page 2: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 2/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 2/133

HISTORY

Version Date Author Notes

1.0 Francois Mazard 1

NOTES :

1.  Creation.

Page 3: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 3/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 3/133

Table of content

1 INTRODUCTION........................................................................................................9

2 Key beep ..................................................................................................................... 10

2.1 MMI rules ......................................................................................................................10

2.2 MMI-L1 interface..........................................................................................................10

2.3 L1A-L1S message interface..........................................................................................11

2.4 Process flow.................................................................................................................... 12

2.5 L1A state machine......................................................................................................... 14

2.6 L1S state machine ......................................................................................................... 15

3 Tones .......................................................................................................................... 16 

3.1 MMI rules ......................................................................................................................16

3.2 MMI-L1 interface..........................................................................................................16

3.3 L1A-L1S message interface..........................................................................................18

3.4 Process flow.................................................................................................................... 19

3.5 L1A state machine.........................................................................................................21

3.6 L1S state machine ......................................................................................................... 22

4 Melody ringer............................................................................................................. 23

4.1 MMI rule........................................................................................................................23

4.2 MMI-L1 interface..........................................................................................................23

4.3 L1A-L1S interface.........................................................................................................24

4.4 Process flow.................................................................................................................... 25

4.5 L1A state machine.........................................................................................................27

4.6 L1S state machine ......................................................................................................... 28

5 Voice memorisation...................................................................................................30

5.1 Principle ......................................................................................................................... 30

5.2 Playing task.................................................................................................................... 305.2.1 MMI rules.............................................................................................................................. 30

5.2.2 MMI-L1 interface .................................................................................................................. 31

5.2.3 L1A-L1S message interface .................................................................................................. 315.2.4 Process flow...........................................................................................................................32

5.2.5 L1A state machine .................................................................................................................34

Page 4: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 4/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 4/133

5.2.6 L1S state machine.................................................................................................................. 35

5.3 Recording task............................................................................................................... 365.3.1 MMI rules.............................................................................................................................. 36

5.3.2 MMI-L1 interface .................................................................................................................. 37

5.3.3 L1A-L1S message interface .................................................................................................. 39

5.3.4 Process flow...........................................................................................................................40

5.3.5 L1A state machine .................................................................................................................435.3.6 L1S state machine.................................................................................................................. 44

5.4 Tone uplink.................................................................................................................... 455.4.1 Definition............................................................................................................................... 45

5.4.2 Process Flow..........................................................................................................................45

5.4.3 L1S state machine.................................................................................................................. 48

6 Speech recognition .................................................................................................... 49

6.1 Principle ......................................................................................................................... 49

6.2 Structure ........................................................................................................................ 50

6.3 Speech recognition vocabulary database ....................................................................51

6.4 Enrollment task .............................................................................................................526.4.1 MMI rules.............................................................................................................................. 52

6.4.2 MMI-L1 interface .................................................................................................................. 52

6.4.3 L1A-L1S message interface .................................................................................................. 54

6.4.4 Process flow...........................................................................................................................55

6.4.5 L1A state machine .................................................................................................................59

6.4.6 L1S state machine.................................................................................................................. 61

6.5 Update task ....................................................................................................................636.5.1 MMI rules.............................................................................................................................. 63

6.5.2 MMI-L1 interface .................................................................................................................. 63

6.5.3 L1A-L1S message interface .................................................................................................. 65

6.5.4 Process flow...........................................................................................................................66

6.5.5 L1A state machine .................................................................................................................706.5.6 L1S state machine.................................................................................................................. 72

6.6 Reco task ........................................................................................................................ 746.6.1 MMI rules.............................................................................................................................. 74

6.6.2 MMI-L1 interface .................................................................................................................. 74

6.6.3 L1A-L1S message interface .................................................................................................. 77

6.6.4 Process flow...........................................................................................................................78

6.6.5 L1A state machine .................................................................................................................84

6.6.6 L1S state machine.................................................................................................................. 87

6.7 Update-check task......................................................................................................... 916.7.1 MMI rules.............................................................................................................................. 91

6.7.2 MMI-L1 interface .................................................................................................................. 92

6.7.3 L1A-L1S message interface .................................................................................................. 946.7.4 Process flow...........................................................................................................................95

6.7.5 L1A state machine .................................................................................................................98

Page 5: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 5/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 5/133

6.7.6 L1S state machine................................................................................................................102

6.8 Speech recording task................................................................................................. 1036.8.1 Process Flow........................................................................................................................104

6.8.2 L1S state machine................................................................................................................106

6.9 Speech recognition Background task ........................................................................108

6.9.1 L1-Background interface..................................................................................................... 1086.9.2 Process flow......................................................................................................................... 111

6.9.3 Background state machine................................................................................................... 112

6.9.4 Called functions...................................................................................................................113

7 AEC..........................................................................................................................116 

7.1 MMI rules ....................................................................................................................116

7.2 MMI-L1 interface........................................................................................................ 116

7.3 L1A-L1S message interface........................................................................................ 117

7.4 Process flow ................................................................................................................. 117

7.5 L1A state machine....................................................................................................... 118

7.6 L1S state machine .......................................................................................................119

8 FIR configuration.................................................................................................... 120

8.1 MMI rules ....................................................................................................................120

8.2 MMI-L1 interface........................................................................................................ 121

8.3 MMI-L1 interface........................................................................................................ 121

8.4 Process flow..................................................................................................................122

8.5 L1A state machine....................................................................................................... 123

8.6 L1S state machine .......................................................................................................124

9 Audio gain functions ...............................................................................................125

9.1 audio_gain_dl...............................................................................................................125

9.2 audio_gain_ul...............................................................................................................125

10 Vocoder mute functions .......................................................................................126 

10.1 vocoder_mute_dl ......................................................................................................... 126

10.2 vocoder_mute_ul ......................................................................................................... 126

11 Structure of the layer 1......................................................................................... 127 

11.1 Files structure .............................................................................................................. 127

11.2 Initialisation structure ................................................................................................ 128

11.3 L1A structure .............................................................................................................. 129

Page 6: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 6/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 6/133

11.4 L1S structure ............................................................................................................... 130

11.5 L1S audio manager ..................................................................................................... 131

11.6 L1S end manager.........................................................................................................133

Page 7: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 7/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 7/133

List of figures

Figure 1: Key beep (Automatic stop)............................................................................................................ 12

Figure 2: Key beep new solution (Requested stop)......... ........... .......... ........... .......... ........... .......... ........... .... 13

Figure 3: L1A keybeep state machine...........................................................................................................14

Figure 4: L1S keybeep state machine ...........................................................................................................15

Figure 5: Tone (Automatic stop)...................................................................................................................19Figure 6: Key beep (Requested stop)............................................................................................................ 20

Figure 9: Melody (automatic stop)................................................................................................................25

Figure 10: Melody (requested stop with or without loopback) .......... ......... .......... .......... .......... .......... .......... 26

Figure 11: L1A melody state machine ..........................................................................................................27

Figure 12: L1S melody state machine (1/2)..................................................................................................28

Figure 13: L1S melody state machine (2/2)..................................................................................................29

Figure 14: Voice memo (playing in all mode with an automatic stop)........... .......... ........... ........... ........... ... 32

Figure 15: Voice memo (playing in all mode with a requested stop) ........................................................... 33

Figure 16: Voice memo playing (L1A state machine).......... ........... .......... ........... .......... ........... .......... ......... 34

Figure 17: Voice memo (L1S voice memo playing state machine) .......... ........... ........... ........... ........... ........ 35

Figure 18: Voice memo (recording with an automatic stop)........ ........... .......... ........... ........... .......... ........... . 40

Figure 19: Voice memo (recording with a requested stop) ........... .......... .......... ........... .......... ........... ........... . 42

Figure 20: Voice memo recording (L1A state machine)......... .......... ........... ........... .......... ........... ........... ...... 43Figure 21: Voice memo (L1S voice memo recording state machine).......... .......... ........... .......... ........... ....... 44

Figure 22: Voice memo tone uplink: recording in idle mode. ...................................................................... 45

Figure 23: Voice memo tone uplink: recording in dedicated mode (automatic stop). .......... ........... .......... ... 46

Figure 24: Voice memo tone uplink: recording in dedicated mode (resquested stop). .......... ........... .......... .. 47

Figure 25: Tone uplink L1S state machine ................................................................................................... 48

Figure 26: Speech recognition structure. ......................................................................................................50

Figure 27: Enrollment task: enroll no error and no resquested stop. ............................................................ 55

Figure 28: Enrollment task: enroll no error and resquested stop (L1S was stopped)........... ......... ......... ....... 56

Figure 29: Enrollment task: enroll no error and resquested stop (L1S is running). .......... ........... .......... ....... 57

Figure 30: Enrollment task: enroll error (bad acquisition) and no resquested stop.............. ........... ........... ... 58

Figure 31: Enrollment task: L1A state machine (1/2)........... ........... ........... .......... ........... ........... ........... ....... 59

Figure 32: Enrollment task: L1A state machine (2/2)........... ........... ........... .......... ........... ........... ........... ....... 60

Figure 33: Enrollment task: L1S state machine (1/2) ................................................................................... 61

Figure 34: Enrollment task: L1S state machine (2/2) ................................................................................... 62

Figure 35: Update task: Update no error and no resquested stop...... .......... ........... .......... ........... .......... ........ 67

Figure 36: Update task: Update no error and resquested stop (L1S isn’t running). ........... .......... .......... ....... 68

Figure 37: Update task: Update no error and resquested stop (L1S is running). ........... .......... ........... .......... 69

Figure 38: Update task: L1A state machine (1/2). ........................................................................................ 70

Figure 39: Update task: L1A state machine (2/2). ........................................................................................ 71

Figure 40: Update task: L1S state machine (1/2).......... ........... ........... ........... ........... ........... ........... .......... .... 72

Figure 41: Update task: L1S state machine (2/2).......... ........... ........... ........... ........... ........... ........... .......... .... 73

Figure 42: Reco task: reco no error and no resquested stop................ .......... ........... .......... .......... ........... ...... 79

Figure 43: Reco task: reco no error and resquested stop (L1S is in acquisition phase). .......... .......... .......... . 80

Figure 44: Reco task: reco no error and resquested stop (Background task is running). .......... .......... .......... 81

Figure 45: Reco task: reco no error and resquested stop (L1 is in processing phase). .......... .......... ........... ... 83

Figure 46: Reco task: L1A state machine (1/3). ...........................................................................................84

Figure 47: Reco task: L1A state machine (2/3). ...........................................................................................85Figure 48: Reco task: L1A state machine (3/3). ...........................................................................................86

Figure 49: Speech recognition reco: L1S reco task state machine (1/2) ........... ............ ........... ........... .......... 87

Page 8: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 8/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 8/133

Figure 50: Speech recognition reco: L1S reco task state machine (2/2) ........... ............ ........... ........... .......... 88

Figure 51: Speech recognition reco: L1S processing state machine (1/2) ........... ............ ........... ........... ....... 89

Figure 52: Speech recognition reco: L1S processing state machine (2/2) ........... ............ ........... ........... ....... 90

Figure 53: Update-check task: update-check with no error, no resquested stop. ......... ........... .......... ........... . 97

Figure 54: Update-check task: L1A statemachine (1/5)...... ........... .......... ........... ........... ........... ........... ......... 98

Figure 55: Update-check task: L1A statemachine (2/5)...... ........... .......... ........... ........... ........... ........... ......... 99

Figure 56: Update-check task: L1A statemachine (3/5)...... ........... .......... ........... ........... ........... ........... ....... 100

Figure 57: Update-check task: L1A statemachine (4/5)...... ........... .......... ........... ........... ........... ........... ....... 101

Figure 58: Update-check task: L1A statemachine (5/5)...... ........... .......... ........... ........... ........... ........... ....... 102

Figure 59: Speech recognition recording task: record speech with an automatic stop...... ........... ........... .... 104

Figure 60: Speech recognition recording task: record speech with a requested stop............ .......... ........... . 105

Figure 61: Speech recognition: L1S state machine speech recording task (1/2)........... ............ ........... ....... 106

Figure 62: Speech recognition: L1S state machine speech recording task (2/2)........... ............ ........... ....... 107

Figure 63: Background task: L1S/background task communication (without emercency stop).......... ....... 111

Figure 64: Background task: L1S/background task communication (with emergency stop)....... ........... .... 111

Figure 65: Background task: background state machine............. ........... .......... ........... .......... ........... .......... . 112

Figure 65: Background task: Cust_srback_save_speech function. .......... ........... .......... ........... .......... ......... 115

Figure 66: AEC........................................................................................................................................... 117

Figure 67: AEC L1A state machine............................................................................................................118

Figure 68: AEC L1S state machine.............................................................................................................119

Figure 69: FIR process flow. ...................................................................................................................... 122Figure 70: FIR L1A state machine..............................................................................................................123

Figure 71: FIR L1S state machine. .............................................................................................................124

Figure 72: audio_gain_dl process. ..............................................................................................................125

Figure 73: audio_gain_ul process. ..............................................................................................................125

Figure 74: vocoder_mute_dl process. ......................................................................................................... 126

Figure 75: vocoder_mute_ul process. ......................................................................................................... 126

Figure 76: L1A audio functions.................................................................................................................. 129

Figure 77: L1S audio manager (1/2)...........................................................................................................131

Figure 78: L1S audio manager (2/2)...........................................................................................................132

Figure 79: L1S end manager (It. com. management)...... .......... ........... .......... ........... .......... ........... ........... .. 133

Page 9: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 9/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 9/133

1 INTRODUCTION

The aim of this document is to describe the L1 audio tasks listed below:

•  Key beep.

  Tri-tones.•  Voice recording.

•  Voice playing.

•  Speech recognition (enrollment, update, reco and update-check).

•  Melody (format E1).

•  Echo canceller.

•  FIR configuration.

•  Audio software gain.

•  Vocoder mute.

For each task, the following item are described:

  Some rules that the MMI must respect to use correctly the task.

  The messages interface between the MMI and the Layer 1.  The messages from the L1S to the L1A.

  The process flow of the task from the MMI to the DSP.

  The L1A state machine of the task.

  The L1S state machine of the task.

 Note that the MMI rules, described for each audio task, can be used to build easily the MMI state machine

corresponding to the audio tasks

Page 10: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 10/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 10/133

2 Key beep

2.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a keybeep (MMI_KEYBEEP_START_REQ message), it must wait the

start confirmation (MMI_KEYBEEP_START_CON) before to stop the keybeep.

•  The MMI isn’t allowed to start a new keybeep before to receive a stop confirmation

(MMI_KEYBEEP_STOP_CON).

•  The MMI can receive a stop confirmation (MMI_KEYBEEP_STOP_CON) in two cases:

♦  The MMI requested to stop the keybeep (MMI_KEYBEEP_STOP_REQ) and the L1

confirms the stop confirmation message.

♦  The keybeep generation is finished and the L1 informs the MMI with the stop

confirmation message.

•  The MMI can run the keybeep task during all GSM modes and during all GSM transition (i.e.

idle<->dedicated, dedicated->dedicated).

2.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_KEYBEEP_START_REQ T_MMI_KEYBEEP_REQ

MMI->L1 MMI_KEYBEEP_STOP_REQ Trigger

MMI<-L1 MMI_KEYBEEP_START_CON Trigger

MMI<-L1 MMI_KEYBEEP_STOP_CON Trigger

T_MMI_KEYBEEP_REQ message type

d_k_x1_kt0(UWORD16)Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 0. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (key beep generation).

d_k_x1_kt1(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 1. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (key beep generation).

d_dur_kb(UWORD16)

Specifies the duration of the key beep (1…32767). This duration corresponds to a number of audio frames(i.e. 20 ms). Note d_dur_kb=0 isn’t allowed.

Page 11: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 11/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 11/133

2.3 L1A-L1S message interface

Direction Message name Type

L1A<-L1S L1_KEYBEEP_START_CON Trigger

L1A<-L1S L1_KEYBEEP_STOP_CON Trigger

Page 12: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 12/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 12/133

2.4 Process flow

RESET

WAIT_START_REQ

MMI_KEYBEEP_START_REQ

IDLE

keybeep_task.command.start = TRUE

WAIT_START_CON

d_toneskb_init |= (B_KEYBEEP)

WAIT_KEYBEEP_START

d_toneskb_init &=

(~B_KEYBEEP)

d_toneskb_status |=(B_KEYBEEP) BEEP

L1_KEYBEEP_START_CON

.

MMI_KEYBEEP_START_CON WAIT_KEYBEEP_STOP .

.

WAIT_STOP

d_toneskb_status &=

(~B_KEYBEEP)

.

BEEP

L1_KEYBEEP_STOP_CON

MMI_KEYBEEP_STOP_CON

RESET IDLE

Figure 1: Key beep (Automatic stop)

MMI DSPL1SL1A

Page 13: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 13/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 13/133

RESET

WAIT_START_REQ

MMI_KEYBEEP_START_REQ

IDLE

keybeep_task.command.start = TRUE

WAIT_START_CON

d_toneskb_init |= (B_KEYBEEP)

WAIT_KEYBEEP_START

d_toneskb_init &=

(~B_KEYBEEP)

d_toneskb_status |=

(B_KEYBEEP) BEEP

L1_KEYBEEP_START_CON ..

MMI_KEYBEEP_START_CON WAIT_KEYBEEP_STOP .

.WAIT_STOP

MMI_KEYBEEP_STOP_REQ .

keybeep_task.command.stop = TRUE .d_toneskb_init |= (B_KEYBEEP) .

.

d_toneskb_status &=

(~B_KEYBEEP)

.

BEEP

L1_KEYBEEP_STOP_CON

MMI_KEYBEEP_STOP_CON

RESET IDLE

Figure 2: Key beep new solution (Requested stop)

MMI DSPL1SL1A

Page 14: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 14/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 14/133

2.5 L1A state machine

Figure 3: L1A keybeep state machine

MMI_KEYBEEP_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1a_l1s_com.keybeep_task.command.start = FALSE;

  l1a_l1s_com.keybeep_task.command.stop = FALSE;

0

Stop the keybeep:

  l1a_l1s_com.keybeep_task.command.stop = TRUE;

Download the keybeep description in the NDB.

Start the keybeep:

  l1a_l1s_com.keybeep_task.command.star t = TRUE;

L1_KEYBEEP_STOP_CON

L1_KEYBEEP_START_CON

Send the MMI_KEYBEEP_STOP_CON message.

Send the MMI_KEYBEEP_START_CON message.

 Reset the command:

  l1a_l1s_com.keybeep_task.command.start = FALSE;

MMI_KEYBEEP_STOP_REQ

WAIT_START_CON

WAIT_STOP

Page 15: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 15/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 15/133

2.6 L1S state machine

Figure 4: L1S keybeep state machine

keybeep_task.command.start

0

IDLE

0

Start the DSP keybeep task:

  d_toneskb_init |= B_KEYBEEP;

!(d_toneskb_init & B_KEYBEEP)

&&

(d_toneskb_status & B_KEYBEEP)

Send the L1_KEYBEEP_START_CON message.

WAIT_KEYBEEP_START

WAIT_KEYBEEP_STOP

! (d_toneskb_status & B_KEYBEEP) keybeep_task.command.stop

Send the L1_KEYBEEP_STOP_CON message.

Disable the start command:

  keybeep_task.command.start = FALSE;

Stop the DSP keybeep task:

  d_dur_kb = 0;

  d_toneskb_init |= B_KEYBEEP;

Page 16: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 16/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 16/133

3 Tones

3.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a tone (MMI_TONE_START_REQ message), it must wait the start

confirmation (MMI_TONE_START_CON) before to stop the tone.

•  The MMI isn’t allowed to start a new tone before to receive a stop confirmation

(MMI_TONE_STOP_CON).

•  The MMI can receive a stop confirmation (MMI_TONE_STOP_CON) in two cases:

♦  The MMI requested to stop the tone (MMI_TONE_STOP_REQ) and the L1

confirms with the stop confirmation message.

♦  The tone generation is finished and the L1 informs the MMI with the stop

confirmation message.

•  The MMI isn’t allowed to run a TONE task with:

♦  A melody 0.

♦  A melody 1.♦  A voice memorization (recording).

♦  A speech recognition (enrollment, recognition, update, update-check).

•  The MMI can run the tone task in all GSM modes and in all GSM transition (i.e. idle<-

>dedicated, dedicated->idle).

3.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_TONE_START_REQ T_MMI_TONE_REQ

MMI->L1 MMI_TONE_STOP_REQ Trigger

MMI<-L1 MMI_TONE_START_CON Trigger

MMI<-L1 MMI_TONE_STOP_CON Trigger

T_MMI_TONE_REQ message type

d_k_x1_t0(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 0. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (tri-tones generation).

d_k_x1_t1(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 1. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see thetable 1&2 of the S806 specification (tri-tones generation).

Page 17: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 17/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 17/133

d_k_x1_t2(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 2. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see thetable 1&2 of the S806 specification (tri-tones generation).

d_pe_rep(UWORD16)

 Number of period to process the tri-tone melody played in dedicated mode (1…0xffff).

 Note: d_pe_rep=0 isn’t allowed, d_pe_rep=0xffff means the tone is played infinitely.

d_pe_off(UWORD16)Specifies the duration of the period of the tri-tone melody played in dedicated mode (0…32767). A period

consists of a sequence and, if required, a silent phase. This duration corresponds to a number of audio

frames (i.e. 20 ms).

d_se_off(UWORD16)Specifies the duration of the sequence of the tri-tone (0…32767). This duration corresponds to a number of 

audio frames (i.e. 20 ms). Note that 0<=d_se_off<=d_pe_off.

d_bu_off(UWORD16)Specifies the duration of a burst of the tri-tone (0…32767). This duration corresponds to a number of audio

frames (i.e. 20 ms). Note that 0<=d_bu_off<=d_se_off<=d_pe_off.

d_t0_on(UWORD16)

Specifies the stating time of the tone 0 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 0 must be started. Note that

d_t0_on<=d_bu_off.

d_t0_off(UWORD16)

Specifies the ending time of the tone 0 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 0 must be stopped. Note that

d_t0_on<=d_t0_off.

d_t1_on(UWORD16)

Specifies the stating time of the tone 1 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 1 must be started. Note that

d_t2_on<=d_bu_off.

Page 18: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 18/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 18/133

d_t1_off(UWORD16)Specifies the ending time of the tone 1 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 1 must be stopped. Note that

d_t1_on<=d_t1_off.

d_t2_on(UWORD16)

Specifies the stating time of the tone 2 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 2 must be started. Note that

d_t2_on<=d_bu_off.

d_t2_off(UWORD16)

Specifies the ending time of the tone 2 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 2 must be stopped. Note that

d_t2_on<=d_t2_off.

3.3 L1A-L1S message interfaceDirection Message name Type

L1A<-L1S L1_TONE_START_CON Trigger

L1A<-L1S L1_TONE_STOP_CON Trigger

Page 19: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 19/133

Page 20: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 20/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 20/133

RESET

WAIT_START_REQ

MMI_TONE_START_REQIDLE

tone_task.command.start = TRUE

WAIT_START_CON

d_toneskb_init |= (B_TONE)

WAIT_TONE_START

d_toneskb_init &= (~B_TONE)

d_toneskb_status |= (B_TONE) TONE

L1_TONE_START_CON .

.

MMI_TONE_START_CON WAIT_TONE_STOP .

.

WAIT_STOP

MMI_TONE_STOP_REQ .tone_task.command.stop = TRUE .

d_toneskb_init |= (B_TONE) .

.d_toneskb_status &= (~B_TONE) TONE

L1_TONE_STOP_CON

MMI_TONE_STOP_CON

RESET IDLE

Figure 6: Key beep (Requested stop)

MMI DSPL1SL1A

Page 21: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 21/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 21/133

3.5 L1A state machine

Figure 7: L1A tone state machine

MMI_TONE_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.tone_task.command.start = FALSE;

  l1s_l1a_com.tone_task.command.stop = FALSE;

0

Stop the tone:

  l1s_l1a_com.tone_task.command.s top = TRUE;

Download the tone description in the NDB.Start the tone:

  l1s_l1a_com.tone_task.command.start = TRUE;

L1_TONE_STOP_CON

L1_TONE_START_CON

Send the MMI_TONE_STOP_CON message.

Send the MMI_TONE_START_CON message.

Reset the start command:

  l1a_l1s_com.tone_task.command.start = FALSE; 

MMI_TONE_STOP_REQ

WAIT_START_CON

WAIT_STOP

Page 22: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 22/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 22/133

3.6 L1S state machine

Figure 8: L1S tone state machine

tone_task.command.start

0

IDLE

0

Start the DSP tone task:

  d_toneskb_init |= B_TONE;

!(d_toneskb_init & B_TONE)

&&

(d_toneskb_status & B_TONE)

Send the L1_TONE_START_CON message.

WAIT_TONE_START

WAIT_TONE_STOP

! (d_toneskb_status & B_TONE) tone_task.command.stop

Send the L1_TONE_STOP_CON message.

Reset the start command:

  tone_task.command.start = FALSE;

Stop the DSP Otone task:

  d_pe_rep = 0

  d_toneskb_init |= B_TONE

Page 23: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 23/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 23/133

4 Melody ringer 

4.1 MMI rule

The MMI must respect the following rules (these rules are applied for the melody 0 and 1):

•  When the MMI starts a melody (MMI_MELODY0_START_REQ message), it must wait the

start confirmation (MMI_MELODY0_START_CON) before to stop the melody 0.

•  The MMI isn’t allowed to start a new melody before to receive a stop confirmation

(MMI_MELODY0_STOP_CON).

•  The MMI can receive a stop confirmation (MMI_MELODY0_STOP_CON) in two cases:

♦  The MMI requested to stop the melody (MMI_MELO0_STOP_REQ and the L1

confirms the stop confirmation message

♦  The melody generation is finished (no loop-back) and the L1 informs the MMI with

the stop confirmation message.

•  The MMI isn’t allowed run a melody with:

♦  A tone.

♦  A voice memorization recording.♦  A voice memorization playing.

♦  A speech recognition (enrollment update, update-check and recognition).

•  The MMI isn’t allowed play different format of the melody (for example: format E0 and E1)

at the same time.

•  The MMI is allowed to play the melody 1 and the melody 0 (same format) in parallel. Note :

these two melodies are played independently.

•  The MMI can run the melody in all GSM modes in all GSM mode transition.

4.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_MELODY0_START_REQ T_MMI_MELODY_REQ

MMI->L1 MMI_MELODY1_START_REQ T_MMI_MELODY_REQMMI->L1 MMI_MELODY0_STOP_REQ Trigger

MMI->L1 MMI_MELODY1_STOP_REQ Trigger

MMI<-L1 MMI_MELODY0_START_CON Trigger

MMI<-L1 MMI_MELODY1_START_CON Trigger

MMI<-L1 MMI_MELODY0_STOP_CON Trigger

MMI<-L1 MMI_MELODY1_STOP_CON Trigger

T_MMI_MELODY_REQ message type

start_address (* UWORD16)

Specifies the address where the melody description is put.

Page 24: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 24/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 24/133

loopback (BOOL)

Specifies if the melody is played in loopback mode (loopback = TRUE) or not (loopback = FALSE).

 Note: if the loop back mode is enable, the melody is restarted when all dedicated oscillators are stopped.

oscillator_used_bitmap (UWORD16)

This bit field register indicates which oscillators must be used to play the melody:

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Oscillator xx xx xx xx xx xx xx xx 7 6 5 4 3 2 1 0

 Note : “xx” means that this bit isn’t used, IT MUST BE PUT TO 0.

An oscillator is used if the corresponding bit is set to 1 otherwise it must be set to 0.

oscillator_melody_bitmap (UWORD16)

This bit field register indicates which oscillators are used in the melody score (addressing by start_address):

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Oscillator xx xx xx xx xx xx xx xx 7 6 5 4 3 2 1 0

 Notes :

-  “xx” means that this bit isn’t used, IT MUST BE PUT TO 0.

-  - The number of oscillators in the melody score must be equal or less than the number of oscillator 

used in the melody 0.

An oscillator is used if the corresponding bit is set to 1 otherwise it must be set to 0.

4.3 L1A-L1S interface

Direction Message name Type

L1A<-L1S L1_MELODY0_START_CON Trigger

L1A<-L1S L1_MELODY1_START_CON Trigger

L1A<-L1S L1_MELODY0_STOP_CON Trigger

L1A<-L1S L1_MELODY1_STOP_CON Trigger

Page 25: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 25/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 25/133

4.4 Process flow

The following descriptions are for the melody 0. The same behavior could be described for the melody 1.

M0_RESET

M0_WAIT_START_REQ

MMI_MELODY0_START_REQ(loopback = FALSE)

M0_INACTIVE

melody0_task.command.start = TRUE

M0_WAIT_START_CON

d_melo_osc_used |=M0_oscillator_used

M0_WAIT_COUNTER_EQUAL_0

Download first oscillatorsdescription MELODY

.

M0_WAIT_DESCRIPTION_START .

.

(d_melo_osc_active &

oscillator_used_in_desc) = 1

.

.

MMI_MELODY0_START_CON L1_MELODY0_START_CON ..

M0_WAIT_COUNTER_EQUAL_0 .

.

Download new oscillatorsdescription

.

.

.

M0_WAIT_DESCRIPTION_START .

.

(d_melo_osc_active &M0_oscillator_used_in_desc) = 1

.

.

.

End of the melody .

M0_WAIT_END_MELODY .

.

.

(d_melo_osc_active &oscillator_used) =0

.MELODY.

d_melo_osc_used &=

~M0_oscillator_used

L1_MELODY0_STOP_CONMMI_MELODY0_STOP_CON

M0_RESET M0_INACTIVE

Figure 9: Melody (automatic stop)

MMI DSPL1SL1A

Page 26: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 26/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 26/133

M0_RESET

M0_WAIT_START_REQ

MMI_MELODY0_START_REQ

(loopback = FALSE)

M0_INACTIVE

melody0_task.command.start = TRUE

M0_WAIT_START_CON

d_melo_osc_used |=

M0_oscillator_used

M0_WAIT_COUNTER_EQUAL_0

Download first oscillators

description MELODY

.

M0_WAIT_DESCRIPTION_START .

.

(d_melo_osc_active &

oscillator_used_in_desc) = 1

.

.

MMI_MELODY0_START_CON L1_MELODY0_START_CON .

.

M0_WAIT_COUNTER_EQUAL_0 .

.

Download new oscillators

description

.

.

.

M0_WAIT_DESCRIPTION_START .

.

(d_melo_osc_active &

M0_oscillator_used_in_desc) = 1

.

.

MMI_MELODY0_STOP_REQ .

melody0_task.command.stop = TRUESet 0xfffe in each oscillator 

description used.

M0_WAIT_END_MELODY .

.

(d_melo_osc_active &

oscillator_used) =0

.

MELODY.

d_melo_osc_used &=

~M0_oscillator_used

L1_MELODY0_STOP_CON

MMI_MELODY0_STOP_CON

M0_RESET M0_INACTIVE

Figure 10: Melody (requested stop with or without loopback)

MMI DSPL1SL1A

Page 27: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 27/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 27/133

4.5 L1A state machine

Figure 11: L1A melody state machine

MMI_MELODY0_START_REQ

M0_WAIT_START_REQ

0

M0_RESET

Reset the command:

  l1s_l1a_com.melody0_task.command.start = FALSE;

  l1s_l1a_com.melody0_task.command.stop = FALSE;

0

Stop Melody 0:

  l1s_l1a_com.melody0_task.command.stop = TRUE;

Download the parameters of the message to the

structure:

  l1s_l1a_com.melody0_task.parameters;

Start Melody 0:

  l1s_l1a_com.melody0_task.command.star t = TRUE;

L1_MELODY0_STOP_CON

L1_MELODY0_START_CON

Send the MMI_MELODY0_STOP_CON message.

Send the MMI_MELODY0_START_CON message.

Reset the start command:  l1s_l1a_com.melody0_task.command.start = FALSE;

MMI_MELODY0_STOP_REQ

M0_WAIT_START_CON

M0_WAIT_STOP

Page 28: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 28/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 28/133

4.6 L1S state machine

Figure 12: L1S melody state machine (1/2)

0

M0_INACTIVE

Initialize the oscillators used.

Initialize the pointer to the current description:

  l1s.melody0.pointer = l1a_l1s_com.melody0_task.parameters.start_pointer;

Enable oscillators used:

 d_melo_osc_used |= (l1a_l1s_com.melody0_task.parameters.oscillator_used & SC_MELO_OSCILLATOR_MASK);

Initialize the download counter with the first offset time:

  l1s.melody0.counter = "T" ;

It's the melody start phase:

  l1s.melody0.start_phase = TRUE;

The MMI starts the melody 0:

l1a_l1s_com.melody0_task.command.start = TRUE;

Send the message L1_MELODY0_START_CON.

M0_WAIT_COUNTER_EQUAL_0

It isn't the time to download the description:

l1s.melody0.counter >0

The description must be downloaded:

l1s.melody0.counter = 0

The MMI requests to stop the current melody0:

l1a_l1s_com.melody0_task.command.stop = TRUE;

Decrease the download counter:

  l1s.melody0.counter--;

Save the mapping of the ocillator used in this description in the variable:

  l1s.melody0.oscillator_used_in_desc.

Download the new description.

The pointer to the current description points to the next description.

Initialize the oscillator used.

Disable the loopback:

  l1a_l1s_com.melody0_task.parameters.loop = FALSE;

Reset the stop command:

  l1a_l1s_com.melody0_task.command.stop = FALSE;

M0_WAIT_DESCRIPTION_START

The new description is started:

(d_melo_osc_active & l1s.melody0.oscillator_used_in_desc) = 1

Is it the start phase?

l1s.melody0.start_phase = TRUE?

YES

NO

1

2

Is it the end of the melody?

*(l1s.melody0.pointer) = 0x0000?Set the new download counter value:

  l1s.melody0.counter = "T-1" YESNO

2

Page 29: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 29/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 29/133

Figure 13: L1S melody state machine (2/2)

The melody is in loopback mode:

l1a_l1s_com.melody0_task.parameters.loop = TRUE;

M0_WAIT_END_MELO

All oscillators used are stopped:

d_melo_osc_active & ((l1a_l1s_com.melody0_task.parameters.oscillator_used)

& SC_MELO_OSCILLATOR_MASK) = 0`

Disable the oscillator dedicated to this melody:

d_melo_osc_used &= ~(l1a_l1s_com.melody0_task.parameters.oscillator_used & SC_MELO_OSCILLATOR_MASK);

Send the message L1_MELODY0_STOP_CON.

2

The MMI requests to stop the current melody0:

l1a_l1s_com.melody0_task.command.stop = TRUE;

Initialize the oscillator used.

Disable the loopback:

  l1a_l1s_com.melody0_task .parameters.loop = FALSE;

Reset the stop command:

  l1a_l1s_com.melody0_task .command.stop = FALSE;

Reset the pointer to the current melody:

  l1s.melody0.pointer = l1a_l1s_com.melody0_task.parameters.start_pointer;

Set the new download counter value:

  l1s.melody0.counter = "T-1";

1

0

NO

YES

Page 30: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 30/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 30/133

5 Voice memorisation

5.1 Principle

The voice memorization feature is a task to record and play some speech samples pronounced by the

mobile user. So this task can be divided in two subtasks:

  Recording task: task to save the samples corresponding the to the user speech.

  Playing task: task to play the speech samples previously recorded.

The compression format used is based on the full rate vocoder. So, the rate is 20 word (16 bits) per 20 ms.

So to record 1 min. of speech, the MMI must allowed 60s/0.02s * 20 = 60 000word = 58,6Kwords.

Moreover if the DTX use, the rate changes if the user speak or not. If it’s doesn’t speak, only the

 background noise is recorded so the rate if 1 word per 20ms. And if the use pronounces something the rate

is 20 word per 20 ms.

5.2 Playing task

5.2.1 MMI rules

The MMI must respect the following rules

•  When the MMI starts a voice memorization playing task (MMI_VM_PLAY_START_REQ

message), it must wait the start confirmation (MMI_VM_PLAY_START_CON) before to

stop this task.

•  The MMI isn’t allowed to start a new voice memorization playing task before to receive a

stop confirmation message (MMI_VM_PLAY_STOP_CON).

•  The MMI can receive a stop confirmation message (MMI_VM_PLAY_STOP_CON) in two

cases:

♦  The MMI requested to stop the current voice memorization playing task (i.e.

MMI_VM_PLAY_STOP_REQ) and the L1 confirms with the stop confirmation

message.♦  The current task is stopped automatically (end of the voice buffer) and the L1

informs the MMI with the stop confirmation message.

•  The MMI isn’t allowed to run a voice memorization playing task with:

♦  A melody 0.

♦  A melody 1.

♦  A tone.

♦  A speech recognition (enrollment, update, update-check, recognition).

•  The MMI isn’t allowed to run a voice memorization recording task in the same time than a

voice playing task 

•  The MMI is allowed to run the voice memorization playing task in all GSM modes and in all

GSM mode transition (i.e. idle<->dedicated, dedicated->dedicated).

Page 31: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 31/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 31/133

5.2.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_VM_PLAY_START_REQ T_MMI_VM_PLAY_REQ

MMI->L1 MMI_VM_PLAY_STOP_REQ Trigger

MMI<-L1 MMI_VM_PLAY_START_CON Trigger

MMI<-L1 MMI_VM_PLAY_STOP_CON Trigger

T_MMI_VM_PLAY_REQ message type

start_address(* UWORD16)Specifies the start address of the voice memo buffer mapped in RAM.

5.2.3 L1A-L1S message interface

Direction Message name TypeL1A<-L1S L1_VM_PLAY_START_CON Trigger

L1A<-L1S L1_VM_PLAY_STOP_CON Trigger

Page 32: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 32/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 32/133

5.2.4 Process flow

RESET

WAIT_START_REQ

MMI_VM_PLAY_START_REQ

IDLE

voicememo_task.play.command.start =

TRUE

WAIT_START_CONd_toneskb_init |=

B_VM_PLAY_START

WAIT_DSP_START

d_toneskb_init &=

~B_VM_PLAY_START

d_toneskb_status |=

B_VM_PLAY_ON_GOING SPEECH

L1_VM_PLAY_START_CON ..

MMI_VM_PLAY_START_CON WAIT_DSP_SAMPLE .

.

WAIT_STOP .

.

 b_block_ready = 0 ..

Download the RAM memory to the

a_du_x buffer 

.

.

.

.

.

 b_block_ready = 0 .

.

The pointed word in the RAM is

END_VM_MASK 

.

.d_toneskb_init |=

B_VM_STOP_PLAY..

.

WAIT_DSP_STOP .

d_toneskb_init &=

~B_VM_PLAY_STOP

.

.

.

d_toneskb_status &=

~B_VM_PLAY_ON_GOING

.

SPEECHL1_VM_PLAY_STOP_CON

MMI_VM_PLAY_STOP_CON

RESET IDLE

Figure 14: Voice memo (playing in all mode with an automatic stop)

MMI DSPL1SL1A

Page 33: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 33/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 33/133

RESET

WAIT_START_REQ

MMI_VM_PLAY_START_REQ

IDLE

voicememo_task.play.command.start =

TRUE

WAIT_START_CON

d_toneskb_init |=

B_VM_PLAY_START

WAIT_DSP_START

d_toneskb_init &=

~B_VM_PLAY_START

d_toneskb_status |=B_VM_PLAY_ON_GOING SPEECH

L1_VM_PLAY_START_CON .

.

MMI_VM_PLAY_START_CON WAIT_DSP_SAMPLE .

.

WAIT_STOP

.

.

 b_block_ready = 0 .

.

Download the RAM memory to the

a_du_x buffer 

.

.

.

.

.

MMI_VM_PLAY_STOP_REQ .

voicememo_task.play.command.stop =

TRUE

.

.

d_toneskb_init |=B_VM_PLAY_STOP ..

.

WAIT_DSP_STOP .

d_toneskb_init &=

~B_VM_PLAY_STOP

.

.

.d_toneskb_status &=

~B_VM_PLAY_ON_GOING

.

SPEECH

L1_VM_PLAY_STOP_CONMMI_VM_PLAY_STOP_CON

RESET IDLE

Figure 15: Voice memo (playing in all mode with a requested stop)

MMI DSPL1SL1A

Page 34: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 34/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 34/133

5.2.5 L1A state machine

Figure 16: Voice memo playing (L1A state machine)

MMI_VM_PLAY_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.voicememo_task.play.command.start = FALSE;

  l1s_l1a_com.voicememo_task.play.command.stop = FALSE;

0

Stop voice memorization playing task:

  l1s_l1a_com.voicememo_task.play.command.stop = TRUE;

Download the parameters of the message to the structure:

  l1s_l1a_com.voicememo_task.play.parameters;Start voice memorization playing task:

  l1s_l1a_com.voicememo_task.play.command.star t = TRUE;

L1_VM_PLAY_STOP_CON

L1_VM_PLAY_START_CON

Send the MMI_VM_PLAY_STOP_CON message.

Send the MMI_VM_PLAY_START_CON message.

Reset the start command:

  l1s_l1a_com.voicememo_task.play.command.start = FALSE;

MMI_VM_PLAY_STOP_REQ

WAIT_START_CON

WAIT_STOP

Page 35: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 35/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 35/133

5.2.6 L1S state machine

Figure 17: Voice memo (L1S voice memo playing state machine)

IDLE

Initialize the pointer to the voice data RAM buffer:

  l1s.voicememo.play.pointer = l1a_l1s_com.voicememo_task.play.parameters.start_pointer;

Start the voice memo playing DSP task:

  d_toneskb_init |= B_VM_PLAY_START;

NO

YES

Start the voice memorization playing taskl1a_l1s_com.voicememo_task.play.command.start = TRUE

WAIT_DSP_START

The DSP is started:

(d_toneskb_status & B_VM_PLAY_ON_GOING) = TRUE

Send the message L1_VM_PLAY_START_CON.

WAIT_DSP_REQUEST

The DSP need a new block:

a_du_x[0] & B_BLOCK_READY = FALSE;

The MMI request to stop the Voice memorization playing task:

l1a_l1s_com.voicememo_task.play.command.stop = TRUE;

Is it the end of the voice memo data RAM buffer?

*(l1s.voicememo.play.pointer) = END_VM_MASK?

Download the data to the a_du_x buffer.Increase the pointer to the voice data RAM buffer.

Stop the DSP voice memorization playing task:

  d_toneswkb_init |= B_VM_PLAY_STOP;

WAIT_DSP_STOP

The DSP voice memorization playing task is stopped:

(d_toneskb_status & B_VM_PLAY_ON_GOING) = FALSE;

Send the message L1_VM_PLAY_STOP_CON.

Stop the DSP voice memorization playing task:

  d_toneswkb_init |= B_VM_PLAY_STOP;

Page 36: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 36/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 36/133

5.3 Recording task

5.3.1 MMI rules

The MMI must respect the following rules

•  When the MMI starts a voice memorization recording task (MMI_VM_RECORD_REQ

message), it must wait the start confirmation (MMI_VM_RECORD_START_CON) before to

stop this task.

•  The MMI isn’t allowed to start a new voice memorization task before to receive a stop

confirmation message (MMI_VM_RECORD_STOP_CON).

•  The MMI can receive a stop confirmation message (MMI_VM_RECORD_STOP_CON) in

two cases:

♦  The MMI requested to stop the current voice memorization recording task (i.e.

MMI_VM_RECORD_STOP_REQ) and the L1 confirms with the stop confirmation

message.

♦  The recording task is stopped automatically (end of the voice buffer) and the L1

informs the MMI with the stop confirmation message.

•  The MMI isn’t allowed to run a voice memorization recording task with:

♦  A melody 0.

♦  A melody 1.

♦  A tone.

♦  A speech recognition (enrollment, update, update-check, recognition).

•  The MMI isn’t allowed to run a voice memorization recording task in the same time than a

voice playing task 

•  The MMI is allowed to run the voice memorization recording task in all GSM modes and in

all GSM mode transition (i.e. idle<->dedicated, dedicated->dedicated).

Moreover, a tone (c.f. parameters of the MMI_VM_RECORD_REQ message) is generated automatically in

the UL and DL path when the voice memorization recording task run during the dedicated speech mode

(c.f. the section below “Tone uplink”).

Page 37: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 37/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 37/133

5.3.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_VM_RECORD_START_REQ T_MMI_VM_RECORD_REQ

MMI->L1 MMI_VM_RECORD_STOP_REQ Trigger

MMI<-L1 MMI_VM_RECORD_START_CON Trigger

MMI<-L1 MMI_VM_RECORD_STOP_CON T_MMI_VM_RECORD_CON

T_MMI_VM_RECORD_CON message type

stop_address(* UWORD16)Specifies the address of the voice memo buffer where the voice memo was stopped.

 Note: the word pointed by this address is the last word of the voice memorization recording buffer.

T_MMI_VM_RECORD_REQ message type

start_address(* UWORD16)Specifies the start address of the voice memo buffer mapped in RAM.

stop_address(* UWORD16)

Specifies the stop address of the voice memo buffer mapped in RAM.

 Note: the word pointed by this address is a part of the voice memorization RAM buffer.

dtx_used(BOOL)

Specifies the DTX mode for the voice memo record (0 = No DTX, 1 = DTX)

record_coeff_ul (UWORD16)

Coefficient added during the voice memo recording to the uplink TCH path in format Q8.8.

Example: record_coef_ul = 0x0100 = 1, record_coef_dl = 0x0080 = 0,5.

record_coeff_dl (UWORD16)

Coefficient added during the voice memo recording to the downlink TCH path in format Q8.8.

Example: record_coef_dl = 0x0100 = 1, record_coef_ul = 0x0080 = 0,5.

Page 38: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 38/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 38/133

d_k_x1_t0(UWORD16)Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 0. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (tri-tones generation).

d_k_x1_t1(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 1. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (tri-tones generation).

d_k_x1_t2(UWORD16)

Specifies the frequency (8 most significant bit) and the amplitude (8 less significant bit) of the tone 2. This

tone is played in the beginning of the recording in dedicated mode. For the value of this parameter see the

table 1&2 of the S806 specification (tri-tones generation).

d_pe_rep(UWORD16)

 Number of period to process the tri-tone melody played in dedicated mode (0…0xffff).

If d_pe_rep=0 no tri-tone is palyed.

d_pe_off(UWORD16)

Specifies the duration of the period of the tri-tone melody played in dedicated mode (0…32767). A period

consists of a sequence and, if required, a silent phase. This duration corresponds to a number of audio

frames (i.e. 20 ms).

d_se_off(UWORD16)

Specifies the duration of the sequence of the tri-tone (0…32767). This duration corresponds to a number of 

audio frames (i.e. 20 ms). Note that 0<=d_se_off<=d_pe_off.

d_bu_off(UWORD16)

Specifies the duration of a burst of the tri-tone (0…32767). This duration corresponds to a number of audio

frames (i.e. 20 ms). Note that 0<=d_bu_off<=d_se_off<=d_pe_off.

d_t0_on(UWORD16)

Specifies the stating time of the tone 0 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 0 must be started. Note that

d_t0_on<=d_bu_off.

d_t0_off(UWORD16)

Specifies the ending time of the tone 0 (0…32767). Considering the length of a burst period, in term of 

Page 39: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 39/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 39/133

number of audio frame (i.e. 20 ms), this values describes when the tone 0 must be stopped. Note that

d_t0_on<=d_t0_off.

d_t1_on(UWORD16)

Specifies the stating time of the tone 1 (0…32767). Considering the length of a burst period, in term of number of audio frame (i.e. 20 ms), this values describes when the tone 1 must be started. Note that

d_t2_on<=d_bu_off.

d_t1_off(UWORD16)Specifies the ending time of the tone 1 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 1 must be stopped. Note that

d_t1_on<=d_t1_off.

d_t2_on(UWORD16)Specifies the stating time of the tone 2 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 2 must be started. Note that

d_t2_on<=d_bu_off.

d_t2_off(UWORD16)Specifies the ending time of the tone 2 (0…32767). Considering the length of a burst period, in term of 

number of audio frame (i.e. 20 ms), this values describes when the tone 2 must be stopped. Note that

d_t2_on<=d_t2_off.

5.3.3 L1A-L1S message interface

Direction Message name Type

L1A->L1S L1_VM_RECORD_START_CON TriggerL1A->L1S L1_VM_RECORD_STOP_CON T_L1_VM_RECORD_CON

T_L1_VM_RECORD_CON message type

stop_address(* UWORD16)

Specifies the address of the voice memo buffer where the voice memo was stopped.

 Note: the word pointed by this address is the last word of the voice memorization recording buffer.

Page 40: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 40/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 40/133

5.3.4 Process flow

RESET

WAIT_START_REQ

MMI_VM_RECORD_START_REQ

IDLE

voicememo_task.record.command.start

= TRUE

voicememo_task.record.tone_ul.start =TRUE

Initialize d_shift_ul and d_shift_dl

WAIT_START_CONd_toneskb_init |=

B_VM_REC_START

WAIT_DSP_START

d_toneskb_init &=

~B_VM_REC_START

d_toneskb_status |=B_VM_REC_ON_GOING SPEECH

L1_VM_RECORD_START_CON .

.

MMI_VM_RECORD_START_CON WAIT_DSP_SAMPLE .

.

WAIT_STOP

.

 b_block_ready |= 1 .

.

Download the a_du_x buffer to the

specified RAM memory.

.

.

Clear the header of a_du_x buffer .

.

.

The RAM memory is full. .

Put END_VM_MASK in the RAM memory

at the end of the voice memo data.

.

.

d_toneskb_init |=

B_VM_REC_STOP

.

.

.

WAIT_DSP_STOP .

d_toneskb_init &=

~B_VM_TONE_UL

.

d_toneskb_init &=

~B_VM_REC_STOP

.

.

d_toneskb_status &=

~B_VM_REC_ON_GOING

.

VOICEL1_VM_RECORD_STOP_CON

MMI_VM_RECORD_STOP_CON

RESET IDLE

Figure 18: Voice memo (recording with an automatic stop)

MMI DSPL1SL1A

Page 41: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 41/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 41/133

RESET

WAIT_START_REQ

MMI_VM_RECORD_START_REQ

IDLE

voicememo_task.record.command.start

= TRUE

voicememo_task.record.tone_ul.start =

TRUE

Initialize d_shift_ul and d_shift_dl

WAIT_START_CON

d_toneskb_init |=

B_VM_REC_START

WAIT_DSP_START

d_toneskb_init &=

~B_VM_REC_START

d_toneskb_status |=

B_VM_REC_ON_GOING SPEECHL1_VM_RECORD_START_CON .

.

MMI_VM_RECORD_START_CON WAIT_DSP_SAMPLE .

.

WAIT_STOP

.

.

 b_block_ready |= 1 .

.

Download the a_du_x buffer to the

specified RAM memory.

.

.

.

Clear the header of a_du_x buffer .

.

.

MMI_VM_RECORD_STOP_REQ .voicememo_task.record.command.stop

= TRUE

.

.

Put END_VM_MAKS in the RAM

memory at the end of the voice memodata.

.

.

.

d_toneskb_init |=

B_VM_REC_STOP

.

.

.

WAIT_DSP_STOP .

.

d_toneskb_init &=

~B_VM_TONE_UL

.

.d_toneskb_init &=

~B_VM_REC_STOP

.

.

.

.

MMI DSPL1SL1A

Page 42: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 42/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 42/133

.

d_toneskb_status &=

~B_VM_REC_ON_GOING

.

VOICE

L1_VM_RECORD_STOP_CON

MMI_VM_RECORD_STOP_CON

RESET IDLE

Figure 19: Voice memo (recording with a requested stop)

MMI DSPL1SL1A

Page 43: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 43/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 43/133

5.3.5 L1A state machine

Figure 20: Voice memo recording (L1A state machine)

MMI_VM_RECORD_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.voicememo_task. record.command.s tart = FALSE;

  l1s_l1a_com.voicememo_task .record.command.stop = FALSE;

  l1s_1la_com.voicememo_task. record.tone_ul.start = FALSE;

0

Stop voice memorization recording task:

  l1s_l1a_com.voicememo_task.record.command.stop = TRUE;

Download the parameters of the message to the structure:

  l1s_l1a_com.voicememo_task.record.parameters;

Start voice memorization recording task:  l1s_l1a_com.voicememo_task.record.command.start = TRUE;

Start the onte uplink task:

  l1s_1la_com.voicememo_task.record.tone_ul.start = TRUE

Initialize the ul/dl coefficient:

 d_shift_ul = l1a_l1s_com.voicememo_task.record.paramers.coef_ul;

 d_shift_dl = l1a_l1s_com.voicememo_task.record.paramers.coef_dl;

L1_VM_RECORD_STOP_CON

L1_VM_RECORD_START_CON

Forward the messge in MMI_VM_RECORD_STOP_CON.

Send the MMI_VM_RECORD_START_CON message.

Reset the start commands:  l1s_l1a_com.voicememo_task. record.command.s tart = FALSE;

  l1s_1la_com.voicememo_task. record.tone_ul.start = FALSE;

MMI_VM_RECORD_STOP_REQ

WAIT_START_CON

WAIT_STOP

Page 44: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 44/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 44/133

5.3.6 L1S state machine

Figure 21: Voice memo (L1S voice memo recording state machine)

IDLE

Initialize the pointers to the voice data RAM buffer:

  l1s.voicememo.record.pointer = l1a_l1s_com.voicememo_task.play.parameters.start_pointer;

Initialize the DTX mode:

  d_tch_mode |= (l1a_l1s_com.voicememo_task. record.parameters.dtx)<<B_VOICE_MEMO_DTX;

Start the voice memo recording DSP task:

  d_toneskb_init |= B_VM_RECORD_START;

Start the voice memorization recording task

l1a_l1s_com.voicememo_task.record.command.start = TRUE

WAIT_DSP_START

The DSP is started:

(d_toneskb_status & B_VM_RECORD_ON_GOING) =

TRUE

Send the message L1_VM_RECORD_START_CON.

WAIT_DSP_SAMPLE

The DSP sends a new block:

a_du_x[0] & B_BLOCK_READY = TRUE;

The MMI requests to stop the Voice memorization recording task:

l1a_l1s_com.voicememo_task.record.command.stop = TRUE;

Is there enough place in the RAM buffer?

( l1a_l1s_com.voicememo_task.play.parameters.stop_pointer 

- l1s.voicememo.record.pointer + 1) > sizeof(a_du_x)?

Write the end mask at the end of the voice data in RAM buffer:

 *( l1s.voicememo.record.pointer) = END_VM_MASK;

Stop the DSP voice memorization recording task:

  d_toneswkb_init |= B_VM_RECORD_STOP;

WAIT_DSP_STOP

The DSP voice memorization recording task is stopped:

(d_toneskb_status & B_VM_RECORD_ON_GOING) = FALSE;

Send the message L1_VM_RECORD_STOP_CON.

Download the data from the a_du_x buffer to the RAM buffer.

Clear the Header of the a_du_x buffer.Increase the pointer to the voice data RAM buffer.

NO

YES

Write the end mask at the end of the voice data in RAM buffer:

 *( l1s.voicememo.record.pointer) = END_VM_MASK;

Stop the DSP voice memorization recording task:  d_toneswkb_init |= B_VM_RECORD_STOP;

Page 45: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 45/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 45/133

5.4 Tone uplink

5.4.1 Definition

The tone uplink task is a tone generated in the UL and DL audio path during the voice memorization

recording task and only in dedicated speech mode. The parameters of these tones are included in the voicememorization recording start message (i.e. MMI_VM_RECORD_START_REQ).

Finally, the tone uplink task is started when the voice recording task starts (i.e. the L1A set

voicememo_task.record.tone_ul.start to TRUE) and the tone is generated only if the L1S is in dedicated

mode (i.e. l1a_l1s_com.dedic_set.aset <> NULL and

l1a_l1s_com.dedic_set.aset->achan_ptr->mode = TCH_FS_MODE or TCH_HS_MODE or 

TCH_EFR_MODE).

5.4.2 Process Flow

IDLE

voicememo_task.record.tone_ul.start = TRUEd_toneskb_init |=

B_VM_TONE_UL

WAIT_DEDIC_SPEECH_MODE

The voice memo recording task is stopped

d_toneskb_init &=

~B_VM_TONE_UL

IDLE

Figure 22: Voice memo tone uplink: recording in idle mode.

DSPL1SL1A

Page 46: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 46/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 46/133

IDLE

voicememo_task.record.tone_ul.start = TRUE

d_toneskb_init |=

B_VM_TONE_UL

WAIT_DEDIC_SPEECH_MODE

dedicated speech mode is started:

l1a_l1s_com.dedic_set.aset <> NULL && l1a_l1s_com.dedic_set.aset->achan_ptr->mode = TCH_FS_MODE || TCH_HS_MODE || TCH_EFR_MODE

d_toneskb_init |= B_TONE

WAIT_TONE_UL_START

d_toneskb_init &= ~B_TONE

d_toneskb_satus |= B_TONE TONE_UL.

WAIT_TONE_UL_STOP .

.

.

d_toneskb_satus &= ~B_TONE TONE_UL

IDLE

Figure 23: Voice memo tone uplink: recording in dedicated mode (automatic stop).

DSPL1SL1A

Page 47: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 47/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 47/133

IDLE

voicememo_task.record.tone_ul.start = TRUE

d_toneskb_init |=

B_VM_TONE_UL

WAIT_DEDIC_SPEECH_MODE

dedicated speech mode is started:

l1a_l1s_com.dedic_set.aset <> NULL && l1a_l1s_com.dedic_set.aset->achan_ptr->mode = TCH_FS_MODE || TCH_HS_MODE || TCH_EFR_MODE

d_toneskb_init |= B_TONE

WAIT_TONE_UL_START

d_toneskb_init &= ~B_TONE

d_toneskb_satus |= B_TONE TONE_UL

.

WAIT_TONE_UL_STOP .

..

The voice memo recording task is stopped by the MMI

.

.

d_toneskb_init &=

~B_VM_TONE_UL

.

.d_pe_rep = 0 .

.

d_toneskb_init |= B_TONE ..

WAIT_DSP_STOP .

.

d_toneskb_init &= ~B_TONE ..

d_toneskb_satus &= ~B_TONE TONE_UL

IDLE

Figure 24: Voice memo tone uplink: recording in dedicated mode (resquested stop).

DSPL1SL1A

Page 48: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 48/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 48/133

5.4.3 L1S state machine

Figure 25: Tone uplink L1S state machine

IDLE

Start the tone uplink task

l1a_l1s_com.voicememo_task.record.tone_ul.start = TRUE

WAIT_DEDIC_SPEECH_MODE

Dedicated speech mode

Start the tone uplink DSP task:

  d_toneskb_init |= B_TONE;

WAIT_TONE_UL_START

The voice memorization recording task is stopping:

(d_toneskb_init & B_VM_TONE_UL) = FALSE;

The tone uplink task is started:

(d_toneskb_status & B_TONE) = TRUE

WAIT_TONE_UL_STOP

The tone uplink task is stopped:

(d_toneskb_status & B_TONE) = FALSE

The voice memorization recording task is stopping:

(d_toneskb_init & B_VM_TONE_UL) = FALSE

Stop the Tone uplink task:

 d_pe_rep = 0;

 d_toneskb_init |= B_TONE;

Set the tone uplink option:

  d_toneskb_init |= B_VM_TONE_UL;

Reset the tone uplink start command:

l1a_l1s_com.voicememo_task.record.tone_ul.start = FALSE;

Page 49: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 49/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 49/133

6 Speech recognition

6.1 Principle

The speech recognition feature is used by the mobile user to execute some task thanks to its speech.

For example, with the speech recognition task, the user can pronounce the name of the person to call and

the mobile can dial automatically the corresponding telephone number.

But to realize the example above some steps are needed:

  The user must enroll the word to recognize in a vocabulary database: it’s the

enrollment task. This task builds a model of the pronounced word and save it in the

vocabulary database.

  The user can update each word of the vocabulary database to enhance the recognition

of these words. It’s he update task. This task averages the old model (i.e. enrollment

 phase) with a new model and save it in the vocabulary database.

  The user can update and the mobile can check if this updated word is close to the

word to update. It’s the update-check task. This task averages the old model with a

new model and check if the averaged model is close to the old model or not.

  The mobile can recognize if the word pronounced by the user is in a vocabulary

database and by the way execute the task corresponding to this word (name dialing,

menu opening…). This task build a model of the word pronounced by the user and

compare it with the model included in a vocabulary database.

Finally, a new task (Speech recognition background task) is created to exchange the model( between the

MMI vocabulary database (generally in Flash memory) and the DSP via the API memory. The task is a

 preemptive task with a low priority (c.f. next chapter).

Page 50: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 50/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 50/133

6.2 Structure

As it said on the previous chapter, the speech recognition background database is created in order to

load/save the model from/to the MMI vocabulary database and to/from the API memory (c.f. figure below).

In fact, when a model must be saved/loaded to/from the MMI database, the L1A sends a message to the

 background task via the Qsrback  queue to request to start a background task.Some functions of the background task are customer dependent, so the background task call some customer 

function included in the MMI.

At the end of the background task, the speech recognition background task sends a message to the L1A via

the Q1 queue.

Figure 26: Speech recognition structure.

MMI

L1A

L1S

SR Background

DSP

 API

mem.

QMMI

Q1

QSRback

MMI_SR_ messages

L1_SR_ messages

L1_SRBACK_ messages

L1_SRBACK_ messages

MMI_SR_ messages

Cust_srback_ functions

emergency_stop flag 

Write/read model & speech

Page 51: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 51/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 51/133

6.3 Speech recognition vocabulary database

The speech recognition database is customer dependent but the database must respect the following rules:

  The customer can create several vocabulary databases. It must only transmit to the

L1 the ID of the database used.  In the recognition phase, only the vocabulary of one database is used.

  The model of a database must be arrange from the index 0 to the index “number of 

model in the current database – 1”.

  The maximum model size is 1041 16-bit words (i.e. SC_MMI_DB_MODEL_SIZE).

  The maximum speech size, in the database, is 2001 16-bit words (i.e.

SC_MMI_DB_SPEECH_SIZE).

  The header of the model indicates the size of the model in 16 words unit (i.e. model

frame unit).

  The speech sample is included between the beginning of the speech buffer to the end

mask constant (i.e. SC_VM_END_MASK).

  The customer database can be in flash memory.

Page 52: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 52/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 52/133

6.4 Enrollment task

The aim of this task is to acquire a new word for a MMI vocabulary database. So, the user says a word to

enroll and the mobile builds a model of this word. This model is used as reference for the recognition

 phase.

Moreover, during the enrollment task, the user can record the speech sample of the word. So, thanks to thevoice memorization playing task, the user can hear the word that he enrolls.

6.4.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a speech recognition enrollment task 

(MMI_SR_ENROLL_START_REQ message), it must wait the start confirmation

(MMI_SR_ENROLL_START_CON) before to stop this task.

•  The MMI can’t start any speech recognition task before to receive a stop enroll confirmation

message (MMI_SR_ENROLL_STOP_CON).

•  The MMI can receive a stop enroll confirmation message (MMI_SR_ENROLL_STOP_CON)

in two cases:

♦  The MMI requested to stop the current speech recognition enroll task (i.e.

MMI_SR_ENROLL_STOP_REQ) and the L1 confirms the stop enroll confirmationmessage.

♦  The current task is stopped automatically (end of the enrollment or an error is

occurred) and the L1 informs the MMI with the stop enroll confirmation message.

•  The MMI isn’t allowed to run a speech recognition enroll task with:

♦  A voice memorization playing and recording.

♦  An another speech recognition tasks (update, update-check and recognition).

•  With the DSP code 17, 31 and 32, the enrollment task can’t run in dedicated speech and

signaling only mode.

•  With the DSP code 33, the enrollment task can’t run in dedicated speech mode but it can run

in dedicated signaling only mode.

•  The UL gain (c.f. chapter : audio gain functions) must be constant during the speech

recognition enroll task and not too high (no saturation).

6.4.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_SR_ENROLL_START_REQ T_MMI_SR_ENROLL_REQ

MMI<-L1 MMI_SR_ENROLL_START_CON Trigger

MMI->L1 MMI_SR_ENROLL_STOP_REQ Trigger

MMI<-L1 MMI_SR_ENROLL_STOP_CON T_MMI_ENROLL_STOP_CON

Page 53: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 53/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 53/133

T_MMI_SR_ENROLL_REQ message type

database_id (UWORD8)

Specifies which database is used.

word_index (UWORD8)

Specifies the index in the “database_id” database of the model to enroll.

speech (BOOL)

Specifies if the speech must be recorded or not.

speech_address (*UWORD16)Specifies the address of the working circular buffer for the speech recording task.

 Note: the size of this buffer is fixed and equals to SC_SR_MMI_2_L1_SPEECH_SIZE.Moreover, the size of this buffer is bigger than the size of the speech buffer of the MMI vocabulary

database: SC_SR_MMI_DB_SPEECH_SIZE < SC_SR_MMI_2_L1_SPEECH_SIZE.

T_MMI_SR_ENROLL_STOP_CON message type

error_id (UWORD8)

Specifies the type of error.

value id type0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The DSP task to acquire the word takes to much time.

Page 54: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 54/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 54/133

6.4.3 L1A-L1S message interface

Direction Message name Type

L1A<-L1S L1_SR_ENROLL_START_CON Trigger

L1A<-L1S L1_SR_ENROLL_STOP_CON T_L1_ENROLL_STOP_CON

T_L1_SR_ENROLL_STOP_CON message type

error_id (UWORD8)

Specifies the type of error.

value id type0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The DSP task to acquire the word takes to much time.

Page 55: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 55/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 55/133

6.4.4 Process flow

RESET IDLE

WAIT_START_REQ

MMI_SR_ENROLL_START_REQ

command.enroll_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_ENROLL

WAIT_DSP_START

d_toneskb_status |=

B_SR_ENROLL_TASK SPEECHL1_SR_ENROLL_START_CON .

MMI_SR_ENROLL_START_CON .

.

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.d_sr_status |=

B_GOOD_ACQUISITION.

SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=~(B_SR_ENROLL_TASK &

B_VM_REC_ON_GOING)

L1_SR_ENROLL_STOP_CON

L1_SRBACK_SAVE_DATA_REQ

WAIT_BACK_TASK_DONE IDLE

L1_SRBACK_SAVE_DATA_CON

MMI_SR_ENROLL_STOP_CON

(SC_NO_ERROR)

RESET

Figure 27: Enrollment task: enroll no error and no resquested stop.

MMI DSPL1SL1ASR Back.

Page 56: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 56/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 56/133

RESET IDLE

WAIT_START_REQ

MMI_SR_ENROLL_START_REQ

command.enroll_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_ENROLL

WAIT_DSP_START

d_toneskb_status |=

B_SR_ENROLL_TASK SPEECH

L1_SR_ENROLL_START_CON .MMI_SR_ENROLL_START_CON .

.

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.

d_sr_status |=

B_GOOD_ACQUISITION

.

SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_ENROLL_TASK &B_VM_REC_ON_GOING)

L1_SR_ENROLL_STOP_CON

L1_SRBACK_SAVE_DATA_REQ

WAIT_BACK_TASK_DONE IDLE

MMI_SR_ENROLL_STOP_REQ

l1_srback_com.

emergency_stop = TRUE

WAIT_SRBACK_STOP

L1_SRBACK_SAVE_DATA_CON

MMI_SR_ENROLL_STOP_CON

(SC_BAD_ACQUISITION)

RESET

Figure 28: Enrollment task: enroll no error and resquested stop (L1S was stopped).

MMI DSPL1SL1ASR Back.

Page 57: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 57/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 57/133

RESET IDLE

WAIT_START_REQ

MMI_SR_ENROLL_START_REQ

command.enroll_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_ENROLL

WAIT_DSP_START

d_toneskb_status |=B_SR_ENROLL_TASK SPEECH

L1_SR_ENROLL_START_CON .

MMI_SR_ENROLL_START_CON .

.

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.MMI_SR_ENROLL_STOP_REQ .

command.update_stop = TRUE

d_toneskb_init |= B_SR_STOP .

.

WAIT_L1S_STOP WAIT_DSP_STOP

d_toneskb_status &=~(B_SR_ENROLL_TASK &

B_VM_REC_ON_GOING)

.SPEECH

L1_SR_ENROLL_STOP_CONMMI_SR_ENROLL_STOP_CON

(SC_BAD_ACQUISITION)

RESET

Figure 29: Enrollment task: enroll no error and resquested stop (L1S is running).

MMI DSPL1SL1ASR Back.

Page 58: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 58/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 58/133

RESET IDLE

WAIT_START_REQ

MMI_SR_ENROLL_START_REQ

command.enroll_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_ENROLL

WAIT_DSP_START

d_toneskb_status |=B_SR_ENROLL_TASK SPEECH

L1_SR_ENROLL_START_CON .

MMI_SR_ENROLL_START_CON .

.

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.

d_sr_status |=

B_BAD_ACQUISITION

.

SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=~(B_SR_ENROLL_TASK &

B_VM_REC_ON_GOING)

L1_SR_ENROLL_STOP_CON

(SC_BAD_ACQUISITION)

MMI_SR_ENROLL_STOP_CON(SC_BAD_ACQUISITION)

RESET

Figure 30: Enrollment task: enroll error (bad acquisition) and no resquested stop.

MMI DSPL1SL1ASR Back.

Page 59: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 59/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 59/133

6.4.5 L1A state machine

Figure 31: Enrollment task: L1A state machine (1/2).

MMI_SR_ENROLL_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.speechreco_task.command.enroll_start = FALSE;

  l1s_l1a_com.speechreco_task.command.enroll_stop = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_start = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_stop = FALSE;

1

L1_SR_ENROLL_STOP_CON

L1_SR_ENROLL_START_CON

Send the MMI_SR_ENROLL_START_CON message.

Reset the command:

  l1s_l1a_com.speechreco_task.command.enroll_start = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_start = FALSE;

MMI_SR_ENROLL_STOP_REQ

WAIT_START_CON

WAIT_STOP

Stop the speech recognition enroll task:

  l1a_l1s_com.speechreco_task.command.enroll_stop = TRUE;

Stop the speech recording task (if present):

  l1a_l1s_com.speechreco_task.command.speech_stop =

l1a_l1s_com.speechreco_task.parameters.speech;

Download the message parameters to the l1a_l1s_com.speechreco_task.parameters memory.

Set the start command of the speech recording task:

  l1a_l1s_com.speechreco_task.command.speech_start = l1a_l1s_com.speechreco_task.parameters.speech;

Start the speech recognition enroll task:

  l1a_l1s_com.speechreco_task.command.enroll_start = TRUE;

There is an error during the acquisition?

T_L1_SR_ENROLL_STOP_CON *)msg->error_id != SC_NO_ERROR?

NO

YES

Forward the message in MMI_SR_ENROLL_STOP_CON.Reset the stop background task command:

  l1_srback_com.emergency_stop = FALSE;

Start the background task to save the model (and) the speech:

Send the message L1_SRBACK_SAVE_DATA_REQ.

0

2

Page 60: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 60/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 60/133

Figure 32: Enrollment task: L1A state machine (2/2).

WAIT_BACK_TASK_DONE

1

L1_SRBACK_SAVE_DATA_CON MMI_SR_ENROLL_STOP_REQ

Sendthe message in MMI_SR_ENROLL_STOP_CON with no error.Stop immediatly the background task:

l1_srback.emergency_stop = TRUE;

WAIT_BACK_STOP

L1_SRBACK_SAVE_DATA_CON

Send the message MMI_SR_ENROLL_STOP_CON with an

SC_BAD_ACQUISITION error.

WAIT_L1S_STOP

2

L1_SR_ENROLL_STOP_CON

Send the message MMI_SR_ENROLL_STOP_CON with

an SC_BAD_ACQUISITION error.

0

0

0

Page 61: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 61/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 61/133

6.4.6 L1S state machine

Figure 33: Enrollment task: L1S state machine (1/2)

IDLE

The MMI starts the speech recognition enroll task:

l1a_l1s_com.speechreco_task.command.enroll_start = TRUE;

Initialize the status register:

  d_sr_status = 0;

Disable the DSP bit exact test:

  d_sr_bit_exact_test &= 0xff80;

Initialize the watchdog timer with the time to acquire a word:

  l1s.speechreco.time_out = SC_SR_AQUISITION_TIME_OUT;

Start the DSP enroll task:

  d_toneskb_init |= B_SR_ENROLL;

0

WAIT_DSP_START

The DSP enroll task is started:

(d_toneskb_status & B_SR_ENROLL_TASK) = TRUE;

Send the message L1_SR_ENROLL_START_CON.

1

Page 62: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 62/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 62/133

Figure 34: Enrollment task: L1S state machine (2/2)

The MMI stops the speech recognition enroll task:

l1a_l1s_com.speechreco_task.command.emroll_stop = TRUE;

The DSP enroll task ran bad

(d_sr_status & B_BAD_ACQUISITION) = TRUE;

Error: Bad acquisition

  l1s.speechreco.error = SC_BAD_ACQUISITION;

Stop the DSP enroll task:

  d_toneskb_init |= B_SR_STOP;

1

No error:

  l1s.speechreco.error = SC_NO_ERROR;

Stop the DSP enroll task:

  d_toneskb_init |= B_SR_STOP;

The DSP enroll task ran good:

(d_sr_status & B_GOOD_ACQUISITION) = TRUE;

WAIT_ACQUISITION_STATUS

0

Error: time is out  l1s.speechreco.error = SC_TIME_OUT;

Stop the DSP enroll task:

  d_toneskb_init |= B_SR_STOP;

Decrease the time:

  l1s.speechreco.time_out--;

The allowed time is out?

l1s.speechreco.time_out = 0?

NO

YES

The DSP enroll task is stopped:

(d_toneskb_status & B_SR_ENROLL_TASK & B_VM_RECORD_ON_GOING)

= FALSE;

WAIT_DSP_STOP

Send the message L1_SR_ENROLL_STOP_CON;

Page 63: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 63/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 63/133

6.5 Update task

The aim of this task is to update a model of a word of a MMI vocabulary database. So, the user pronounces

again a word contained in the MMI database. And the mobile builds a new model of this word thanks to the

old model and the new model just acquired. This model is a king of average of two models of the same

word. It permits to have a better model than the model acquired by the enrollment task.

Moreover, during the update task, the user can record again the speech sample of the word. This newspeech samples replace the samples acquired during the enroll task. And, thanks to the voice memorization

 playing task, the user can hear this word that he updates.

6.5.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a speech recognition update task (MMI_SR_UPDATE_START_REQ

message), it must wait the start confirmation (MMI_SR_UPDATE_START_CON) before to

stop this task.

•  The MMI isn’t allowed to start a new speech recognition task before to receive a stop update

confirmation message (MMI_SR_UPDATE_STOP_CON).

•  The MMI can receive a stop update confirmation message

(MMI_SR_UPDATE_STOP_CON) in two cases:

♦  The MMI requested to stop the current speech recognition update task (i.e.

MMI_SR_UPDATE_STOP_REQ) and the L1 confirms with the stop confirmation

message.

♦  The current task is stopped automatically (end of the update or an error is occurred)

and the L1 informs the MMI with the stop confirmation message.

•  The MMI isn’t allowed to run a speech recognition update task with:

♦  A voice memorization playing and recording.

♦  An another speech recognition tasks (enroll, update-check and recognition).

•  With the DSP code 17, 31 and 32, the update task can’t run in dedicated speech and signaling

only mode.

•  With the DSP code 33, the update task can’t run in dedicated speech mode but it can run in

dedicated signaling only mode.

  The speech recognition update task can’t run if the user database is empty.•  The update task must have the same audio configuration (FIR coefficients…) than the

enrollment task.

•  The UL gain (c.f. chapter : audio gain functions) must be constant and the same than the

enrollment task and not too high (no saturation).

6.5.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_SR_UPDATE_START_REQ T_MMI_SR_UPDATE_REQ

MMI<-L1 MMI_SR_UPDATE_START_CON Trigger

MMI->L1 MMI_SR_UPDATE_STOP_REQ Trigger

MMI<-L1 MMI_SR_UPDATE_STOP_CON T_MMI_UPDATE_STOP_CON

Page 64: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 64/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 64/133

T_MMI_SR_UPDATE_REQ message type

database_id (UWORD8)

Specifies which database is used.

word_index (UWORD8)

Specifies the index in the “database_id” database of the model to enroll.

speech (BOOL)

Specifies if the speech must be recorded or not.

speech_address (*UWORD16)Specifies the address of the working circular buffer used by the speech recording task.

 Note: the size of this buffer is fixed by the value SC_SR_MMI_2_L1_SPEECH_SIZE.

Moreover, the size of this buffer is bigger than the size of the speech buffer for each word of the MMI

vocabulary database: SC_SR_MMI_DB_SPEECH_SIZE < SC_SR_MMI_2_L1_SPEECH_SIZE.

T_MMI_SR_UPDATE_STOP_CON message type

error_id (UWORD8)Specifies the type of error.

value id type0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The time to acquire or to update the word is too long.

3 SC_BAD_UPDATE Bad update of the model. The model from database is too different

than the new model (built during the acquisition).

Page 65: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 65/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 65/133

6.5.3 L1A-L1S message interface

Direction Message name Type

L1A->L1S L1_SR_UPDATE_START_CON Trigger

L1A->L1S L1_SR_UPDATE_STOP_CON T_L1_UPDATE_STOP_CON

T_L1_SR_UPDATE_STOP_CON message type

error_id (UWORD8)

Specifies the type of error.

value id type

0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The time to acquire or to update the word is too long.

3 SC_BAD_UPDATE Bad update of the model. The model from database is too different

than the new model (built during the acquisition).

Page 66: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 66/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 66/133

6.5.4 Process flow

RESET IDLE

WAIT_START_REQ

MMI_SR_UPDATE_START_REQ

L1_SRBACK_LOAD_MODEL_REQ

MMI_SR_UPDATE_START_CON

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.update_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_UPDATE

WAIT_DSP_START

d_toneskb_status |=

B_SR_UPDATE_TASK SPEECHL1_SR_UPDATE_START_CON .

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.

d_sr_status |=

B_GOOD_ACQUISITION

.

SPEECH

WAIT_DSP_ALIGNMENT_START

d_toneskb_status &=

~B_SR_UPDATE_TASK 

d_toneskb_status |=

B_SR_ALIGNMENT_TASK 

WAIT_DSP_UPDATE_STATUS

d_sr_status |= B_GOOD_UPDATE

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=~(B_SR_UPDATE_TASK &

B_VM_REC_ON_GOING)

MMI DSPL1SL1ASR Back.

Page 67: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 67/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 67/133

d_toneskb_status &=~B_SR_ALIGNMENT_TASK 

WAIT_SPEECH_STOP

L1_SR_UPDATE_STOP_CONL1_SRBACK_SAVE_DATA_REQ

WAIT_BACK_TASK_DONE IDLE

L1_SRBACK_SAVE_DATA_CON

MMI_SR_UPDATE_STOP_CON

(SC_NO_ERROR)

RESET

Figure 35: Update task: Update no error and no resquested stop.

MMI DSPL1SL1ASR Back.

Page 68: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 68/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 68/133

RESET IDLE

WAIT_START_REQ

MMI_SR_UPDATE_START_REQ

L1_SRBACK_LOAD_MODEL_REQ

MMI_SR_UPDATE_START_CON

WAIT_MODEL_LOADED

MMI_SR_UPDATE_STOP_REQ

l1_srback_com.emergency_stop = TRUE

WAIT_BACK_STOP

L1_SRBACK_LOAD_MODEL_CON

MMI_SR_UPDATE_STOP_CON(SC_BAD_UPDATE)

RESET

Figure 36: Update task: Update no error and resquested stop (L1S isn’t running).

MMI DSPL1SL1ASR Back.

Page 69: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 69/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 69/133

RESET IDLE

WAIT_START_REQ

MMI_SR_UPDATE_START_REQ

L1_SRBACK_LOAD_MODEL_REQ

MMI_SR_UPDATE_START_CON

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.update_start = TRUE

WAIT_START_CON d_toneskb_init |= B_SR_UPDATE

WAIT_DSP_START

d_toneskb_status |=

B_SR_UPDATE_TASK SPEECH

L1_SR_UPDATE_START_CON .

WAIT_STOP WAIT_ACQUISITION_STATUS .

.

.

.

MMI_SR_UPDATE_STOP_REQ

command.update_stop = TRUE

d_toneskb_init |= B_SR_STOP

WAIT_L1S_STOP WAIT_DSP_STOP .

d_toneskb_status &=

~(B_SR_UPDATE_TASK &B_VM_REC_ON_GOING)

d_toneskb_status &=

~B_SR_ALIGNMENT_TASK 

WAIT_SPEECH_STOP

L1_SR_UPDATE_STOP_CON

MMI_SR_UPDATE_STOP_CON

(SC_BAD_ACQUISITION)

RESET

Figure 37: Update task: Update no error and resquested stop (L1S is running).

MMI DSPL1SL1ASR Back.

Page 70: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 70/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 70/133

6.5.5 L1A state machine

Figure 38: Update task: L1A state machine (1/2).

MMI_SR_UPDATE_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.speechreco_task.command.update_start = FALSE;

  l1s_l1a_com.speechreco_task.command.update_stop = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_start = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_stop = FALSE;

L1_SR_UPDATE_START_CON

WAIT_START_CON

NO

Download the message parameters to the l1a_l1s_com.speechreco_task.parameters memory.

Reset the background stop command:

  l1_srback_com.emergency_stop = FALSE;Start to download the model to the API:

Send the message L1_SRBACK_LOAD_MODEL_REQ to the background task.

Send the start confirmation message:MMI_SR_UPDATE_START_CON.

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON MMI_SR_UPDATE_STOP_REQ

Start the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_start = TRUE;

Sart the speech recording task (if needed):

  l1a_l1s_com.speechreco_task.command.speech_start =

l1a_l1s_com.speechreco_task.parameters.speech;

Stop immediatly the background task:

  l1_srback_com.emergency_stop = TRUE;

1

3

MMI_SR_UPDATE_STOP_REQ

2

Stop the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

Stop the speech recording task:

  l1a_l1s_com.speechreco_task.command.speech_stop =

l1a_l1s_com.speechreco_task.update.parameters.speech;

Reset the start command:

  l1s_l1a_com.speechreco_task.command.update_start = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_start = FALSE;

Page 71: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 71/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 71/133

Figure 39: Update task: L1A state machine (2/2).

WAIT_BACK_TASK_DONE

1

L1_SRBACK_SAVE_DATA_CON MMI_SR_UPDATE_STOP_REQ

Send the message MMI_SR_UPDATE_STOP_CON with no error.Stop immediatly the background task:

l1_srback.emergency_stop = TRUE;

WAIT_BACK_STOP

L1_SRBACK_SAVE_DATA_CON

Send the message MMI_SR_UPDATE_STOP_CON with an

SC_BAD_UPDATE error.

WAIT_L1S_STOP

L1MMI_SR_UPDATE_STOP_CON

Send the message MMI_SR_UPDATE_STOP_CON with an

SC_BAD_UPDATE error.

0

0

0

3

L1_SR_UPDATE_STOP_CON MMI_SR_UPDATE_STOP_REQ

WAIT_STOP

Stop the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

Stop the speech recording task:

  l1a_l1s_com.speechreco_task.command.speech_stop =

l1a_l1s_com.speechreco_task.update.parameters.speech;

There is an error during the acquisition?

(T_L1_SR_UPDATE_STOP_CON *)msg->error_id != SC_NO_ERROR?

Forward the message in MMI_SR_UPDATE_STOP_CON.

Reset the stop background task command:

  l1_srback_com.emergency_stop = FALSE;

Start the background task to save the model (and) the speech:

Send the message L1_SRBACK_SAVE_DATA_REQ.

0

YES

NO

2

L1_SRBACK_LOAD_MODEL_CON

Page 72: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 72/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 72/133

6.5.6 L1S state machine

Figure 40: Update task: L1S state machine (1/2)

IDLE

The MMI starts the speech recognition update task:

l1a_l1s_com.speechreco_task.command.update_start = TRUE;

0

WAIT_DSP_START

The DSP update task is started:

(d_toneskb_status & B_SR_UPDATE_TASK) = TRUE;

Initialize the status register:

  d_sr_status = 0;

Disable the DSP bit exact test:

  d_sr_bit_exact_test &= 0xff80;

Initialize the watchdog timer with the time to acquire a word:

  l1s.speechreco.time_out = SC_SR_ACQUISITION_TIME_OUT;

Start the DSP update task:

  d_toneskb_init |= B_SR_UPDATE;

The MMI stops the speech recognition update task:

l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

The DSP acquisition task ran ba

(d_sr_status & B_BAD_ACQUISITION) =

Error: word is too long or too short

  l1s.speechreco.error = SC_BAD_ACQUISITION;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

 acquisistion task ran good:

 B_GOOD_ACQUISITION) = TRUE;

WAIT_ACQUISITION_STATUS

2

error:time is out.

  l1s.speechreco.error = SC_TIME_OUT;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

Decrease the time:

l1s.speechreco.update.time_out--;

The allowed time is out?

l1s.speechreco.time_out = 0?

NO

YES

1

Send the start confirmation message:

L1_SR_UPDATE_START_CON.

Page 73: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 73/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 73/133

Figure 41: Update task: L1S state machine (2/2)

The MMI stops the speech recognition update task:

l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

The DSP update task ran bad

(d_sr_status & B_BAD_UPDATE) = TRUE;

Error: bad update:

  l1s.speechreco.error = SC_BAD_UPDATE;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

No error:

  l1s.speechreco.error = SC_NO_ERROR;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

The DSP update task ran good:

(d_sr_status & B_GOOD_UPDATE) = TRUE;

WAIT_UPDATE_STATUS

error:time is out.

  l1s.speechreco.error = SC_TIME_OUT;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

Decrease the time:

l1s.speechreco.time_out--;

The allowed time is out?

l1s.speechreco.time_out = 0?

NO

YES

1

WAIT_DSP_STOP

The DSP update task is stopped:

(d_toneskb_status & B_SR_UPDATE_TASK & B_SR_ALIGNMENT_TASK &

B_VM_REC_ON_GOING)

= FALSE;

Send the message L1_SR_UPDATE_STOP_CON.

0

WAIT_DSP_ALIGNMENT_TASK_START

The DSP alignment task is started:(d_toneskb_status & B_ALIGNMENT_TASK & ~B_UPDATE_TASK) = TRUE;

Initialize the timer with the time to update a word:

  l1s.speechreco.time_out = SC_SR_UPDATE_TIME_OUT;

2

Page 74: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 74/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 74/133

6.6 Reco task

The aim of this task is to find the model included in the MMI vocabulary database corresponding to the

word pronounced by the user. So, the user says a word and the mobile builds its model. And it compares

this model to the models contained in the MMI vocabulary database. For each comparison, a score is

attributed. Finally, after these comparisons, the word corresponding to the best score is the elected model.

 Note that a CTO (Close Too Original) algorithm is activated if the number of model in the database is low(<4). This algorithm builds some dummy models to increase the performance of the recognition algorithm

when the number of model in the vocabulary is to low.

6.6.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a speech recognition task (MMI_SR_RECO_START_REQ message), it

must wait the start confirmation (MMI_SR_RECO_START_CON) before to stop this task.

•  The MMI isn’t allowed to start a new speech recognition task before to receive a stop

recognition confirmation message (MMI_SR_RECO_STOP_CON).

•  The MMI can receive a stop recognition confirmation message

(MMI_SR_RECO_STOP_CON) in two cases:

♦  The MMI requested to stop the current speech recognition task (i.e.

MMI_SR_RECO_STOP_REQ) and the L1 confirms with the stop confirmation

message.

♦  The current task is stopped automatically (end of the recognition or an error is

occurred) and the L1 informs the MMI with the stop confirmation message.

•  The MMI isn’t allowed to run a speech recognition update task with:

♦  A voice memorization playing and recording.

♦  An another speech recognition tasks (update, update-check and enrollment).

•  With the DSP code 17, 31 and 32, the recognition task can’t run in dedicated speech and

signaling only mode.

•  With the DSP code 33, the recognition task can’t run in dedicated speech mode but it can run

in dedicated signaling only mode.

•  The speech recognition task can’t run if the user database is empty.

•  The speech recognition task must have the same audio configuration (FIR coefficients…) thanthe enrollment/update task.

•  The UL gain must be constant during the speech recognition task and not too high (no

saturation).

•  The index of the words included in the MMI database must start from 0 to the “number of 

model ”.

6.6.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_SR_RECO_START_REQ T_MMI_SR_RECO_REQ

MMI<-L1 MMI_SR_RECO_START_CON Trigger

MMI->L1 MMI_SR_RECO_STOP_REQ Trigger

MMI<-L1 MMI_SR_RECO_STOP_CON T_MMI_SR_RECO_STOP_CON

Page 75: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 75/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 75/133

T_MMI_SR_RECO_REQ message type

database_id (UWORD8)

Specifies which user database is used.

vocabulary_size (UWORD8)

Specifies the number of word included in the “database_id” database.

T_MMI_SR_RECO_STOP_CON message type

error_id (UWORD8)Specifies the type of error.

value id type0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The time to acquire or to compare a word is too long.

4 SC_BAD_RECOGNITION The word is out of vocabulary or the best words are too close.

5 SC_CTO_WORD A word generated by the CTO algorithm is the best word.

best_word_index (UWOR16)

Gives the index in the user database of the recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

best_word_score (UWORD32)Gives the scores of the recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

second_best_word_index (UWOR16)Gives the index in the user database of the second recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

Page 76: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 76/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 76/133

second_best_word_score (UWORD32)Gives the scores of the second recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

third_best_word_index (UWOR16)

Gives the index in the user database of the third recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

third_best_word_score (UWORD32)

Gives the scores of the third recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

fourth_best_word_index (UWOR16)

Gives the index in the user database of the third recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

fourth_best_word_score (UWORD32)

Gives the scores of the third recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

d_sr_db_level (UWORD16)

Gives the estimate voice level in dB. This information is used to tune the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

d_sr_db_noise (UWORD16)Gives the estimate noise level in dB. This information is used to tune the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

d_sr_model_size (UWORD16)

Gives the size of the model acquired during the speech recognition task. This information is used to tune

the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

Page 77: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 77/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 77/133

6.6.3 L1A-L1S message interface

Direction Message name Type

L1A<-L1S L1_SR_RECO_START_CON Trigger

L1A<-L1S L1_SR_RECO_STOP_CON T_L1_SR_RECO_STOP_CON

L1A<-L1S L1_SR_PROCESSING_START_CON Trigger

L1A<-L1S L1_SR_PROCESSING_STOP_CON T_L1_SR_RECO_STOP_CONL1A<-L1S L1_SR_RECO_STOP_IND T_L1_SR_RECO_STOP_IND

T_L1_SR_RECO_STOP_CON message type

error_id (UWORD8)Specifies the type of error.

value id type

0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The time to acquire or to compare a word is too long.4 SC_BAD_RECOGNITION The word is out of vocabulary or the best words are too close.

5 SC_CTO_WORD A word generated by the CTO algorithm is the best word.

T_L1_SR_RECO_STOP_IND message type: C.f. T_MMI_SR_RECO_STOP_CON message type.

Page 78: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 78/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 78/133

6.6.4 Process flow

RESET IDLE (reco)

WAIT_START_REQ

MMI_SR_RECO_START_REQ

command.reco_start = TRUE

WAIT_RECO_START

d_toneskb_init |= B_SR_RECO

WAIT_DSP_START

d_toneskb_status |=

B_SR_RECO_TASK SPEECH

L1_SR_RECO_START_CON .MMI_SR_RECO_START_CON .

WAIT_RECO_STOP WAIT_ACQUISITION_STATUS.

.

.

d_sr_status |=B_GOOD_ACQUISITION

.SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_RECO_TASK )

L1_SR_RECO_STOP_CON

LOAD_MODEL IDLE (reco)

L1_SRBACK_LOAD_MODEL_REQ(word_index++)

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.processing_start = TRUE

WAIT_PROCESSING_START IDLE (processing)

d_sr_dsp_param &=SC_SR_OOV_SFT_THR 

d_sr_nb_words = vocabulary_size

MMI DSPL1SL1ASR Back.

Page 79: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 79/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 79/133

d_toneskb_init |=

B_SR_PROCESSING

WAIT_DSP_PROCESSING_START

d_toneskb_status |=B_SR_PROCESSING_TASK 

L1_SR_PROCESSING_START_CON

WAIT_PROCESSING_STOP WAIT_DSP_PROCESSING_STOP

d_toneskb_status &=

~SR_PROCESSING_TASK 

All words in the database were comparedto the speaker word.

L1_SR_PROCESSING_STOP_CON   (YES)

(LOOP ON MODELS)

WAIT_DSP_RESULT

d_sr_status |=

B_SR_GOOD_ACQUISITION

d_sr_best_word[4]d_sr_scores[4]

d_sr_db_noise

d_sr_dd_leveld_sr_mod_size

L1_SR_RECO_STOP_IND

MMI_SR_RECO_STOP_CON

(SC_NO_ERROR)

RESET IDLE (processing)

Figure 42: Reco task: reco no error and no resquested stop.

MMI DSPL1SL1ASR Back.

Page 80: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 80/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 80/133

RESET IDLE (reco)

WAIT_START_REQ

MMI_SR_RECO_START_REQ

command.reco_start = TRUE

WAIT_RECO_START

d_toneskb_init |= B_SR_RECO

WAIT_DSP_START

d_toneskb_status |=

B_SR_RECO_TASK SPEECH

L1_SR_RECO_START_CON .

MMI_SR_RECO_START_CON .

WAIT_RECO_STOP WAIT_ACQUISITION_STATUS

.

..

MMI_SR_RECO_STOP_REQ ..

command.reco_stop = TRUE .

.

d_toneskb_init |= B_SR_STOP .

.

WAIT_L1S_STOP WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_RECO_TASK ) SPEECH

L1_SR_RECO_STOP_CON

MMI_SR_RECO_STOP_CON

(SC_BAD_ACQUISITION)

RESET IDLE (reco)

Figure 43: Reco task: reco no error and resquested stop (L1S is in acquisition phase).

MMI DSPL1SL1ASR Back.

Page 81: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 81/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 81/133

RESET IDLE (reco)

WAIT_START_REQ

MMI_SR_RECO_START_REQ

command.reco_start = TRUE

WAIT_RECO_START

d_toneskb_init |= B_SR_RECO

WAIT_DSP_START

d_toneskb_status |=

B_SR_RECO_TASK SPEECHL1_SR_RECO_START_CON .

MMI_SR_RECO_START_CON .

WAIT_RECO_STOP WAIT_ACQUISITION_STATUS

.

.

d_sr_status |=

B_GOOD_ACQUISITION

.

SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_RECO_TASK )

L1MMI_SR_RECO_STOP_CON

command.reco_start = FALSE

LOAD_MODEL IDLE (reco)

L1_SRBACK_LOAD_MODEL_REQ

( word_index++)

WAIT_MODEL_LOADED

MMI_SR_RECO_STOP_REQ

l1_srback_emergency_stop = TRUE

WAIT_BACK_STOP

L1_SRBACK_LOAD_MODEL_CON

MMI_SR_RECO_STOP_CON

(SC_BAD_RECOGNITION)

RESET

Figure 44: Reco task: reco no error and resquested stop (Background task is running).

MMI DSPL1SL1ASR Back.

Page 82: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 82/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 82/133

RESET IDLE (reco)

WAIT_START_REQ

MMI_SR_RECO_START_REQ

command.reco_start = TRUE

WAIT_RECO_START

d_toneskb_init |= B_SR_RECO

WAIT_DSP_START

d_toneskb_status |=

B_SR_RECO_TASK SPEECHL1_SR_RECO_START_CON .

MMI_SR_RECO_START_CON .

WAIT_RECO_STOP WAIT_ACQUISITION_STATUS

..

.

d_sr_status |=B_GOOD_ACQUISITION

.SPEECH

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=~(B_SR_RECO_TASK )

L1_SR_RECO_STOP_CON

LOAD_MODEL IDLE (reco)

L1_SRBACK_LOAD_MODEL_REQ

(word_index++)

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.processing_start = TRUE

WAIT_PROCESSING_START IDLE (processing)

d_sr_dsp_param &=

SC_SR_OOV_SFT_THR 

d_sr_nb_words = vocabulary_size

d_toneskb_init |=B_SR_PROCESSING

MMI DSPL1SL1ASR Back.

Page 83: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 83/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 83/133

WAIT_DSP_PROCESSING_START

d_toneskb_status |=

B_SR_PROCESSING_TASK 

L1_SR_PROCESSING_START_CON

WAIT_PROCESSING_STOP WAIT_DSP_PROCESSING_STOP

MMI_SR_RECO_STOP_REQ

command.reco_stop = TRUE

d_toneskb_init |= B_SR_STOP

WAIT_L1S_STOP WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_RECO_TASK )

L1_SR_RECO_STOP_CON

MMI_SR_RECO_STOP_CON

(SC_BAD_RECOGNITION)

RESET IDLE (processing)

Figure 45: Reco task: reco no error and resquested stop (L1 is in processing phase).

MMI DSPL1SL1ASR Back.

Page 84: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 84/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 84/133

6.6.5 L1A state machine

Figure 46: Reco task: L1A state machine (1/3).

MMI_SR_RECO_START_REQ

WAIT_START_REQ

0

RESET

Reset the command: 

l1s_l1a_com.speechreco_task.command.reco_start = FALSE;

  l1s_l1a_com.speechreco_task.command.reco_stop = FALSE;

  l1s_l1a_com.speechreco_task.command.processing_start = FALSE;

  l1s_l1a_com.speechreco_task.command.processing_stop = FALSE;

 Reset the index word counter:

  l1a_l1s_com.speechreco_task.parameters.word_index_counter = 0

Start the speech recognition reco task:

  l1a_l1s_com.speechreco_task.command.reco_start = TRUE;

The CTO algorithm must be used?

l1a_l1s_com.speechreco_task.parameters.vocabulary_size

<= SC_SR_MAX_WORDS_FOR_CTO?

Download the message parameters to the l1a_l1s_com.speechreco_task.parameters memory.

Disable the CTO algorithm:

  l1a_l1s_com.speechreco_task.parameters.cto_algorithm = FALSE;

Enable the CTO algorithm:

  l1a_l1s_com.speechreco_task.parameters.cto_algorithm = TRUE;

Double the vocabulary size:

  l1a_l1s_com.speechreco_task.parameters.vocabulary_size<<1;

YES

NO

1

L1_SR_RECO_START_CON

Forward the message in MMI_SR_RECO_START_CON.

Reset the speech recognition reco task command:

  l1a_l1s_com.speechreco_task.command.reco_start = FALSE;

 

WAIT_RECO_START

Page 85: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 85/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 85/133

Figure 47: Reco task: L1A state machine (2/3).

1

WAIT_RECO_STOP

MMI_SR_RECO_STOP_REQ

Stop the speech recognition task:

  l1a_l1s_com.speechreco_task.command.reco_stop = TRUE;

L1_SR_RECO_STOP_CON

LOAD_MODEL

Initialize the background task stop command:

  l1_srback_com.emergency_stop = FALSE;

Start to load the model to the API:

Send the message L1_SRBACK_LOAD_MODEL_REQ.

Increment the word index counter:

  l1a_l1s_com.speechreco_task.parameters.word_index_counter++;

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

Start the DSP recognition processing task:

  l1a_l1s_com.speechreco_task.command.pr ocessing_start = TRUE;

Stop Immediatly the background task:

  l1_srback_com.emergency_stop = TRUE;

MMI_SR_RECO_STOP_REQ

WAIT_PROCESSING_START

L1_SR_PROCESSING_START_CON MMI_SR_RECO_STOP_REQ

Stop the speech reco processing task:

  l1a_l1s_com.speechreco_task.command.processing_stop = TRUE;

3

4

3

The acquisition phase is good or not?

(T_L1_SR_RECO_STOP_CON)msg->error_id = SC_NO_ERROR

Send the MMI_SR_RECO_STOP_CON message with an

error.

0

NO

YES

Reset the start command of the processing task:

  l1a_l1s_com.speechreco_task.command.processing_start = FALSE;

2

5

Page 86: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 86/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 86/133

Figure 48: Reco task: L1A state machine (3/3).

0

Forward the message in MMI_SR_RECO_STOP_CON.

The CTO algorithm is used?

l1a_l1s_com.speechreco_task.parameters.cto_algorithm?

There is no error during the recognition?

(T_L1_SR_RECO_STOP_IND*)msg->error_id = SC_NO_ERROR?

The index of the best word is odd?

(T_L1_SR_RECO_STOP_CON*)msg->best_word_index & 0x01?

Change the error id to SC_CTO_WORD:

(T_L1_SR_RECO_STOP_CON*)msg->error_id = SC_CTO_WORD;

NO

YES

YES

YES

NO

Divided by 2 the 4 indexes of the best words in the message.

NO

3

WAIT_L1S_STOP

L1_SR_PROCESSING_STOP_CON L1_SR_RECO_STOP_CON L1_SR_RECO_STOP_IND

Send the MMI_SR_RECO_STOP_CON message.

with an SC_BAD_RECOGNITION error 

0

WAIT_BACK_STOP

4

0

Send the MMI_SR_RECO_STOP_CON message with an

SC_BAD_RECOGNITION error 

L1_SRBACK_LOAD_MODEL_CON

WAIT_PROCESSING_STOP

L1_SR_PROCESSING_STOP_CON MMI_SR_RECO_STOP_REQ L1_SR_RECO_STOP_IND

Stop the speech reco processing task:

  l1a_l1s_com.speechreco_task.command.processing_stop = TRUE;

3

The processing phase is good or not?

 _L1_SR_PROCESSING_STOP_CON)msg->error_id = SC_NO_ERROR

Send the MMI_SR_RECO_STOP_CON message with an

error.

0

NO

YES

5

2

Page 87: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 87/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 87/133

6.6.6 L1S state machine

Figure 49: Speech recognition reco: L1S reco task state machine (1/2)

IDLE

The MMI starts the speech recognition reco task:

l1a_l1s_com.speechreco_task.command.reco_start = TRUE;

Initialize the status register:

  d_sr_status = 0;

Disable the DSP bit exact test:

  d_sr_bit_exact_test &= 0xff80;

Initialize the watchdog timer with the time to acquire a word:

  l1s.speechreco.time_out = SC_SR_ACQUISITION_TIME_OUT;

Start the DSP reco task:

  d_toneskb_init |= B_SR_RECO;

0

WAIT_DSP_START

The DSP reco task is started:

(d_toneskb_status & B_SR_RECO_TASK) = TRUE;

Send the message L1_SR_RECO_START_CON.

1

Page 88: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 88/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 88/133

Figure 50: Speech recognition reco: L1S reco task state machine (2/2)

The MMI stops the speech recognition reco task:

l1a_l1s_com.speechreco_task.command.reco_stop = TRUE;

The DSP acquisition task ran ba

(d_sr_status & B_BAD_ACQUISITION) =

error: bad acquisition.

  l1s.speechreco.error = SC_BAD_ACQUISITION;

1

The DSP acquisition task ran good:

sr_status & B_GOOD_ACQUISITION) = TRUE;

WAIT_ACQUISITION_STATUS

WAIT_DSP_STOP

The DSP update task is stopped:

(d_toneskb_status & B_SR_RECO_TASK) = FALSE;

Send the message L1_SR_RECO_STOP_CON;

0

error:time is out.

  l1s.speechreco.error = SC_TIME_OUT;

Decrease the time:

l1s.speechreco.time_out--;

The allowed time is out?

l1s.speechreco.time_out = 0?

NO

YES

error:time is out.

  l1s.speechreco.error = SC_NO_ERROR;

Stop the DSP reco task:

  d_toneskb_init |= B_SR_STOP;

Page 89: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 89/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 89/133

Figure 51: Speech recognition reco: L1S processing state machine (1/2)

The DSP processing task is stopped:(d_toneskb_status & B_SR_PROCESSING) = FALSE;

WAIT_DSP_PROCESSING_STOP

error:time is out.

  l1s.speechreco.error = SC_TIME_OUT;

Stop the DSP update task:

  d_toneskb_init |= B_SR_STOP;

Decrease the time:

l1s.speechreco.time_out--;

The allowed time is out?

l1s.speechreco.reco.time_out = 0?NO YES

0

Start the processing task:

l1a_l1s_com.speechreco_task.command.processing_start = TRUE

WAIT_DSP_PROCESSING_START

The DSP processing task is started:

(d_toneskb_status & B_SR_PROCESSING_TASK) = TRUE;

It was the last model?

l1a_l1s_com.speechreco_task.parameters.index_word_counter =

l1a_l1s_com.speechreco_task.parameters.vocabulary_size?

NO

1

YES

The MMI stops the speech recognition processing task:l1a_l1s_com.speechreco_task.command.processing_stop = TRUE;

error: bad recognition.

  l1s.speechreco.reco.error = SC_BAD_RECOGNITION;

Stop the DSP reco task:

  d_toneskb_init |= B_SR_STOP;

Initialize the status register:

  d_sr_status = 0;

Disable the DSP bit exact test:

  d_sr_bit_exact_test &= 0xff80;

Initialize the threshold of the OOV algorithm:

  d_s r_db_dsp_param &= 0x20;

  d_sr_db_dsp_param &= SC_SR_OOV_SFT_THR;

Initialize the watchdog timer with the time to process the new word:

  l1s.speechreco.time_out = SC_SR_PROCESSING_TIME_OUT;

Transmit to the DSP the number of word to compare:

  d_sr_nb_words = l1a_l1s_com.speechreco_task.parameters.vocabulary_size;

Start the model comparison processing:

  d_toneskb_init |= B_SR_PROCESSING;

IDLE

Send the message: L1_SR_PROCESSING_START_CON

error: bad recognition.

  l1s.speechreco.reco.error = SC_NO_ERROR;

Send the message L1MMI_SR_PROCESSING_STOP_CON;

Reset the start command:

  l1a_l1s_com.speechreco_task.command.processing_start = FALSE;

WAIT_DSP_STOP

The DSP update task is stopped:

(d_toneskb_status & B_SR_RECO_TASK) = FALSE;

Send the message L1_SR_PROCESSING_STOP_CON.0

Page 90: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 90/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 90/133

Figure 52: Speech recognition reco: L1S processing state machine (2/2)

1

WAIT_DSP_RESULT

The DSP recognition task was good:

(d_sr_status & B_SR_GOOD_ACQUISITION)

The DSP recognition task was bad:

(d_sr_status & B_SR_BAD_ACQUISITION)

error: out of vocabulary or best words too close:

  l1s.speechreco.error = SC_BAD_RECOGNITION;

no error:

l1s.speechreco.error = SC_NO_ERROR;

0

Send the message: L1_SR_RECO_STOP_IND

Page 91: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 91/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 91/133

6.7 Update-check task

The aim of this task is to update a model included in a MMI vocabulary database and to check if the

updated model is close to the model to update.

Therefor, this task is composed by the update task followed by a recognition task.

Like the update task, the user can record again the speech sample of the word. This new speech samplesreplace the samples acquired during the enroll task or the update task. And, thanks to the voice

memorization playing task, the user can hear the word that he pronounced.

If the updated model doesn’t correspond to the model to update, this new model is ignored and not saved in

the MMI vocabulary database and the speech samples too

6.7.1 MMI rules

The MMI must respect the following rules:

•  When the MMI starts a speech recognition update-check task 

(MMI_SR_UPDATE_CHECK_START_REQ message), it must wait the start confirmation

(MMI_SR_UPDATE_CHECK_START_CON) before to stop this task.

•  The MMI isn’t allowed to start a new speech recognition task before to receive a stop update-

check confirmation message (MMI_SR_UPDATE_CHECK_STOP_CON).

•  The MMI can receive a stop confirmation message (MMI_SR_UPDATE_CHECK_CON) intwo cases:

♦  The MMI requested to stop the current update-check task (i.e.

MMI_SR_UPDATE_CHECK_STOP_REQ) and the L1 confirms with the stop

confirmation message.

♦  The current task is stopped automatically (end of the update-check or an error is

occurred) and the L1 informs the MMI with the stop confirmation message.

•  The MMI isn’t allowed to run a speech recognition update-check task with:

♦  A voice memorization playing and recording.

♦  An another speech recognition tasks (enroll, update and recognition).

•  With the DSP code 17, 31 and 32, the update-check task can’t run in dedicated speech and

signaling only mode.

•  With the DSP code 33, the update-check task can’t run in dedicated speech mode but it can

run in dedicated signaling only mode.

•  The speech recognition update-check task can’t run if the user database contains no word.

•  The update-check task must have the same audio configuration (FIR coefficients…) than the

enrollment task.

•  The same audio configuration (FIR coefficients…) must be set for the update-check than the

enroll task.

•  The UL gain (c.f. chapter: audio gain functions) must be constant and the same than the

enrollment task and not too high (no saturation).

Page 92: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 92/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 92/133

6.7.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_SR_UPDATE_CHECK_START_REQ T_MMI_SR_UPDATE_CHECK_REQ

MMI<-L1 MMI_SR_UPDATE_CHECK_START_CON Trigger

MMI->L1 MMI_SR_UPDATE_CHECK_STOP_REQ Trigger

MMI<-L1 MMI_SR_UPDATE_CHECK_STOP_CON T_MMI_UPDATE_CHECK_STOP_CON

T_MMI_SR_UPDATE_CHECK_REQ message type

database_id (UWORD8)Specifies which user database is used.

model_index (UWORD8)

Specifies the index of the model to update and to check.

model_address (*UWORD16)

Specifies the address where the model of the updated must be saved.

 Note: the size of this buffer is fixed by the value SC_SR_SIZE_DB_SPEECH.

speech (BOOL)

Specifies if the speech must be recorded or not.

speech_address (*UWORD16)Specifies the address of the working circular buffer used by the speech recording task.

 Note: the size of this buffer is fixed by the value SC_SR_MMI_2_L1_SPEECH_SIZE.Moreover, the size of this buffer is bigger than the size of the speech buffer for each word of the MMI

vocabulary database: SC_SR_MMI_DB_SPEECH_SIZE < SC_SR_MMI_2_L1_SPEECH_SIZE.

vocabulary_size (UWORD8)

Specifies the number of word included in the user database.

Page 93: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 93/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 93/133

T_MMI_SR_UPDATE_CHECK_STOP_CON message type

error_id (UWORD8)Specifies the type of error.

value id type

0 SC_NO_ERROR No error is occurred.

1 SC_BAD_ACQUISITION Bad acquisition of the word. The word is too long or too short.

2 SC_TIME_OUT The time to acquire or to update or to check a word is too long.

3 SC_BAD_UPDATE Bad update of the word.

4 SC_BAD_RECOGNITION The updated word is out of vocabulary or the best words are too

close.

5 SC_CTO_WORD A word calculated by the CTO algorithm is the best word.

6 SC_CHECK_ERROR The best word isn’t the word to update.

best_word_index (UWOR16)

Gives the index in the user database of the recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

best_word_score (UWORD16)

Gives the scores of the recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

second_best_word_index (UWOR16)

Gives the index in the user database of the second recognized word. Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

second_best_word_score (UWORD16)

Gives the scores of the second recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

third_best_word_index (UWOR16)

Gives the index in the user database of the third recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.(useful for a customer OOV algorithm)

Page 94: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 94/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 94/133

third_best_word_score (UWORD16)Gives the scores of the third recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

fourth_best_word_index (UWOR16)

Gives the index in the user database of the third recognized word.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

fourth_best_word_score (UWORD16)

Gives the scores of the third recognized word. The DSP OOV algorithm calculated this score.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

(useful for a customer OOV algorithm)

d_sr_db_level (UWORD16)

Gives the estimate voice level in dB. This information is used to tune the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

d_sr_db_noise (UWORD16)

Gives the estimate noise level in dB. This information is used to tune the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

d_sr_model_size (UWORD16)Gives the size of the model acquired during the speech recognition task. This information is used to tune

the speech recognition task.

 Note: this information is valid only if error_id  is equal to SC_NO_ERROR.

6.7.3 L1A-L1S message interface

For the structure of the message, please refer to the “reco task” and “update task” chapters.

Direction Message name Type

L1A<-L1S L1_SR_UPDATE_START_CON Trigger

L1A<-L1S L1_SR_UPDATE_STOP_CON T_L1_RECO_STOP_CON

L1A<-L1S L1_SR_RECO_START_CON Trigger

L1A<-L1S L1_SR_RECO_STOP_CON T_L1_RECO_STOP_CON

L1A<-L1S L1_SR_PROCESSING_START_CON Trigger

L1A<-L1S L1_SR_PROCESSING_STOP_CON T_L1_RECO_STOP_CONL1A<-L1S L1_SR_RECO_STOP_IND T_L1_RECO_STOP_IND

Page 95: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 95/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 95/133

6.7.4 Process flow

RESET IDLE (update)

WAIT_START_REQ

MMI_SR_UPDATE_CHECK_START_REQ

L1_SRBACK_LOAD_MODEL_REQ

MMI_SR_UPDATE_CHECK_START_CON

WAIT_UPDATE_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.update_start = TRUE

WAIT_UPDATE_START d_toneskb_init |= B_SR_UPDATE

WAIT_DSP_START

d_toneskb_status |=

B_SR_UPDATE_TASK SPEECH

L1_SR_UPDATE_START_CON .

WAIT_UPDATE_STOP WAIT_ACQUISITION_STATUS .

.

.

.

d_sr_status |=

B_GOOD_ACQUISITION

.

SPEECH

WAIT_DSP_ALIGNMENT_START

d_toneskb_status &=

~B_SR_UPDATE_TASK 

d_toneskb_status |=

B_SR_ALIGNMENT_TASK 

WAIT_DSP_UPDATE_STATUS

d_sr_status |= B_GOOD_UPDATE

d_toneskb_init |= B_SR_STOP

WAIT_DSP_STOP

d_toneskb_status &=

~(B_SR_UPDATE_TASK &

B_VM_REC_ON_GOING)

MMI DSPL1SL1ASR Back.

Page 96: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 96/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 96/133

d_toneskb_status &=

~B_SR_ALIGNMENT_TASK 

L1_SR_UPDATE_STOP_CONL1_SRBACK_TEMP_SAVE_ 

DATA_REQ

WAIT_TEMP_SAVE__DONE IDLE (update)

L1_SRBACK_TEMP_SAVE_ DATA_CON

LOAD_MODEL IDLE (processing)

L1_SRBACK_LOAD_MODEL_REQ

(CTO, word_index++)

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

command.processing_start = TRUE

WAIT_PROCESSING_START

d_sr_dsp_param &=SC_SR_OOV_SFT_THR 

d_sr_nb_words = vocabulary_size

d_toneskb_init |=

B_SR_PROCESSING

WAIT_DSP_PROCESSING_START

d_toneskb_status |=

B_SR_PROCESSING_TASK 

L1_SR_PROCESSING_START_CON

WAIT_PROCESSING_STOP WAIT_DSP_PROCESSING_STOP

d_toneskb_status &=

~SR_PROCESSING_TASK 

All words in the database were comparedto the speaker word.

L1_SR_PROCESSING_STOP_CON

(Loop on model) (YES)

WAIT_DSP_RESULT

d_sr_status |=

B_SR_GOOD_ACQUISITION

MMI DSPL1SL1ASR Back.

Page 97: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 97/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 97/133

d_sr_best_word[4]

d_sr_scores[4]

d_sr_db_noised_sr_dd_level

d_sr_mod_size

L1_SR_RECO_STOP_IND

L1_SRBACK_SAVE_DATA_REQ

WAIT_SAVE__DONE IDLE (processing)

L1_SRBACK_TEMP_DATA_CON

MMI_SR_RECO_STOP_CON

(SC_NO_ERROR)

RESET

Figure 53: Update-check task: update-check with no error, no resquested stop.

MMI DSPL1SL1ASR Back.

Page 98: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 98/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 98/133

6.7.5 L1A state machine

Figure 54: Update-check task: L1A statemachine (1/5).

MMI_SR_UPDATE_CHECK_START_REQ

WAIT_START_REQ

0

RESET

Reset the command:

  l1s_l1a_com.speechreco_task.command.update_start = FALSE;

  l1s_l1a_com.speechreco_task.command.update_stop = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_start = FALSE;

  l1s_l1a_com.speechreco_task.command.speech_stop = FALSE;

L1_SR_UPDATE_START_CON

WAIT_UPDATE_START

NO

Download the message parameters to the l1a_l1s_com.speechreco_task.parameters memory.

Reset the background stop command:

  l1_srback_com.emergency_stop = FALSE;Start to download the model to the API:

Send the message L1_SRBACK_LOAD_MODEL_REQ to the background task.

Send the start confirmation message:MMI_SR_UPDATE_CHECK_START_CON.

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON MMI_SR_UPDATE_STOP_REQ

Start the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_start = TRUE;

Sart the speech recording task (if needed):

  l1a_l1s_com.speechreco_task.command.speech_start =

l1a_l1s_com.speechreco_task.parameters.speech;

Stop immediatly the background task:

  l1_srback_com.emergency_stop = TRUE;

1

5

MMI_SR_UPDATE_CHECK_STOP_REQ

4

Stop the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

Stop the speech recording task:

  l1a_l1s_com.speechreco_task.command.speech_stop =

l1a_l1s_com.speechreco_task.update.parameters.speech;

Reset the start update and speech commands:

  l1s_l1a_com.speechrec o_task.command.update_s tart = FALSE;

  l1s_l1a_com.speechrec o_task.command.speech_start = FALSE;

Page 99: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 99/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 99/133

Figure 55: Update-check task: L1A statemachine (2/5).

WAIT_TEMP_SAVE_DONE

1

L1_SRBACK_TEMP_SAVE_DATA_CON MMI_SR_UPDATE_STOP_REQ

Stop immediatly the background task:

l1_srback.emergency_stop = TRUE;

L1_SR_UPDATE_STOP_CON MMI_SR_UPDATE_STOP_REQ

WAIT_UPDATE_STOP

Stop the speech recognition update task:

  l1a_l1s_com.speechreco_task.command.update_stop = TRUE;

Stop the speech recording task:

  l1a_l1s_com.speechreco_task.command.speech_stop =

l1a_l1s_com.speechreco_task.update.parameters.speech;

There is an error during the acquisition?

(T_L1_SR_UPDATE_STOP_CON *)msg->error_id ! = SC_NO_ERROR?

Send the message MMI_SR_UPDATE_CHECK_STOP_CON with an error.

Reset the stop background task command:

  l1_srback_com.emergency_stop = FALSE;

Start the background task to save the model in a temporary buffer:

Send the message L1_SRBACK_TEMP_SAVE_DATA_REQ.

0

YES

NO

4

5

Reset the command: 

l1s_l1a_com.speechreco_task.command.processing_start = FALSE;

  l1s_l1a_com.speechreco_task.command.processing_stop = FALSE;

 Reset the index word counter:

  l1a_l1s_com.speechreco_task.parameters.word_index_counter 

The CTO algorithm must be used?

l1a_l1s_com.speechreco_task.parameters.vocabulary_size

<= SC_SR_MAX_WORDS_FOR_CTO?

Disable the CTO algorithm:

  l1a_l1s_com.speechreco_task.parameters .cto_algorithm = FALSE;

Enable the CTO algorithm:

  l1a_l1s_com.speechreco_task.parameters.cto_algorithm = TRUE;

Double the vocabulary size:

  l1a_l1s_com.speechreco_task.parameters.vocabulary_size<<1;

YES

NO

2

Page 100: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 100/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 100/133

Figure 56: Update-check task: L1A statemachine (3/5).

2

LOAD_MODEL

Initialize the background task stop command:  l1_srback_com.emergency_stop = FALSE;

Start to load the model to the API:

Send the message L1_SRBACK_LOAD_MODEL_REQ.

Increment the word index counter:

  l1a_l1s_com.speechreco_task.parameters.word_index_counter++;

WAIT_MODEL_LOADED

L1_SRBACK_LOAD_MODEL_CON

Start the DSP recognition processing task:

  l1a_l1s_com.speechreco_task.command.processing_start = TRUE;

Stop Immediatly the background task:

  l1_srback_com.emergency_stop = TRUE;

MMI_SR_UPDATE_CHECK_STOP_REQ

WAIT_PROCESSING_START

L1_SR_PROCESSING_START_CON MMI_SR_RECO_STOP_REQ

WAIT_PROCESSING_STOP

Stop the speech reco processing task:

  l1a_l1s_com.speechreco_task.command.processing_stop = TRUE;

L1_SR_PROCESSING_STOP_CON MMI_SR_RECO_STOP_REQ L1_SR_RECO_STOP_I

Stop the speech reco processing task:

  l1a_l1s_com.speechreco_task.command.processing_stop = TRUE;

5

34

4

The processing phase is good or not?

(T_L1_SR_PROCESSING_STOP_CON)msg->error_id = SC_NO_ERROR

Send the MMI_SR_UPDATE_CHECK_STOP_CON

message with an error.

0

NO

YES

Reset the start procssing command:

  l1a_l1s_com.speechreco_task.command.processing_start = FALSE;

Page 101: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 101/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 101/133

Figure 57: Update-check task: L1A statemachine (4/5).

The CTO algorithm is used?

l1a_l1s_com.speechreco_task.parameters.cto_algorithm?

There is no error during the recognition?

(T_L1_SR_RECO_STOP_IND*)msg->error_id = SC_NO_ERROR?

The index of the best word is odd?

(T_L1_SR_RECO_STOP_IND*)msg->best_word_index & 0x01?

Change the error id to SC_CTO_WORD:

(T_MMI_SR_RECO_STOP_CON*)msg->error_id = SC_CTO_WORD;

NO

YES

YES

YES

NO

3

Divided by 2 the 4 indexes of the best words in the message.

NO

0

Is it the good reconized word?

(T_L1_SR_RECO_STOP_IND*)msg->word_index = l1a_l1s_com.speechreco_task.parameters.word_index?

Send the MMI_SR_UPDATE_CHECK_STOP_CON message withhe no error.

NOYES

L1_SRBACK_TEMP_SAVE_DATA_CON MMI_SR_UPDATE_STOP_REQ

Stop immediatly the background task:l1_srback.emergency_stop = TRUE;

5

Reset the stop background task command:

  l1_srback_com.emergency_stop = FALSE;

Start the background task to save the model (and the speech):

Send the message L1_SRBACK_SAVE_DATA_REQ.

WAIT_SAVE_DONE

0

Send the MMI_SR_UPDATE_CHECK_STOP_CON

message with an error.

Change the error id to SC_CHECK_ERROR:

(T_L1_SR_RECO_STOP_IND*)msg->error_id = SC_CHECK_ERROR;

Page 102: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 102/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 102/133

Figure 58: Update-check task: L1A statemachine (5/5).

6.7.6 L1S state machineC.f. L1S state machine of the update task and the L1S state machine of the reco task.

4

WAIT_L1S_STOP

PROCESSING_STOP_CON L1_SR_UPDATE_STOP_CON L1_SR_RECO_STOP_  

Send the MMI_SR_UPDATE_CHECK_STOP_CON message with an

SC_CHECK_ERROR error.

0

WAIT_BACK_STOP

5

0

Send the MMI_SR_UPDATE_CHECK_STOP_CON message with an

SC_CHECK_ERROR error.

L1_SRBACK_LOAD_MODEL_CONSRBACK_SAVE_DATA_CON L1_SRBACK_TEMP_SAVE_D

Page 103: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 103/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 103/133

6.8 Speech recording task

The speech recording task is a task that runs in the same time than the acquisition phase of the enrollment,

update and update-check task. This task is started if the MMI specified in the start message that the speech

sample of the word to acquire must be recorded. So, this task doesn’t have an MMI/L1 communication, it

starts by thew L1A and stops automatically when the result of the speech recognition acquire phase isknown (i.e. status = bad or good acquisition).

 Note that the speech is recorded in a circular buffer specified by the MMI (i.e. speech_address message

 parameter).

Page 104: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 104/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 104/133

6.8.1 Process Flow

IDLE

command.speech_start = TRUE

d_tch_mode |=

~(1<<B_VOICE_MEMO_DTX)d_toneskb_init |=

B_VM_RECORD_START

WAIT_DSP_START

d_toneskb_status |=

B_VM_RECORD_ON_GOING SPEECH

.

WAIT_DSP_SAMPLE .

.

.

a_du_x[0] |= B_BLOCK_READY .

.

Save the sample in the circular working buffer 

allocated by the MMI.

.

.

.d_sr_status |=

SC_SR_WORD_SEARCHING

.

.

d_sr_status |=

SC_SR_WORD_BEGINNING

.

.

.

Calculate the start pointer of the word. .

.

d_sr_status |=B_GOOD_ACQUISITION

.

.

.

d_toneskb_init |=

B_VM_RECORD_STOP

.

.

.

WAIT_DSP_STOP .

d_toneskb_status &=

~B_VM_RECORD_ON_GOING

.

SPEECH

 parameters.start_address

 parameters.stop_address

IDLE

Figure 59: Speech recognition recording task: record speech with an automatic stop.

DSPL1SL1ASR Back.

Page 105: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 105/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 105/133

IDLE

command.speech_start = TRUE

d_tch_mode |=

~(1<<B_VOICE_MEMO_DTX)d_toneskb_init |=

B_VM_RECORD_START

WAIT_DSP_START

d_toneskb_status |=

B_VM_RECORD_ON_GOING SPEECH

.

WAIT_DSP_SAMPLE .

.

.

a_du_x[0] |= B_BLOCK_READY .

.

Save the sample in the circular working buffer 

allocated by the MMI.

.

.

.

.d_sr_status |=

SC_SR_WORD_SEARCHING

.

.

d_sr_status |=SC_SR_WORD_BEGINNING

.

.

.

Calculate the start pointer of the word. .

.

.

command.speech_stop = TRUE

d_toneskb_init |=B_VM_RECORD_STOP

.

.

WAIT_DSP_STOP .

d_toneskb_status &=~B_VM_RECORD_ON_GOING

.SPEECH

IDLE

Figure 60: Speech recognition recording task: record speech with a requested stop.

DSPL1SL1ASR Back.

Page 106: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 106/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 106/133

6.8.2 L1S state machine

Figure 61: Speech recognition: L1S state machine speech recording task (1/2).

IDLE

The MMI starts the voice recording during a speech recognition task:

l1a_l1s_com.speechreco_task.command.speech_start = TRUE;

Initialize the current pointer:

  l1s.speechreco.speech_pointer = l1a_l1s_com.speechreco_task.parameters.speech_start _pointer;

  l1s.speechreco.speech_end_pointer = (UW ORD16 *) (l1s.speechreco_task.speech_pointer + SC_SR_WORK_SPEECH_SIZE);

No DTX mode: 

d_tch_mode |=~(1<<B_VOICE_MEMO_DTX);

Start the voice memo recording DSP task:

  d_toneskb_init |= B_VM_RECORD_START;

0

WAIT_DSP_START

The DSP is started:

(d_toneskb_status & B_VM_RECORD_ON_GOING) =

TRUE

1

Page 107: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 107/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 107/133

Figure 62: Speech recognition: L1S state machine speech recording task (2/2).

Is there enough place in the RAM buffer?

l1s.speechreco.speech_pointer -1 + sizeof(a_du_x) = l1s.speechreco.speech_end_pointer?

WAIT_DSP_SAMPLE

The DSP sends a new block:

a_du_x[0] & B_BLOCK_READY = TRUE;

Download the data from the a_du_x buffer to the RAM buffer.

Clear the header of the a_du_x buffer.

Increase the pointer to the voice data RAM buffer.

Rewind the current pointer:

  l1s.speechreco.speech_pointer =l1a_l1s_com.speechreco_task.parameters.speech_star t_pointer;

Calculate the address of the start pointer and save into:

l1s.speechreco.speech_start_pointer;

The acquisition task was good:

(d_sr_status & B_GOOD_ACQUISITION)

Calculate the address of the end pointer and save into:

  l1s.speechreco.speech_stop_pointer 

Stop the DSP voice memorization recording task:  d_toneskb_init |=B_VM_RECORD_STOP;

WAIT_DSP_STOP

The DSP voice memorization recording task is stopped:(d_toneskb_status & B_VM_RECORD_ON_GOING) = FALSE;

YESNO

A beginning of the word is destected?(d_sr_status & SC_SR_WORD_MASK) = SC_SR_WORD_BEGINNING

&&

(l1s.speechreco.speech_old_status & SC_SR_WORD_MASK) = SC_SR_WORD_SEARCHING;

YES

NO

The task must be stop

(d_sr_status & B_BAD_ACQUISITION) ||

(l1a_l1s_com.speechreco_task.command.speech_stop = TRUE)

Stop the DSP voice memorization recording task:

  d_toneskb_init |=B_VM_RECORD_STOP;

0

1

Save the current status:

  l1s.speechreco.speech_old_status = d_sr_status;

Page 108: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 108/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 108/133

6.9 Speech recognition Background task

The background task is a preemptive task with the lowest priority. The aim of this task is to exchange the

model between the DSP API memory and a customer vocabulary database put in Flash. And this task has

an another role: to save the speech sample from the L1 buffer (allocated by the MMI) and a speech

recognition dabase. Note that: writing in flash is a customer dependencies therefore the background task calls some customer 

functions (c.f. included in the file l1audio_cust.c).

6.9.1 L1-Background interface

Direction Message name Type

L1A->BACK L1_SRBACK_SAVE_DATA_REQ T_SRBACK_SAVE_DATA

L1A<-BACK L1_SRBACK_SAVE_DATA_CON Trigger

L1A->BACK L1_SRBACK_TEMP_SAVE_DATA_REQ T_SRBACK_TEMP_SAVE_DATA

L1A<-BACK L1_SRBACK_TEMP_SAVE_DATA_CON Trigger

L1A->BACK L1_SRBACK_LOAD_MODEL_REQ T_SRBACK_LOAD_MODEL

L1A<-BACK L1_SRBACK_LOAD_MODEL_CON Trigger

Page 109: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 109/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 109/133

T_L1_SRBACK_SAVE_DATA message type

database_id (UWORD8)

Specifies which user database is used.

model_index (UWORD8)

Specifies the index of the model into the user database.

model_RAM_address (*UWORD16)

Specifies the RAM address where the model is.

 Note: the size of the model is included in the header of the model.

speech (BOOL)

Specifies if the speech was recorded or not.

start_buffer (*UWORD16)

Specifies the start address of the RAM circular buffer that contains the speech samples.

 Note: this address is available only if the parameter speech = TRUE.

stop_buffer (*UWORD16)

Specifies the stop address of the RAM circular buffer that contaisn the speech samples.

 Note: this address is available only if the parameter speech = TRUE.

start_address (*UWORD16)

Specifies the start address of the recorded speech into the RAM buffer.

 Note: this address is available only if the parameter speech = TRUE.

stop_address (*UWORD16)

Specifies the stop address of the recorded speech into the RAM circular buffer.

 Note: this address is available only if the parameter speech = TRUE.

Page 110: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 110/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 110/133

T_L1_SRBACK_TEMP_SAVE_DATA message type

model_RAM_address_input (*UWORD16)

Specifies the RAM address where the model is. Note: the size of the model is included in the header of the model.

model_RAM_address_output (*UWORD16)

Specifies the RAM address where the model must be temporary saved

T_L1_SRBACK_LOAD_MODEL message type

database_id (UWORD8)

Specifies which user database is used.

model_index (UWORD8)Specifies the index of the model into the user database.

model_RAM_address (*UWORD16)

Specifies the RAM address where the model must be loaded

CTO_enable (BOOL)Specifies if the CTO algorithm is used (CTO_enable = TRUE) or not (CTO_enable = FALSE).

Page 111: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 111/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 111/133

6.9.2 Process flow

The L1A wants to start

the save data SR  background task.

l1_srback_com.emergency_stop = FALSE

L1_SRBACK_SAVE_DATA_REQ

End of the background task 

requested by the L1A

L1_SRBACK_SAVE_DATA_CON

Figure 63: Background task: L1S/background task communication (without emercency stop)

The L1A wants to startthe load model SR 

 background task.

l1_srback_com.emergency_stop = FALSE

L1_SRBACK_LOAD_MODEL_REQ

The L1S wants to stopimmediatly the

 background task.l1_srback_com.emergency_stop = TRUE

When the background task is

waked up, the current task isstopped.

L1_SRBACK_LOAD_MODEL_CON

Figure 64: Background task: L1S/background task communication (with emergency stop)

SR Background task L1A

Background task L1A

Page 112: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 112/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 112/133

6.9.3 Background state machine

Figure 65: Background task: background state machine.

INACTIVE

L1_SRBACK_SAVE_DATA_REQ

Call the function to save the model:

(the arguments are filled thanks to the message parameters)

  Cust_srback _save_model(database, index, RAM_address);

Call the function to save the model in the temporary buffer:

(the arguments are filled thanks to the message parameters)

  srback_save_model_temp(RAM_addr ess_input, RAM_address_output);

L1_SRBACK_TEMP_SAVE_DATA_REQ

L1_SRBACK_LOAD_MODEL_REQ

Call the function to load a model:

(the arguments are filled thanks to the message parameters)  Cust_srback_load_model(database, index, RAM_address);

The speech must be saved?

(T_L1_SRBACK_SAVE_DATA *)msg->speech = TRUE?

YES

NO

Call the function to save the speech from the working circular buffer to the database:

(the arguments are filled thanks to the message parameters)

  Cust_srback_save_speech(database, index, start_buffer , stop_buffer, start_speech, stop_speech);

Send the trigger message: L1_SRBACK_SAVE_DATA_CON

The CTO algorithm is used?

(T_L1_SRBACK_LOAD_MODEL *)msg->CTO_enable = TRUE?

Send the trigger message: L1_SRBACK_TEMP_SAVE_DATA_CON

Call the function to apply the CTO algorithm to the loaded model:

(the arguments are filled thanks to the message parameters)

  srback_CTO_algorithm(RAM_address);

Send the trigger message: L1_SRBACK_LOAD_MODEL_CON

NO

YES

The model_index is odd?

(T_L1_SRBACK_LOAD_MODEL *)msg->model_index & 0x01 = 0x01?

YES

NO

Stop immediatly the curren task :

l1_srback_com.emergency_stop = TRUE;

Call the function to load a model:

(the arguments are filled thanks to the message parameters)  Cust_srback_load_model(database, index>>1, RAM_address);

Page 113: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 113/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 113/133

6.9.4 Called functions

Cust_srback_load_model( database, index, RAM_address)  This customer function is used to load the model from the user database (specified by the arguments

database and index) to the buffer (specified by the argument address).

Note: this function must immediately stop when an emergency stop is requested by L1

database (UWORD8)

Specifies which user database is used.

index (UWORD8)Specifies the index of the model into the user database.

RAM_address (*UWORD16)

Specifies the RAM address where the model must be loaded. Note: the size of the model is included in the header of the model.

Cust_srback_save_model( database, index, RAM_address)

  This customer function is used to save the model from the RAM buffer (specified by the argument

 RAM_address) to the user database (specified by the arguments database and index).

Note: this function must immediately stop when an emergency stop is requested by L1.

database (UWORD8)

Specifies which user database is used.

index (UWORD8)

Specifies the index of the model into the user database.

RAM_address (*UWORD16)

Specifies the RAM address where the model must be loaded.

 Note: the size of the model is included in the header of the model.

Page 114: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 114/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 114/133

srback_save_model_temp(RAM_address_input, RAM_address_ouput)

  This function is used to save the model from the API memory (specified by the argument

 RAM_address_input ) to the memory (specified by the argument RAM_address_ouput ).

Note: this function must immediately stop when an emergency stop is requested by L1S.

RAM_address_input (*UWORD16)

Specifies the RAM memory where the model is.

RAM_address_output (*UWORD16)

Specifies the address in the API memory where the model must be temporary saved.

 Note: the size of the model is included in the header of the model.

srback_CTO_algorithm(RAM_address)

  This function applies the CTO algorithm to the model saved in a RAM buffer (specified by the argument RAM_address).

Note: this function must immediately stop when an emergency stop is requested by L1S.

RAM_address (*UWORD16)

Specifies the address where the model is.

Cust_srback_save_speech( database, index, start_buffer, stop_buffer, start_speech, stop_speech)

  This customer function is used to save the speech (specified by the argument start_speech and

 stop_speech) from the circular buffer (specified by the argument  start_buffer  and stop_buffer ) to the user 

database (specified by the arguments database and index).

Note: this function must immediately stop when an emergency stop is requested by L1S.

database (UWORD8)

Specifies which user database is used.

index (UWORD8)

Specifies the index in user database of the speech.

start_buffer (*UWORD16)Specified the start address of the circular buffer that contains the speech samples.

Page 115: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 115/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 115/133

stop_buffer (*UWORD16)Specified the end address of the circular buffer that contains the speech samples.

start_speech (*UWORD16)

Specified the start address of the speech samples contained in the circular buffer.

stop_speech (*UWORD16)Specified the end address of the speech samples contained in the circular buffer.

So, we can represent the roles of the function above by the following pictures:

Figure 66: Background task: Cust_srback_save_speech function.

Circular working buffer 

Speech samplesSpeech samples

 stop_speech start_speech

 start_buffer  stop_buffer 

Database buffer 

Speech samples

Cust srback save speech

Page 116: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 116/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 116/133

7 AEC

The AEC feature is the task to enable/disable and to tune the Echo canceller included in the audio path.

7.1 MMI rulesThe MMI must respect the following rules:

•  The MMI can’t request a new AEC setting (MMI_AEC_REQ) before to receive the previous

update indication message (MMI_AEC_CON) of the last AEC setting.

•  The MMI can request an AEC setting (MMI_AEC_REQ) only in speech mode (i.e. TCH/FS,

TCH/EFS or TCH/HS).

7.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_AEC_REQ T_MMI_AEC_REQ

MMI->L1 MMI_AEC_CON Trigger

T_MMI_AEC_REQ message type

aec_control (UWORD16)

The bit field register is used to configure the echo canceller (AEC), the speech enhancement control

(SPENH) and noise suppression algorithms:

Bit number Rule

0 Not used.

1 1: enable the AEC algorithm, 0: disable the AEC algorithm.

2 1: enable the SPENH algorithm, 0: disable the SPENH algorithm.

3-4 Set the additional echo suppression level: 00 0 dB01 6 dB

10 12 dB

11 18 dB

5-6 Set the noise suppression level limitation: 00 none

01 -6 dB

10 -12 dB

11 -18 dB

7 1: Reset the AEC algorithm, 0: no action.

8 1: Reset the SPENH algorithm, 0: no action.

9 1: AEC short echocanceller, 0: AEC long echo canceller.

Page 117: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 117/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 117/133

7.3 L1A-L1S message interface

Direction Message name Type

L1A<-L1S L1_AEC_CON Trigger

7.4 Process flow

RESET

WAIT_AEC_REQ

MMI_AEC_REQ

IDLE

aec_task.command.start = TRUE

WAIT_AEC_IND

d_aec_ctrl = aec_control & 0x01

WAIT_DSP_CONFIRM

d_aec_ctrl = ~(0x01)

aec_task.command.start = FALSE

L1_AEC_CON

MMI_AEC_CON

RESET IDLE

Figure 67: AEC

MMI DSPL1SL1A

Page 118: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 118/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 118/133

7.5 L1A state machine

Figure 68: AEC L1A state machine

MMI_AEC_REQ

WAIT_AEC_REQ

0

RESET

Reset the command:

  l1s_l1a_com.aec_task .command.start = FALSE;

0

Load the message parameter into the l1a_l1s_com memory.

Start the aec task:

  l1s_l1a_com.aec_task.command.start = TRUE;

L1_AEC_CON

Send the MMI_AEC_CON message.

 

WAIT_AEC_IND

Page 119: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 119/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 119/133

7.6 L1S state machine

Figure 69: AEC L1S state machine

The DSP acknowledges the new

settings:

(d_eac_ctrl & B_AEC_ACK) = 0

0

INACTIVE

0

WAIT_DSP_CONFIRM

The MMI resquests a new AEC setting:

l1a_l1s_com.aec_task.command.start = TRUE;

Set the d_aec_ctrl resgister:

  d_eac _ctrl = (l1a_l1s_com.aec_task .parameters.aec_control & 0x01);

Reset the start command:

  l1a_l1s_com.aec_task.command.start = FALSE;

Send the L1_AEC_IND(TRUE) message.

 

Page 120: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 120/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 120/133

8 FIR configuration

8.1 MMI rules

The MMI must respect the following rules:

•  The MMI can’t request a new FIR configuration (MMI_FIR_CFG_REQ) before to receive

the previous confirmation message (MMI_FIR_CFG_CON) of the last configuration.

•  The MMI can configure the audio in all modes.

Note:

We can say that, for instance, the DSP/L1 communication for the FIR isn’t really robust. Indeed, the FIR 

coefficient puts in the API are used directly by the DSP. So, when the MCU change the coefficient, in the

same time the DSP used it. So, during a frame, the FIR isn’t really correct.

Page 121: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 121/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 121/133

8.2 MMI-L1 interface

Direction Message name Type

MMI->L1 MMI_AUDIO_FIR_REQ T_MMI_FIR_CFG

MMI->L1 MMI_AUDIO_FIR_CON Trigger.

T_MMI_CFG message type

fir_loop (BOOL)

This flag indicates if the internal audio loop with the FIR filter must be closed.

0 No loop.

1 Samples from the microphone are looped back to the loudspeaker.

This loop can be used to determine the FIR coefficients.

update_fir (UWORD8)

Indicates which FIR must be updated

Value Name Indication

1 DL_FIR DL FIR must be updated.

2 UL_FIR UL FIR must be updated.

3 UL_DL_FIR UL&DL FIR must be updated.

fir_ul_coefficient (*UWORD16)

Pointer to the 31 coefficients of the uplink path FIR.

The format of each coefficient is F2.14. Moreover the coefficients are signed, the MSB indicates the signed

(1:-, 0:+).

For example: 0,5 = 0x0200, 1 = 0x4000 and –1=0xc000.

fir_dl_coefficient (*UWORD16)

Pointer to the 31 coefficients of the downlink path FIR.

The format of each coefficient is F2.14. Moreover the coefficients are signed, the MSB indicates the signed

(1:-, 0:+).

For example: 0,5 = 0x0200, 1 = 0x4000 and –1=0xc000.

8.3 MMI-L1 interface

Direction Message name Type

L1A<-L1S L1_AUDIO_FIR_CON Trigger.

Page 122: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 122/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 122/133

8.4 Process flow

RESET IDLE

WAIT_FIR_CFG_REQ

MMI_FIR_CFG_REQ

fir_task.command.start = TRUESet d_audio_init

WAIT_FIR_CFG_CONFIRM

L1_FIR_CON

fir_task.command.start = FALSE

MMI_FIR_CFG_IND

RESET IDLE

Figure 70: FIR process flow.

MMI DSPL1SL1A

Page 123: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 123/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 123/133

8.5 L1A state machine

Figure 71: FIR L1A state machine.

MMI_FIR_CFG_REQ

WAIT_FIR_CFG_REQ

0

RESET

Reset the command:

  l1s_l1a_com.fir_ task.command.star t = FALSE;

0

Load the message parameter into the l1a_l1s_com memory.

Start the aec task:

  l1s_l1a_com.fir_task.command.start = TRUE;

L1_AEC_CFG_IND

Send the MMI_FIR_CFG_INDmessage.

 

WAIT_FIR_CFG_CON

Page 124: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 124/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 124/133

8.6 L1S state machine

Figure 72: FIR L1S state machine.

0

INACTIVE

0

The MMI resquests a new FIR configuration:

l1a_l1s_com.fir_task.command.start = TRUE;

Download the DL FIR coefficients to the memory a_fir31_downlink.

Update a DL FIR?

(l1a_l1s_com.fir_task.paramters.update_fir & DL_FIR) = TRUE;

Update a UL FIR?

(l1a_l1s_com.fir_task.paramters.update_fir & UL_FIR) = TRUE?

Download the DL FIR coefficients to the memory a_fir31_uplink.

Set the FIR loop back:

  d_audio_init |=l1a_l1s_com.fir_task.parameters.fir_loop << B_FIR_LOOP;

Send the L1_FIR_CON message.

Reset the command:

  l1s_l1a_com.fir_task.command.star t = FALSE;

Enable the FIR filters:

  d_audio_init |= 0x01;

YES

YES

Enable the FIR filters:

  d_audio_init |= 0x01;

NO

NO

FOR DSP CODE <33 ONLY

Page 125: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 125/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 125/133

9 Audio gain functions

This two following functions are used to add a software gain in the downling or uplink audio path. The

driver can be call directly by the MMI at any time.

The software gain will be us, in the future for the speech dynamic compressor module.

9.1 audio_gain_dl

This function is used to add a software gain on the audio downlink path. Its prototype is:

VOID audio_gain_dl( UWORD16 gain )

The gain added is equal to (gain+1) * 6 dB.

This function can be called by the MMI at anytime.

call audio_gain_dl(gain)d_audio_gain_dl = gain

Figure 73: audio_gain_dl process.

9.2 audio_gain_ul

This function is used to add a software gain on the audio uplink path. Its prototype is:

VOID audio_gain_ul( UWORD16 gain )

The gain added is equal to (gain+1) * 6 dB.

This function can be called by the MMI at anytime.

call audio_gain_ul(gain)

d_audio_gain_ul = gain

Figure 74: audio_gain_ul process.

MMI DSP

MMI DSP

Page 126: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 126/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 126/133

10 Vocoder mute functions

These two following functions are use to mute/unmute the uplink or the downlink vocoder during the

dedicated mode. The MMI can call directly these drivers at any time.

10.1 vocoder_mute_dl

This function is used to mute the DSP downlink vocoder. Its prototype is:

VOID vocoder_mute_dl( BOOL mute )

If mute equals TRUE, the downlink vocoder is muted and if mute equals FALSE the downlink vocoder is

unmuted.

This function can be called by the MMI at anytime.

call vocoder_mute_dl(mute)(d_tch_mode & 0xbfff) | mute

Figure 75: vocoder_mute_dl process.

10.2 vocoder_mute_ul

This function is used to mute the DSP uplink vocoder. Its prototype is:

VOID vocoder_mute_ul( BOOL mute )

If mute equals TRUE, the uplink vocoder is muted and if mute equals FALSE the uplink vocoder is

unmuted.This function can be called by the MMI at anytime.

call vocoder_mute_dl(mute)

(d_tch_mode & 0x7fff) | mute

Figure 76: vocoder_mute_ul process.

MMI DSP

MMI DSP

Page 127: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 127/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 127/133

11 Structure of the layer 1

This chapter sums up the L1 files structure and the general structure of the L1A and L1S.

11.1 Files structure

Folder Files Content

audio_cfile l1audio_async.c L1A audio task processes (c.f. section L1A structure).

audio_cfile l1audio_sync.c L1S audio task managers (c.f. section L1S structure).

audio_cfile l1audio_init.c Functions related to the audio task initialization (no customer 

dependent, c.f. section initialization structure).

audio_cfile l1audio_afunc.c Functions used by the L1A audio processes.

audio_cfile l1audio_func.c Functions used by the L1S audio managers.

audio_cfile l1audio_srback.c Speech recognition background task.

audio_cfile l1audio_drive.c Audio drivers.

audio_include l1audio_const.h Contants used by the audio functions.

audio_include l1audio_defty.h Type definition of the audio task structuresaudio_include l1audio_msgty.h Type definition of the audio task messages.

audio_include l1audio_varex.h Global audio task variables.

audio_include l1audio_ver.h Audio task history.

audio_include l1audio_macro.h Audio macro.

audio_cust0 l1audio_cust.c Functions related to the customer initialization (c.f. initialization

structure).

Function related to the customer background task.

audio_cust0 l1audio_cust.h Customer initialization settings and customer constant informations.

audio_back l1audio_back.c Functions related to the audio background task 

audio_back l1audio_back.h Audio background task settings.

Page 128: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 128/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 128/133

11.2 Initialisation structure

Below, the initialization function structure (the audio functions are highlighted in red color):

•  Initialization of the software structure:

 Application_Initialize() (cint\nu_main.c)  Reset and initialize the L1:

l1_initialize() (cfile\l1_init.c)

  Initialize the DSP:

l1_dsp_init() (cfile\l1_init.c)

  Initialize the DSP/MCU audio interface:

l1audio_dsp_init() (l1audio_cfile\l1audio_init.c)  Initialize the l1a, l1s, l1a_l1s_com structure:

l1_initialize_var() (cfile\l1_init.c)

  Initialize the audio part of l1a,l1s, l1a_l1s_com, l1_srback_com structure:

l1audio_initialize_var() (l1audio_cfile\l1audio_init.c)

Page 129: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 129/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 129/133

11.3 L1A structure

Below, the L1A structure included the audio functions.

 Note that all process are called by the function l1a_task() (cfile\l1_async.c).

Figure 77: L1A audio functions.

The L1A receives a message.

Keybeep process:

l1a_mmi_keybeep_process(msg) ; (l1audio_cfile\l1_async.c)

Tones process:

  l1a_mmi_tones_process(msg);(l1audio_cfile\l1_async.c)

melody 0 process:

l1a_mmi_melody0_process(msg); (l1audio_cfile\l1_async.c)

melody 1 process:

  l1a_mmi_melody1_process(msg); (l1audio_cfile\l1_async.c)

VM playing process:

  l1a_mmi_vm_playing_process(msg) ; (l1audio_cfile\l1_async.c)

VM recording process:

  l1a_mmi_vm_recording_process(msg); (l1audio_cfile\l1_async.c)

SR enroll process:

  l1a_mmi_sr_enroll_process(msg); (l1audio_cfile\l1_async.c)

SR update process:

  l1a_mmi_sr_update_process(msg) ; (l1audio_cfile\l1_async.c)

SR reco process:  l1a_mmi_sr_reco_process(msg); (l1audio_cfile\l1_async.c)

SR update-check process:

  l1a_mmi_sr_update_check_process(msg) ; (l1audio_cfile\l1_async.c)

FIR configuration process:

  l1a_mmi_fir_cfg_process(msg) ; (l1audio_cfile\l1_async.c)

AEC process:

  l1a_mmi_aec_process(msg) ; (l1audio_cfile\l1_async.c)

INACTIVE

All GSM and GPRS processes are called before the audio process.

Page 130: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 130/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 130/133

11.4 L1S structure

Below, the L1S function structure (the audio functions are highlighted in red color):

•  L1S main function:

l1s_synch() (cfile\l1_sync.c)  Dedicated call manager:

l1s_dedicated_mode_manager() (cfile\l1_sync.c)

  Transfer mode manager (GPRS only):

l1ps_transfer_mode_manager() (p_cfile\l1p_sync.c)

  Task scheduler:

l1s_task_scheduler_process() (cfile\l1_sync.c)

  Execute frame:

l1s_execute_frame() (cfile\l1_sync.c)

  Packet measurement manager (GPRS only):

l1ps_transfer_meas_manager() (p_cfile\l1p_sync.c)

  Measurement manager:

l1s_meas_manager() (cfile\l1_sync.c)

  ADC manager:

l1s_adc_manager() (cfile\l1_sync.c)

  Audio manager:

l1s_audio_manager() (l1audio_cfile\l1audio_sync.c)

  End manager:

l1s_end_manager() (cfile\l1_sync.c)

Page 131: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 131/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 131/133

11.5 L1S audio manager The flowchart below describe the structure of the L1S audio manager (function: l1s_audio_manger()):

Figure 78: L1S audio manager (1/2).

Keybeep l1s manager:

  l1s_keybeep_manager() ; (l1audio_cfile\l1audio_sync.c)

l1s_audio_manager 

L1A activates the keybeep?

(l1a_l1s_com.keybeep_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_KEYBEEP_STATE] ! =0)?

YES

L1A activates the tone?

(l1a_l1s_com.tone_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_TONE_STATE] ! =0)?

Tone l1s manager:

  l1s_tone_manager(); (l1audio_cfile\l1audio_sync.c)YES

NO

L1A activates the melody 0?

(l1a_l1s_com.melody0_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_MELODY0_STATE] !=0)?

Melody 0 l1s manager:

  l1s_melody0_manager(); (l1audio_cfile\l1audio_sync.c)YES

NO

Melody 1 l1s manager:

l1s_melody1_manager(); (l1audio_cfile\l1audio_sync.c)

L1A activates the melody 1?

(l1a_l1s_com.melody1_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_MELODY1_STATE] !=0)?

YES

L1A activates the VM playing?

(l1a_l1s_com.voicememo_task.play.command.start = TRUE) ||

 (l1s.audio_state[L1S_VM_PLAY_STATE] ! =0)?

VM playing l1s manager:

l1s_vm_play_manager(); (l1audio_cfile\l1audio_sync.c)YES

NO

L1A activates the VM recording?

(l1a_l1s_com.voicememo_task.record.command.start = TRUE) || (l1s.audio_state[L1S_VM_RECORD_STATE] ! =0)?

VM recording l1s manager:

l1s_vm_record_manager(); (l1audio_cfile\l1audio_sync.c)YES

NO

NO

Tone uplink l1s manager:

l1s_tone_ul_manager(); (l1audio_cfile\l1audio_sync.c)

L1A activates the tone uplink?

(l1a_l1s_com.voicememo_task.record.tone_ul.command.start = TRUE) ||

 (l1s.audio_state[L1S_TONE_UL_STATE] !=0)?

YES

L1A activates the SR enroll?

(l1a_l1s_com.speechreco_task.command.enroll_start = TRUE) ||

 (l1s.audio_state[L1S_SR_ENROLL_STATE] !=0)?

SR enroll l1s manager:

l1s_sr_enroll_manager(); (l1audio_cfile\l1audio_sync.c)YES

NO

NO

0

NO

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

Initialize the IT com. flag:

  l1s.l1_audio_it_com = FALSE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

Page 132: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 132/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

PRELIMINARY documents contain

information on a product under development

and is issued for evaluation purposes only.

Features characteristic data and other 

information are subject to change.

UNDER NON DISCLOSURE

AGREEMENT

DO NOT COPY

PAGE: 132/133

Figure 79: L1S audio manager (2/2).

sr update l1s manager:

l1s_sr_update_manager(); (l1audio_cfile\l1audio_sunc.c)

L1A activates the SR update?

(l1a_l1s_com.speechreco_task.command.update_start = TRUE) ||

 (l1s.audio_state[L1S_SR_UPDATE_STATE] ! =0)?

YES

L1A activates the SR reco?

(l1a_l1s_com.speechreco_task.command.reco_start = TRUE) ||

 (l1s.audio_state[L1S_SR_RECO_STATE] !=0)?

SR reco l1s manager:

l1s_sr_reco_manager(); (l1audio_cfile\l1audio_sunc.c)YES

NO

L1A activates the SR processing?

(l1a_l1s_com.speechreco_task.command.processing_start = TRUE) ||

 (l1s.audio_state[L1S_SR_PROCESSING_STATE] ! =0)?

SR processingcheck l1s manager:

l1s_sr_processing_check_manager(); (l1audio_cfile\l1audio_sunc.c)YES

NO

SR speech l1s manager:

l1s_sr_speech_record_manager(); (l1audio_cfile\l1audio_sunc.c)

L1A activates the SR speech recording?

(l1a_l1s_com.speechreco_task.command.speech_start = TRUE) ||

 (l1s.audio_state[L1S_SR_SPEECH_STATE] ! =0)?

YES

L1A activates the AEC?

(l1a_l1s_com.aec_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_AEC_STATE] ! =0)?

AEC l1s manager:

l1s_aec_manager(); (l1audio_cfile\l1audio_sunc.c)YES

NO

L1A activates the FIR configuration?

(l1a_l1s_com.fir_task.command.start = TRUE) ||

 (l1s.audio_state[L1S_SR_FIR_STATE] !=0)?

FIR l1s manager:

l1s_fir_manager();   (l1audio_cfile\l1audio_sunc.c)YES

NO

NO

4

One of audio tasks is started?

l1s.l1_audio_it_com = TRUE?

The L1S needs to be activated the next TDMA frame:

  l1a_l1s_com.time_to_next_l1s_task = 0;

NO

YES

NO

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

end

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

The IT com. need to be generated:

  l1s.l1_audio_it_com = TRUE;

Page 133: S916_1.0

8/14/2019 S916_1.0

http://slidepdf.com/reader/full/s91610 133/133

REF: S916 MCU-Layer 1 audio features Ver 1.0

11.6 L1S end manager 

The L1S end manager contains the interrupt communication manager described below:

Figure 80: L1S end manager (It. com. management).

One audio task is enabled or the DSP requests an IT com:

(l1s.l1_audio_it_com = TRUE ||

d_toneskb_status & B_IT_COM_REQ)

DSP control for a GSM and MISC task:

  l1ddsp_end_scenario(GSM_MISC_CTL);

The L1S must be activate each TDMA:

  time_to_next_l1s_task = 0;

DSP control for a GSM task:

  l1ddsp_end_scenario(GSM_CTL);

DSP control for a MISC task:  l1ddsp_end_scenario(MISC_CTL);

The L1S must be activate each TDMA:

  time_to_next_l1s_task = 0;

One audio task is enabled or the DSP requests an IT com:

(l1s.l1_audio_it_com = TRUE ||

d_toneskb_status & B_IT_COM_REQ)

YES

YES

NO

NO

l1s_end_manager 

end

The DSP performs a GSM task in the next TDMA?

l1s.dsp_ctrl_reg != NO_CTRL?YES