Add File
This commit is contained in:
15
src/main/java/org/dromara/easyai/voice/VoiceTest.java
Normal file
15
src/main/java/org/dromara/easyai/voice/VoiceTest.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.easyai.voice;
|
||||||
|
|
||||||
|
import javax.sound.sampled.UnsupportedAudioFileException;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public class VoiceTest {
|
||||||
|
public static void main(String[] args) throws UnsupportedAudioFileException, IOException {
|
||||||
|
File file = new File("D:\\sondTest\\wo.wav");
|
||||||
|
WaveFile wav = new WaveFile(file);
|
||||||
|
int amplitudeExample = wav.getSampleInt(140); // 140th amplitude value.
|
||||||
|
System.out.println("帧数:"+wav.getFramesCount());
|
||||||
|
System.out.println("140帧的幅度:"+amplitudeExample);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user