Recording session
A recording session: capture to disk, optionally with a live draft transcript.
RecordingSession
¶
Records to a new vault entry, optionally with a live draft transcript.
Source code in src/murmurvault/session.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
__init__(vault, cfg, *, title='', folder='', tags=None, mic=True, system=True, live=False, on_segment=None)
¶
Create the recording entry and set up capture; nothing is recorded until :meth:start.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vault
|
Vault
|
The vault. |
required |
cfg
|
dict
|
The configuration. |
required |
title
|
str
|
Recording title. |
''
|
folder
|
str
|
Destination folder. |
''
|
tags
|
list[str] | None
|
Tags to apply. |
None
|
mic
|
bool
|
Record the microphone. |
True
|
system
|
bool
|
Record the computer's audio output. |
True
|
live
|
bool
|
Transcribe a draft while recording. |
False
|
on_segment
|
Callable[[Segment], None] | None
|
Called with each live segment. |
None
|
Source code in src/murmurvault/session.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
elapsed()
¶
Seconds since recording started.
Returns:
| Type | Description |
|---|---|
float
|
Elapsed time. |
Source code in src/murmurvault/session.py
87 88 89 90 91 92 93 | |
start()
¶
Start recording; on failure the empty recording entry is removed.
Source code in src/murmurvault/session.py
77 78 79 80 81 82 83 84 85 | |
stop()
¶
Stop recording, save the tracks and the live draft, and index the draft.
Returns:
| Type | Description |
|---|---|
Recording
|
The saved recording. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If no audio was captured; the empty entry is removed. |
Source code in src/murmurvault/session.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | |
live_engine(cfg)
¶
Build the engine for the live draft pass.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cfg
|
dict
|
The configuration. |
required |
Returns:
| Type | Description |
|---|---|
Engine
|
The engine named by |
Source code in src/murmurvault/session.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |