From patchwork Mon Aug 19 05:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andy Tai X-Patchwork-Id: 67123 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 03BFD27BBE9; Mon, 19 Aug 2024 06:04:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A571527BBE2 for ; Mon, 19 Aug 2024 06:04:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfuYf-0007ne-8A; Mon, 19 Aug 2024 01:03:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sfuY6-0007l4-6d for guix-patches@gnu.org; Mon, 19 Aug 2024 01:03:22 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sfuY5-0001Ut-Tk for guix-patches@gnu.org; Mon, 19 Aug 2024 01:03:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=va2MFjWKldVCh5mZ3dA4n8SQh9Ol8wzqqZHnDJkXdF8=; b=REc5NdPxvlqzCAaqgvJJ/8k6rG7cwA1wZxVKLd5iNbR8gSZHNv/LvOkb98fmO45xbK9mtp4HPYHZ5wqc8OQA6c5l+Nd55AGEEBaSF5FZbnCDX4YUjvFdughzmXHyOND11y0dL3jUSIDE1bF+BnByd5KcIz8DgZ2J3pe7evPXooWqP5Bp1/rKa0FnKit80wfmukHd/xNyBLcm+YG2buaq0nDnMHobofZB4D+880mnTknawKer+H93vvXsq0w6nlBllqj3leol9mu16jSqiF9i5UVWJZfMoQd8YIRVXktRAtJtiG6D0SxSZNcs59DtX/molY/a8FUgHipUU2//Cgsv3Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfuYk-00077J-27 for guix-patches@gnu.org; Mon, 19 Aug 2024 01:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72027] [PATCH v6] gnu: Add whisper-cpp. References: <0c08fdb11c2641ece7d267340877c58f144df110.1720587166.git.atai@atai.org> In-Reply-To: <0c08fdb11c2641ece7d267340877c58f144df110.1720587166.git.atai@atai.org> Resent-From: Andy Tai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Aug 2024 05:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72027 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72027@debbugs.gnu.org Cc: Andy Tai Received: via spool by 72027-submit@debbugs.gnu.org id=B72027.172404379527292 (code B ref 72027); Mon, 19 Aug 2024 05:04:02 +0000 Received: (at 72027) by debbugs.gnu.org; 19 Aug 2024 05:03:15 +0000 Received: from localhost ([127.0.0.1]:57352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfuXy-000768-QV for submit@debbugs.gnu.org; Mon, 19 Aug 2024 01:03:15 -0400 Received: from mail-pf1-f169.google.com ([209.85.210.169]:45220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfuXv-00075s-Ts for 72027@debbugs.gnu.org; Mon, 19 Aug 2024 01:03:13 -0400 Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-70d18d4b94cso3080654b3a.2 for <72027@debbugs.gnu.org>; Sun, 18 Aug 2024 22:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724043684; x=1724648484; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=va2MFjWKldVCh5mZ3dA4n8SQh9Ol8wzqqZHnDJkXdF8=; b=Pnyxfmc5XVC0PYjxYWrZyf0ijzHiBz4AkWHGgeY8+xP1xWaLXgKZ+Y2Z36fhh933cr wYyye5bQduZUL2B511SOJUPWssWZGbDlocgRf2g9rdlm7CehSRtsZdUth7RyRcnDNyq4 7gPOxRZiW/VvSJFEl5k1ohT3cpnessSNs09hY4eLeVFhZRvLV0VMCkdofy+NJNRggp15 3YOV1Uxmdzh0MIdDGEDF9c0iFLHj6zh7KKBT5Ulc0OzyHRMvRpnCslFG+uEZUYYxPAgT DLdJZMb7cmyzKAL/R6/5XOIVQ4ba831VpAxcjE/dCo81ZG2Wwgvll9kWDMs6E4zwqb1D t0dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724043684; x=1724648484; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=va2MFjWKldVCh5mZ3dA4n8SQh9Ol8wzqqZHnDJkXdF8=; b=eJjJONacDY6gwqCu2pi3YDiQ6KaKRDN5KkiYHYHWANJkgQ7ND/3cde+pnwvuVz8nT3 a6GrL5w7TP56WrC5rnK7krpMeIXg/uAeXYq4An7sJU0jFX7CrhHLELoo8V5Cv8O7h868 mF+biFmV+Pw44dC7RD2RXF6DurRSFxykuaQLeJzJQSGUFStC8TBIPfo3sqYMj7dqwF/C 1PbhidAKVQzclX2WyJd6eZSX64yKzHDrauY0NpS+BPesmHvmSm9VzFTscF88WkJXF6N0 OePttp3uUXqUeJUU5nevQA0jMV9SLKmMOvmLBRJUVCUn28gwJS7/HndwQnZS6aOSj+YP xsjg== X-Gm-Message-State: AOJu0Yy3NutXrjdYhIrgAPOgtX+F2KrraIltsvFE85ouDTTMXf8cJ6jS I2rTiGg/1p/+hZPDadxzf12Ev5alTj7bcppTW6YhwATtLsy4LW9PzsX+8A== X-Google-Smtp-Source: AGHT+IF3AnwIwOpR/Hwi73BPsaHgEuh/X0t+OABqU+r1LqgWiXx3GIeAHsgfD91hAFtv0yv3ynZovA== X-Received: by 2002:a05:6a20:d707:b0:1c4:e0d3:9637 with SMTP id adf61e73a8af0-1caa372e5f4mr8375513637.52.1724043684028; Sun, 18 Aug 2024 22:01:24 -0700 (PDT) Received: from DEskMiniX300.. ([209.237.158.138]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f0319683sm56522385ad.67.2024.08.18.22.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 22:01:23 -0700 (PDT) From: Andy Tai Date: Sun, 18 Aug 2024 22:01:15 -0700 Message-Id: <16d05297a86b0ef9bf778a255c590eec52a22ccf.1724043644.git.atai@atai.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/machine-learning.scm (whisper-cpp): New variable. Change-Id: If191f434a3f66b16afdc702069eaed1ca22e2427 --- gnu/packages/machine-learning.scm | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) base-commit: 58a839273d1e4fac2b3a0ec456aabdf82deaa124 diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 4c5b713cbf..09e83a7636 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2024 Timothee Mathieu ;;; Copyright © 2024 Spencer King ;;; Copyright © 2024 David Elsing +;;; Copyright © 2024 Andy Tai ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,6 +118,7 @@ (define-module (gnu packages machine-learning) #:use-module (gnu packages rdf) #:use-module (gnu packages regex) #:use-module (gnu packages rpc) + #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) #:use-module (gnu packages statistics) @@ -5937,6 +5939,47 @@ (define-public oneapi-dnnl-for-r-torch (sha256 (base32 "1zyw5rd8x346bb7gac9a7x3saviw3zvp6aqz2z1l9sv163vmjfz6")))))) +(define-public whisper-cpp + (package + (name "whisper-cpp") + (version "1.6.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ggerganov/whisper.cpp") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "01q4j602wkvsf9vw0nsazzgvjppf4fhpy90vqnm9affynyxhi0c4")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags #~'("-DWHISPER_STANDALONE=TRUE" "-DWHISPER_SDL2=TRUE") + ;; "-DWHISPER_FFMPEG=TRUE" ; TO DO + #:phases #~(modify-phases %standard-phases + #$@(if (not (target-64bit?)) + '((add-after 'unpack 'skip-failing-tests + (lambda _ + ;; 32-bit system + ;; large model does not fit in RAM in 32-bit system, + ;; disable large model test + (substitute* "tests/CMakeLists.txt" + (("LABELS \"large\"") + "DISABLED true"))))) + '())))) + (inputs (list sdl2)) ;ffmpeg openblas ;TO DO: + (native-inputs (list pkg-config)) + (properties '((tunable? . #t))) ;use AVX512, FMA, etc. when available + (home-page "https://github.com/ggerganov/whisper.cpp") + (synopsis "Port of OpenAI's Whisper model in C/C++") + (description + "This package is a high-performance inference of OpenAI's +Whisper automatic speech recognition (ASR) model, implemented in plain C/C++ +without dependencies") + (license license:expat))) + + (define-public python-gguf (package (name "python-gguf")