From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4458E1F453 for ; Fri, 18 Jan 2019 21:45:01 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1gkbwc-0008Cd-CH; Fri, 18 Jan 2019 21:44:54 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gkbwa-0008CV-Sk for sox-users@lists.sourceforge.net; Fri, 18 Jan 2019 21:44:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=hdQxRyIY2oOF6MGuSlzqi5xThN3iwURRwKuhmjIFV7w=; b=QA4v8XAFuCwh1COmjssrFZQQ6O YEVrx3ArD2cDMuSIjjpA8KySxnpdAeX/KPt7BfqHXsxWgDIOD6o+nKDz+oHbFOzwmjMoqxIslfIoD El4KTXKF7tJHe65LpBxW+5KSle7wFpFzgfapraL1mn5JLR4nPpkSHR1LbrVqwujHhpVw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hdQxRyIY2oOF6MGuSlzqi5xThN3iwURRwKuhmjIFV7w=; b=j3CzoSHE9dpay8mv+4eP37kyRg WezYVrcFRen4DeENU0TNv+QXWBjt4FkC5s0sC93cx0Gk3NNjMaESm6i6NRCHeHAzazifwZmRAmmHE GGtFQw+s5zvgBuM21c9dHAakhXqKbdjtSxaFrw6V8MvdR8uPNqdPc+G2Z8UeRcmMYniM=; Received: from unicorn.mansr.com ([81.2.72.234]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1gkbwS-00CiM7-Bc for sox-users@lists.sourceforge.net; Fri, 18 Jan 2019 21:44:52 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 7F52915637; Fri, 18 Jan 2019 21:44:35 +0000 (GMT) From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Toru Yagi References: <652273.73317.qm@web102218.mail.kks.yahoo.co.jp> <2995b4a4-8938-e015-1d1f-d55a018c8f23@yahoo.co.jp> Date: Fri, 18 Jan 2019 21:44:35 +0000 In-Reply-To: <2995b4a4-8938-e015-1d1f-d55a018c8f23@yahoo.co.jp> (Toru Yagi's message of "Fri, 18 Jan 2019 23:47:04 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 X-Headers-End: 1gkbwS-00CiM7-Bc Subject: Re: sox can't encode to 16-bit X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Cc: sox-users@lists.sourceforge.net Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: sox-users-bounces@lists.sourceforge.net Toru Yagi writes: > On 1/18/19 9:54 PM, M=E5ns Rullg=E5rd wrote: >>> $ rec -c 2 -b 16 -r 48000 -p trim 0 20 | >>> sox -V3 -c 2 -b 16 -r 48000 -p test.wav trim 0 10 : newfile : restart >>> >>> I want to record 16-bit wav files, but the files generated are 32-bit o= nes. >> >> Put the "-b 16" option immediately before the output file argument. You >> can also drop all the format options preceding the -p since the pipe >> format already includes all information. > > $ rec -c 2 -r 48000 -b 16 -p trim 0 20 | sox -p test.wav trim 0 10 : newf= ile : restart > rec WARN formats: sox can't encode to 16-bit > [...] > Is the position of "-b 16" option okay? No, it needs to go immediately before the "test.wav" argument. >> That said, why don't you do the splitting directly with the rec command? >> This should work: >> >> $ rec -c 2 -b 16 -r 48000 test.wav trim 0 10 : newfile : restart > > I understand it, but I have to save test.wav first. > I just want to split into wav files while I record from the line input. The command I suggested does exactly that. -- = M=E5ns Rullg=E5rd _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users