Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 225767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:26:46+00:00 2026-05-11T19:26:46+00:00

I have these files with the extension .adc. They are simply raw data files.

  • 0

I have these files with the extension “.adc”. They are simply raw data files. I can open them with Audacity using File->Import->Raw data with encoding “Signed 16 bit” and sample rate “16000 Khz”.

I would like to do the same with python. I think that audioop module is what I need, but I can’t seem to find examples on how to use it for something that simple.

The main goal is to open the file and play a certain location in the file, for example from the second 10 to the second 20. Is there something out there for my task ?

Thanx in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:26:46+00:00Added an answer on May 11, 2026 at 7:26 pm

    For opening the file, you just need file().
    For finding a location, you don’t need audioop: you just need to convert seconds to bytes and get the required bytes of the file. For instance, if your file is 16 kHz 16bit mono, each second is 32,000 bytes of data. So the 10th second is 320kB into the file. Just seek to the appropriate place in the file and then read the appropriate number of bytes.

    And audioop can’t help you with the hardest part: namely, playing the audio. The correct way to do this very much depends on your OS.

    EDIT: Sorry, I just noticed your username is “thelinuxer”. Consider pyAO for playing audio from Python on Linux. You will probably need to change the sample format to play the audio—audioop will help you with this (see ratecv, tomono/tostereo, lin2lin, and bias)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do both these files have the same content? Or do they provide different functionality
I have two excel files. Among many columns in both these files, they have
I have an index.html and global.css files. When I open these files at Coda,
I have file with binary data. This is specification: The SRTM data files have
I have url and img tag like these (files can have gif, png or
The .XFDL file extension identifies XFDL Formatted Document files. These belong to the XML-based
Say I have this url: http://site.example/dir/ In this folder I have these files: test.ascx.cs
Say I have all these files in a folder: something(34324).php something(34).php something(3433454546).php something(65565).php something(9887).php
I have these two simple files that define a C++ class with a tryME
I have 4 files sorted alphabetically, A, B, C, and D. These files contain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.