How to Solve Audio File Volume Inconsistency and Quality Unification Issues with ffmpeg Normalization

Audio Volume Issues in Audio File Processing

When producing and distributing audio content, do you face these problems?

1. Volume Inconsistency Issues

  • Volume levels are not unified across multiple audio files
  • Volume differences occur due to different recording environments and equipment
  • Listeners need to frequently adjust volume levels

2. Quality Inconsistency Issues

  • Noise and unwanted frequencies are mixed in
  • Silent sections are too long and difficult to listen to
  • Unable to achieve professional-quality audio

3. Manual Processing Limitations

  • Processing large numbers of audio files individually is inefficient
  • Automation is difficult with GUI audio editing software
  • Applying consistent processing standards is challenging

Real-world Audio Quality Challenge Cases

Failure Case: Limitations of Manual Adjustment

# Traditional approach
# 1. Open each file in audio editing software
# 2. Visually and auditorily adjust levels
# 3. Manually apply noise reduction
# 4. Manually cut silent sections

# Problems:
# - Time-consuming for processing large numbers of files
# - Processing standards are subjective and inconsistent
# - Quality variations due to human errors

The solution to this problem is automated volume normalization with ffmpeg.

[Read More]

How to Efficiently Solve Low Accuracy and High Cost Issues in Japanese Text Generation with T5

Challenges in Japanese Text Generation

When working on Japanese text summarization, title generation, and document classification tasks, do you face these problems?

1. Accuracy Issues

  • Traditional rule-based methods cannot generate natural Japanese text
  • English-oriented models cannot handle Japanese grammar and expressions
  • Need to build separate models for multiple tasks

2. Development Cost Issues

  • Time and resources required for task-specific model development
  • Different approaches needed for document classification, summarization, and title generation
  • Enormous effort required for preparing training data and building models

3. Operational Complexity

  • Need to manage and operate multiple models
  • Different APIs and interfaces for each task
  • Complex model updates and maintenance

Real-world Text Generation Challenge Cases

Failure Case: Limitations of Task-specific Individual Development

# Traditional approach
classification_model = load_bert_classifier()      # For document classification
summarization_model = load_summarization_model()   # For summarization
title_generation_model = load_title_model()        # For title generation

# Problems:
# - Managing 3 separate models
# - 3x memory usage
# - High development and maintenance costs

The solution to this problem is Japanese T5 (Text-To-Text Transfer Transformer).

[Read More]

Subculture Science Research Group the 6th meeting: What is the point of football viewing?

Dialogue

R: I don’t understand soccer at all, but you can talk a lot, can’t you tarky?

R: I don’t know anything about soccer, but you can talk a lot, can’t you? tarky: That’s because I used to go to the home games of my favorite clubs quite often.

Hanasana: In Hiroshima, there’s Sanfrecce Hiroshima. A recent topic for Sanfrecce Hiroshima is the Emperor’s Cup. In soccer, from the top to the bottom, there is J1, J2, J3, and JFL, and there was a giant-killing when they were trounced 1-5 by a team from the fifth division.

[Read More]

Subculture Science Research Group the 5th meeting NFT

interactive

R: I’ve recently become interested in something called NFT.

TARKY: Yeah, I gave it a try.

R: What’s it like?

tarky: Right now I’m stuck at creating an account, but I wonder if it’s that different from trading virtual currency.

R: I’m not sure about the virtual currency trading, though.

tarky: First, you open an account at an NFT exchange and deposit virtual currency into it.

Then you use the virtual currency to buy collections (works of art linked to virtual currency).

[Read More]

Subculture Science Club Spilling the beans: How to speak with responsibly and evidence

R: I’d like you to give evidence or sources when you talk about it.

Tarky: What do you mean? Commentators on TV shows say whatever they want.

R: Those are experts of some kind, aren’t they? I’d like you to ensure their expertise.

Tarky: That’s a natural science argument, so I don’t think it’s something that is generally required or accepted.

R: Does that mean you think so?

Tarky: The argument is refined with evidence. The argument is refined by criticism. I think this is a special method of argumentation in the natural sciences, which we developed in our graduate school days. It’s not the best way to appeal to the masses.

[Read More]

The 4th Regular Meeting of the Subculture Science Research Group: Sake and Wood

Conversation style

R: Liquor and wood go hand in hand.

Tarky: Oh!

R: When you went to a brewery in Taiwan, you saw a row of sake barrels, right? It’s a common belief that whiskey tastes different depending on the wood of the barrel.

Tarky: Oh, weren’t they burned?

R: Even if it’s burned, some things soak in. And Quercus serrata is good. R: Even if it’s burned, there’s something that soaks in.

[Read More]

Subculture Science Research Group Regular Meeting No.3 Wood for electric guitar or anything else?

Conversation style

R: Something about Fender being forced to stop using ash wood

R: I heard that Fender had to stop using ash wood because of climate problems in the southern United States.

R: I was wondering, what’s the point of wood in an electric guitar?

tarky: What do you mean?

R: It doesn’t seem to matter what material it’s made of, but it’s a problem.

tarky: Oh, I see. To sum it up, from the performer’s point of view, it makes sense. But from the audience’s point of view, it doesn’t make much difference.

[Read More]

Building a python environment with poetry on mac os

Pip is a major method of installing python libraries.

poetry is a more advanced version control tool for development environments.

It seems to have official support for pyenv integration.

I’ll write down how to install it on mac os and what I got stuck.

Advantages of poetry

  • Can organize library dependencies.
    • There are some unexpected side effects depending on the version of the library.
    • Trying to recreate the environment can cause errors with library versions and installation order.
    • Building the environment is an inevitable part of human work, so it should be automated if possible.
    • Also, it seems to be able to update the library version to take dependencies into account.
    • And it keeps a record of the status.
  • Is it possible to separate the dependency records by git branch?
  • The libraries you can install are comparable to pip
    • Does it have the same references as pypy?
  • Usability is not much different from pip
    • Poetry add instead of pip install
  • It recognizes virtual environments created with pyenv and works with them.

I’m going to install it because it seems to be a convenient way to build an environment without much effort.

[Read More]

Why is fasttext so fast?

Features of fasttext

  • Improved objective function
    • Consideration of negative samples
    • This should not affect training time.
  • Change in optimization method
    • Use of stochastic optimization
    • If it affects the learning time, it should be this one
  • Implementation in C language
    • This is the most effective, isn’t it?

If we implement it in ## pytorch, it won’t be much different from word2vec. It would depend on the amount of data to be trained.

[Read More]

Using Amazon Transcribe for transcription and speaker separation

There is a transcription service called Amazon Transcribe.

The features of this service include

  • Speaker separation as of 2021/05/17
  • Japanese language support
  • It supports both video and audio formats.

There are some points.

I’ll write down how to use it with GUI.

Procedure

There is nothing difficult about the procedure, just follow the instructions on the screen. 1.

Login to the AWS console. 1.

  1. you need to create an account for AWS. 2.
  2. upload the audio file to S3. 1. You don’t need to tweak any options. 2. 2. choose a region that is close to your location.
  3. transcribe with Amazon Transcribe
    1. click “create job
    2. name can be anything as long as it’s distinguishable. 3. For Langueage, select Japanese. 4. For Input data, select the file you uploaded from Browse S3. Click Next. 6. Audio setting Turn on Audio identification (speaker separation). Select Speaker Identification to distinguish between speakers by using the characteristics of each speaker. 3. Turn on Alternative results. 1. Set Maximum alternative to 1. 2. The number of alternatives you set here will be output. If you want to examine the variations, you can set the number to more than 2. 7.
    3. click create. 8.
    4. confirm that the job you entered in Name is added to Transcription jobs. 9. Wait for the Status to become Complete. 10. Click on the target to get the output json.

Extract speech by speaker

Example script Writing in python

[Read More]