Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bcefghj/noteking-pro
/ functions
Functions
260 in github.com/bcefghj/noteking-pro
⨍
Functions
260
◇
Types & classes
66
↳
Endpoints
20
↓ 150 callers
Method
get
(self, url: str, template: str = "")
core/cache.py:25
↓ 23 callers
Function
_truncate_transcript
(text: str, max_chars: int = 60000)
core/templates/base.py:83
↓ 14 callers
Method
load
(cls, path: Path | None = None)
core/config.py:96
↓ 12 callers
Method
is_available
(cls, config: AppConfig)
core/transcriber.py:33
↓ 11 callers
Function
_progress
(step: str, pct: float)
core/__init__.py:261
↓ 9 callers
Function
_sse_event
(stage: str, **kwargs)
api/routes/video.py:49
↓ 9 callers
Function
_tex_escape
(text: str)
core/pdf_engine.py:979
↓ 6 callers
Function
_base_cmd
(config: AppConfig)
core/downloader.py:45
↓ 6 callers
Function
chat
Send a chat completion request and return the text response.
core/llm.py:29
↓ 5 callers
Function
_load_config
Load config from environment variables (called on each request).
api/routes/video.py:26
↓ 5 callers
Function
_progress
(step: str, pct: float)
core/preprocessor.py:320
↓ 5 callers
Function
callAPI
(endpoint: string, body: Record<string, any>)
mcp/src/index.ts:37
↓ 5 callers
Function
get_duration
Get media file duration in seconds using ffprobe.
core/preprocessor.py:48
↓ 4 callers
Function
_extract_frame_at
(video_path: Path, timestamp: float, output: Path)
core/frames.py:209
↓ 4 callers
Function
callCore
(args: string[])
mcp/src/index.ts:20
↓ 4 callers
Method
generate
(self, ctx: TemplateContext)
core/templates/base.py:74
↓ 4 callers
Function
parse_link
Parse a URL or local file path into a structured ParsedLink.
core/parser.py:77
↓ 4 callers
Method
save
(self, path: Path | None = None)
core/config.py:90
↓ 3 callers
Function
_get_duration
(video_path: Path)
core/frames.py:223
↓ 3 callers
Method
_path
(self, url: str, template: str = "")
core/cache.py:22
↓ 3 callers
Function
_sse_event
(stage: str, **kwargs)
api/routes/recording.py:37
↓ 3 callers
Function
detect_language
Detect the primary language of an audio file. Strategy: 1. Try faster-whisper's language detection (fast, ~1 second) 2. Fall back to defa
core/transcriber.py:278
↓ 3 callers
Function
extract_subtitles
Three-level subtitle extraction fallback. Priority 1: Platform CC subtitles (API or yt-dlp) Priority 2: ASR speech-to-text (only if skip_asr=
core/subtitle.py:195
↓ 3 callers
Function
get_template
(name: str, **kwargs)
core/templates/__init__.py:67
↓ 3 callers
Method
html_to_pdf
(html_path: Path, pdf_path: Path)
core/pdf_engine.py:403
↓ 3 callers
Function
loadHistory
()
web/src/app/page.tsx:68
↓ 3 callers
Function
process_recording
Process local recording/video files into structured notes. This is the main entry point for the recording processing pipeline: 1. Preprocess:
core/__init__.py:209
↓ 3 callers
Method
set
(self, url: str, template: str, data: dict[str, Any])
core/cache.py:34
↓ 3 callers
Function
summarize
Main entry point: convert a video/blog URL into notes. Args: url: Video URL or local file path template: Output template name (se
core/__init__.py:31
↓ 3 callers
Function
transcribe
Transcribe audio using the best available ASR engine. If language is None, auto-detects the language first.
core/transcriber.py:360
↓ 3 callers
Method
transcribe
(self, audio_path: Path, language: str = "zh")
core/transcriber.py:29
↓ 2 callers
Function
_apply_overrides
(config, api_key, base_url, model, proxy)
cli/__main__.py:389
↓ 2 callers
Function
_build_client
(config: AppConfig)
core/llm.py:8
↓ 2 callers
Function
_diarize_simple
Simple fallback: assign all segments to Speaker 1. Provides structural compatibility without actual speaker separation.
core/diarizer.py:174
↓ 2 callers
Function
_format_ts
(seconds: float)
core/diarizer.py:68
↓ 2 callers
Function
_load_config
()
api/routes/recording.py:24
↓ 2 callers
Function
_process_single
Process a single video.
core/__init__.py:74
↓ 2 callers
Function
_safe
(text: str, max_len: int = 40)
core/pdf_engine.py:975
↓ 2 callers
Function
_seconds_to_ts
(seconds: float)
core/subtitle.py:65
↓ 2 callers
Function
_srt_ts
(seconds: float)
core/formatter.py:160
↓ 2 callers
Function
_try_asr
Fall back to ASR transcription.
core/subtitle.py:179
↓ 2 callers
Function
_try_deepfilternet
Try DeepFilterNet for heavy noise reduction.
core/preprocessor.py:236
↓ 2 callers
Function
_ts_to_seconds
(ts: str)
core/subtitle.py:109
↓ 2 callers
Function
_vtt_ts
(seconds: float)
core/formatter.py:168
↓ 2 callers
Method
build_html
( self, notes_md: str, frames: list[ScoredFrame], title: str, meta: di
core/pdf_engine.py:332
↓ 2 callers
Method
build_prompt
Build the LLM prompt for this template.
core/templates/base.py:57
↓ 2 callers
Function
denoise_audio
Apply noise reduction to audio. Args: audio_path: Input WAV file path output_path: Output path (defaults to overwriting input)
core/preprocessor.py:179
↓ 2 callers
Function
detect_media_type
Detect whether a file is video, audio, or unsupported.
core/preprocessor.py:38
↓ 2 callers
Method
extract
(self, video_path: Path, output_dir: Path)
core/pdf_engine.py:91
↓ 2 callers
Function
extract_audio
Extract audio from video or convert audio to ASR-friendly WAV format.
core/preprocessor.py:65
↓ 2 callers
Function
get_video_info
Fetch metadata without downloading.
core/downloader.py:73
↓ 2 callers
Function
html_to_pdf
(html_path, pdf_path)
demos/run_minimind.py:231
↓ 2 callers
Function
is_batch
(parsed: ParsedLink)
core/parser.py:155
↓ 2 callers
Function
merge_files
Merge multiple media files into one using FFmpeg concat. Returns the merged file path and segment metadata for timestamp correction.
core/preprocessor.py:90
↓ 2 callers
Method
post_process
Optional post-processing of LLM output.
core/templates/base.py:70
↓ 2 callers
Function
preprocess
Full preprocessing pipeline: validate -> merge -> extract audio -> denoise. Args: input_files: List of file paths (video or audio)
core/preprocessor.py:302
↓ 2 callers
Method
save_srt
(self, path: Path)
core/subtitle.py:58
↓ 2 callers
Method
save_txt
(self, path: Path)
core/subtitle.py:61
↓ 2 callers
Function
sec_to_srt
(t)
run_demo.py:91
↓ 2 callers
Method
system_prompt
(self, ctx: TemplateContext)
core/templates/base.py:61
↓ 1 callers
Function
_align_transcript_with_speakers
Align ASR transcript segments with speaker diarization turns. For each transcript segment, find the speaker turn with maximum temporal overla
core/diarizer.py:199
↓ 1 callers
Function
_build_transcript_for_llm
Build a rich transcript string for LLM consumption.
core/__init__.py:384
↓ 1 callers
Method
_call_llm
(self, prompt: str, retries: int = 3)
core/pdf_engine.py:891
↓ 1 callers
Function
_create_engine
Create the best available ASR engine based on config and language.
core/transcriber.py:318
↓ 1 callers
Function
_dedup_by_hash
Remove near-duplicate frames using perceptual hashing.
core/frames.py:184
↓ 1 callers
Method
_dedup_by_hash
Remove near-duplicate frames using perceptual hashing.
core/pdf_engine.py:212
↓ 1 callers
Method
_default_template
()
core/pdf_engine.py:624
↓ 1 callers
Function
_denoise_ffmpeg_fallback
FFmpeg-based noise reduction as fallback.
core/preprocessor.py:250
↓ 1 callers
Function
_derive_title
Derive a title from filenames or user context.
core/__init__.py:374
↓ 1 callers
Function
_detect_bilibili_multipart
Check if a bilibili URL has ?p= indicating multi-part video.
core/parser.py:70
↓ 1 callers
Function
_diarize_pyannote
Diarize using pyannote-audio 3.x pipeline.
core/diarizer.py:108
↓ 1 callers
Method
_download_video
(self, url: str, output: Path)
core/pdf_engine.py:833
↓ 1 callers
Method
_enforce_interval
Ensure minimum time gap between selected frames.
core/pdf_engine.py:243
↓ 1 callers
Method
_extract_candidates
( self, video_path: Path, output_dir: Path, duration: float )
core/pdf_engine.py:114
↓ 1 callers
Function
_extract_with_scenedetect
( video_path: Path, output_dir: Path, max_frames: int, threshold: float, )
core/frames.py:87
↓ 1 callers
Function
_fill_uniform
Add uniformly sampled frames to fill gaps.
core/frames.py:122
↓ 1 callers
Method
_generate_notes
( self, ep_num: int, title: str, duration: float, subtitle_text: str,
core/pdf_engine.py:842
↓ 1 callers
Function
_get_hf_token
Get HuggingFace token from environment.
core/diarizer.py:258
↓ 1 callers
Method
_get_model
(self)
core/transcriber.py:124
↓ 1 callers
Method
_get_model
(self)
core/transcriber.py:164
↓ 1 callers
Method
_get_pipeline
(self)
core/transcriber.py:50
↓ 1 callers
Function
_guess_platform
(url: str)
core/parser.py:132
↓ 1 callers
Method
_key
(self, url: str, template: str = "")
core/cache.py:18
↓ 1 callers
Function
_load_wav
Load WAV file as numpy array.
core/preprocessor.py:272
↓ 1 callers
Method
_md_to_tex
Convert simplified markdown with {IMAGE:N} to LaTeX body.
core/pdf_engine.py:476
↓ 1 callers
Function
_merge_adjacent_speakers
Merge adjacent segments from the same speaker to reduce fragmentation.
core/diarizer.py:232
↓ 1 callers
Function
_merge_concat_demuxer
Fast merge using FFmpeg concat demuxer (same format, no re-encoding).
core/preprocessor.py:122
↓ 1 callers
Function
_merge_concat_filter
Flexible merge using FFmpeg concat filter (handles different formats).
core/preprocessor.py:149
↓ 1 callers
Method
_merge_html
Merge all episodes into one big HTML document.
core/pdf_engine.py:922
↓ 1 callers
Function
_print_recording_result
(result)
cli/__main__.py:413
↓ 1 callers
Function
_print_result
(result)
cli/__main__.py:405
↓ 1 callers
Function
_process_batch
Process a batch (playlist/collection).
core/__init__.py:143
↓ 1 callers
Function
_safe_filename
(text: str, max_len: int = 80)
core/formatter.py:154
↓ 1 callers
Function
_safe_title
(text: str)
core/__init__.py:402
↓ 1 callers
Function
_save_wav
Save numpy array as WAV file.
core/preprocessor.py:288
↓ 1 callers
Method
_score_frames
Score each frame based on visual information density.
core/pdf_engine.py:167
↓ 1 callers
Function
_score_info_density
Score frames by visual information density (edges, contrast, entropy).
core/frames.py:144
↓ 1 callers
Function
_slug
(text: str)
core/batch.py:125
↓ 1 callers
Function
_try_youtube_transcript_api
Try youtube-transcript-api for YouTube videos.
core/subtitle.py:117
↓ 1 callers
Function
_try_ytdlp_subtitles
Try yt-dlp subtitle download with timeout.
core/subtitle.py:152
next →
1–100 of 260, ranked by callers