Closed joto closed 2 years ago
I don't know if Unix sockets are still faster in Linux than tcp-sockets to localhost these days but probably neither lua nor python might not have an implementation in their standard library.
Should we add a branch for this?
I have pushed a new version of that PR rebased on current master and with more fixes. It probably still could need more error checks and tests. Also I haven't touched the SQL script cc_transcript_via_daemon.sql
because I don't have a way to test it.
Testing cc_transcript_via_daemon.sql works as follows:
echo "create extension plpython3u;" |psql
psql -f cc_transcript_via_daemon.sql
~/ > psql
SET
psql (13.5 (Debian 13.5-0+deb11u1))
Geben Sie »help« für Hilfe ein.
Toukyou (1 Zeile)
dōng jīng (1 Zeile)
Okay, I have updated the sql function now, too. And I switched the python server code to a more modern async code which can handle multiple connections at the same time.
I believe this is now ready for review and merge. Probably not perfect, but a solid next step.
OK, I will merge this then.
Found one thing. runtests.lua now produces an exeption if the transcription server is not running.
Found one thing. runtests.lua now produces an exeption if the transcription server is not running.
Isn't that good? (Well, the error message could be better). Or what do you prefer would happen?
AFAIR I had an error-message printed to stderr and did return an unaltered string. Don't know if this is a better behaviour but tests just fail this way rather than producing an exception.
This is my current experiment with using a simple TCP socket for communication between client and server instead of HTTP. In my tests this needs onyl about 1/3 of the time overall.
Not something to merge yet. Needs more error checks etc.