API Reference
easytranscribe.speech_to_text.capture_and_transcribe(model_name='turbo', verbose=False)
Captures audio from microphone and transcribes to text using Whisper. Waits for user to start speaking, then stops after 3 seconds of silence.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
Whisper model to use for transcription |
'turbo'
|
verbose
|
bool
|
If True, shows detailed recording and processing information |
False
|
Source code in easytranscribe/speech_to_text.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 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 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
easytranscribe.speech_to_text.transcribe_audio_file(filepath, model_name='turbo', verbose=False)
Transcribes an audio file to text using Whisper.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filepath
|
str
|
Path to the audio file |
required |
model_name
|
str
|
Whisper model to use for transcription |
'turbo'
|
verbose
|
bool
|
If True, shows detailed processing information |
False
|
Returns:
Type | Description |
---|---|
str
|
Transcribed text from the audio file |
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If the audio file doesn't exist |
Exception
|
If transcription fails |
Source code in easytranscribe/speech_to_text.py
easytranscribe.view_logs.view_logs(date=None, tail=None, stats=False)
View transcription logs with various options.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
date
|
Optional[str]
|
Date in YYYY-MM-DD format, or 'today' for today's logs |
None
|
tail
|
Optional[int]
|
Show last N entries |
None
|
stats
|
bool
|
Show statistics summary |
False
|
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dictionary containing log data and statistics |
Source code in easytranscribe/view_logs.py
easytranscribe.view_logs.get_available_log_dates()
Get list of available log dates.
Returns:
Type | Description |
---|---|
List[str]
|
List of date strings in YYYY-MM-DD format |
Source code in easytranscribe/view_logs.py
CLI Module
easytranscribe.cli.main()
Main CLI entry point.
Source code in easytranscribe/cli.py
19 20 21 22 23 24 25 26 27 28 29 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 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
Logging Module
easytranscribe.transcription_logger.log_transcription(model_name, transcribed_text, audio_duration=None, processing_time=None, audio_file=None)
Logs transcription details to a log file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_name
|
str
|
Name of the Whisper model used |
required |
transcribed_text
|
str
|
The transcribed text |
required |
audio_duration
|
Optional[float]
|
Duration of audio in seconds (for live recording) |
None
|
processing_time
|
Optional[float]
|
Time taken for processing in seconds |
None
|
audio_file
|
Optional[str]
|
Path to audio file (for file transcription) |
None
|