feat: compression
Build / build-amd64 (release) Successful in 44s
Build / build-arm64 (release) Successful in 56s

This commit is contained in:
intelligence committed 2026-08-14 14:10:41 +02:00
1 parent 37fbe5d787
commit b161f81913
2 files changed
+7 -4

No files matched your search

+2 -1
View File
@@ -36,7 +36,8 @@ transui # same as record
Bind `transui record` to a shortcut in your desktop environment. Transui does
not register a global shortcut itself. Press the same shortcut again to stop
and transcribe the current recording.
and transcribe the current recording. Audio is recorded as 16 kHz mono MP3 at
32 kbps to keep uploads small.
The **Hosted first, local fallback** setting tries the Hosted endpoint, then
the Local endpoint when the first request fails. With it disabled, Transui uses
+5 -3
View File
@@ -330,8 +330,8 @@ bool transcription_request(const std::string& url, const std::string& key,
part = curl_mime_addpart(mime);
curl_mime_name(part, "file");
curl_mime_filedata(part, path.c_str());
curl_mime_filename(part, "recording.wav");
curl_mime_type(part, "audio/wav");
curl_mime_filename(part, "recording.mp3");
curl_mime_type(part, "audio/mpeg");
if (!prompt.empty()) {
part = curl_mime_addpart(mime);
curl_mime_name(part, "prompt");
@@ -568,7 +568,9 @@ void start_recording(App* app) {
app->recording_path = template_path;
g_free(template_path);
gchar* pipeline_text = g_strdup_printf(
"autoaudiosrc ! audioconvert ! audioresample ! wavenc ! filesink location=\"%s\"",
"autoaudiosrc ! audioconvert ! audioresample ! "
"audio/x-raw,format=S16LE,rate=16000,channels=1 ! "
"lamemp3enc target=bitrate bitrate=32 cbr=true ! filesink location=\"%s\"",
app->recording_path.c_str());
GError* error = nullptr;
app->pipeline = gst_parse_launch(pipeline_text, &error);