Diary on 2024-11-25
Programming
Today I spent hours to write code to list the audio speak nodes from pipewire on Linux. This is done via embedding the C/C++ code into Golang. I am familiar with Golang, but not excellent at C/C++. The code is copied and tailored from the pipewire source code pw-cli, just keeping the codes regarding pw-cli ls Nodes. It is actually straightforward.
But for how to get the audio stream, it is not easy. I tried the same approach, using pw-cat code. This file is pretty large, having more than 2000 lines. I had to try several times with Zed or windsurf, but didn’t succeed. I will continue to do this.
One consideration is whether I should also implement this with PulseAudio, as of now it is still widely used. However, since it will eventually be replaced by PipeWire, I hesitate to spend time on it.
Another task is to integrate with whisper.cpp. I found that it already has Golang binding, but not complete parity with C/C++. I don’t know how to specify the device ID to it when starting to capture instead of providing a WAV audio file because I want to make it realtime process. I will investigate both directions: either embed C/C++ code in Golang or find parameters to pass to Golang binding. One thing worth mentioning is GPU support - whisper.cpp already has CUDA support, so no worries there.
I have to figure out how to integrate the whisper.cpp into my codebase. Later I will reference ollama on how it infuses llama.cpp into its codebase.
I will also query if there are some projects that are already using whisper.cpp that I can reference. I also want to try if there are some better ASR options locally, such as APIs for WhisperX.
Working
Today in MaCo APE, I had a deployment issue with a pipeline, involving deploying the code via PipelineV2 to G23 ABAP system. The error message didn’t provide much information. I tried to add environment variables to enable debug, but the log still wasn’t very verbose. Comparing to other successful examples, we suspect a few issues:
- Permission issues on the ABAP (G23) system side, where it may not accept the uploaded package
- Package corruption - this has been eliminated since it can build, scan, and upload successfully to the registry
- Central build not creating the artifact properly - this has also been excluded as no issues were found
We’ll wait until tomorrow for someone from the development team to check for server-side misconfigurations and work together on a solution.
Plan
We don’t made significant progress on the pipeline side. Recently, I want to drive implementation of feature toggle and MacroDelivery in MaCo, starting with a prototype based on one service/repository. If successful, we can roll it out to all areas. We’ll need to consider how to integrate DwC into our cloud delivery.
Our iFlow deployment service has been in good shape for the past two weeks since we started using it for imports/deployments. While not perfect, it has helped solve several pain points. Doug continues working on improvements - we’ve created several backlog items and he mentioned it will be ready this week. However, due to breaking changes in recent modifications, we may need to deploy a new service version. We’ll maintain both versions until after the next audit is complete, at which point we can shut down the initial version.
儿子学习
今天继续给儿子读哲学,之前没有提到这本书的名字《苏爷爷的哲理故事 把问题提出来》
- 表兄弟
- 英语复习 — 未作,只有周三完成了