精华内容
下载资源
问答
  • 100+关于手机应用声音 点击,弹出,开关,警报音效声音打包下载.wav音效素材 wav、声音、开关、弹出、点击、警报
  • 易语言wav声音合并源码,wav声音合并,子程序1
  • wav声音合并.rar

    2020-04-05 16:45:33
    wav声音合并.rar
  • wav 声音 wav 格式

    2009-05-26 09:55:09
    声音 系统声音 c# 按钮加声音
  • 易语言wav声音合并易语言源码.rar 易语言wav声音合并易语言源码.rar 易语言wav声音合并易语言源码.rar 易语言wav声音合并易语言源码.rar 易语言wav声音合并易语言源码.rar 易语言wav声音合并易语言源码.rar
  • wav格式msn音效

    2011-12-18 23:56:49
    很多人都在找的wav格式msn音效4个打包下载
  • VC播放WAV声音文件

    2012-12-24 15:08:38
    VC播放WAV格式声音文件方法
  • 播放Wav声音

    2012-06-22 10:31:00
    //播放Wav声音 //把a.wav文件放到c盘目录下 #include "mmsystem.h" void __fastcall TForm1::Button1Click(TObject *Sender) { PlaySound("c:\\a.wav",NULL,SND_ASYNC); } //播放res里的Wav /*aaa ...
    //播放Wav声音
    //把a.wav文件放到c盘目录下
    #include "mmsystem.h"
     
    void __fastcall TForm1::Button1Click(TObject *Sender)
    {
       PlaySound("c:\\a.wav",NULL,SND_ASYNC);
    }
    //播放res里的Wav
    /*aaa WAVE A.WAV  //sounderes*/
    #include "mmsystem.h"
    #pragma resource "soundres.RES"

    void __fastcall TForm1::Button1Click(TObject *Sender)
    {
           // PlaySound( "aaa",HInstance,SND_RESOURCE|SND_ASYNC);/*C++builder 6.0*/
            PlaySound( "aaa",HInstance,SND_RESOURCE);/*C++builder 6.0*/ 
            PlaySound(TEXT("aaa"),HInstance,SND_RESOURCE);/*C++ builder xe2*/      
    }
     
    循环播放
    把playSound事件放在Timer下面即可
     
     
     
     





    转载于:https://www.cnblogs.com/xe2011/archive/2012/06/22/2558541.html

    展开全文
  • 易语言源码wav声音合并易语言源码.rar
  • 易语言多wav声音播放.e.主要是实现多个wav声音的同步播放以及对频率的修改!
  • 主要介绍了C#实现用于操作wav声音文件的类,实例分析了C#操作wav音频文件的技巧,具有一定参考借鉴价值,需要的朋友可以参考下
  • 连续敲击键盘的音效,纯净,常用
  • 报警声音大全__WAV

    千次下载 热门讨论 2011-04-29 09:19:42
    报警声音大全__WAV报警声音大全__WAV报警声音大全__WAV报警声音大全__WAV报警声音大全__WAV
  • 要让程序播放WAV声音文件,可以在PS中使用内置的声音类。它支持一个wav格式文件路径同时能让你控制声音的播放频率。 $player = New-Object -TypeName System.Media.SoundPlayer $player.SoundLocation = 'C:\...
  • 报警声音WAV.rar

    2019-06-18 18:08:56
    各类报警声音文件格式,格式为wav
  • VB版的真正Wav声音波型分析代码VB版的真正Wav声音波型分析代码VB版的真正Wav声音波型分析代码
  • delphi 播放wav声音

    2019-10-08 14:07:50
    procedure TForm13.btn1Click(Sender: TObject);begin play_wav_bykeys('1',0);end;function TForm13.play_wav_bykeys(filename: string; xflag: Integer): boolean; // xflag=1 wait play; xflag=0;nowaitc...

    procedure TForm13.btn1Click(Sender: TObject);
    begin
       play_wav_bykeys('1',0);
    end;

    function TForm13.play_wav_bykeys(filename: string; xflag: Integer): boolean; //  xflag=1 wait play; xflag=0;nowait
    const
      SND_DIR  = '.\wav\';
    var
      s,f:String;
    begin
      sndPlaySound(nil, 0); //停止发音
      s :=Format('%s%s.wav',[SND_DIR,filename]);//播放wav文件夹下filename声音文件

      if FileExists(s) then
      begin
        if xflag = 0 then  sndPlaySound(PChar(s), SND_ASYNC)
        else sndPlaySound(PChar(s), SND_SYNC);
      end;
    end;

    转载于:https://www.cnblogs.com/yangxuming/p/6673978.html

    展开全文
  • 读取 wav 格式声音文件 http://bigsec.net/b52/scipydoc/wave_pyaudio.html Python 支持 wav 文件的读写,实时的声音输入输出需要安装 pyAudio,pyMedia 进行 MP3 的解码和播放。 wav 是 Microsoft 开发的一种声音...

    读取 wav 格式声音文件

    http://bigsec.net/b52/scipydoc/wave_pyaudio.html

    Python 支持 wav 文件的读写,实时的声音输入输出需要安装 pyAudiopyMedia 进行 MP3 的解码和播放。

    wav 是 Microsoft 开发的一种声音文件格式,通常被用来保存未压缩的声音数据 (Pulse Code Modulation,PCM,脉冲编码调制)。wav 有三个重要的参数:声道数、采样频率和量化位数。

    声道数:单声道 (mono) 或者是双声道 (stereo)。
    采样频率:每秒钟声音信号的采集次数。常用的有 8kHz、16kHz、32kHz、48kHz、11.025kHz、22.05kHz、44.1kHz 等。
    量化位数:用多少 bit 表达一次采样所采集的数据,通常有 8bit、16bit、24bit 和 32bit 等。CD 中所储存的声音信号是双声道、44.1kHz、16bit。

    如果你需要自己录制和编辑声音文件,推荐使用 Audacity。它是一款开源的、跨平台、多声道的录音编辑软件。在工作中使用 Audacity 进行声音信号的录制,然后再输出成 wav 文件供 Python 程序处理。

    1. C:\Windows\media

    在这里插入图片描述

    (base) yongqiang@yongqiang:~$ cd /mnt/f/yongqiang_work/
    (base) yongqiang@yongqiang:/mnt/f/yongqiang_work$ ll
    total 260
    drwxrwxrwx 1 yongqiang yongqiang   4096 Jun  4 00:47 ./
    drwxrwxrwx 1 yongqiang yongqiang   4096 Jun  3 22:11 ../
    -rwxrwxrwx 1 yongqiang yongqiang 191788 Sep 15  2018 Windows_Ding.wav*
    -rwxrwxrwx 1 yongqiang yongqiang  70060 Sep 15  2018 ding.wav*
    (base) yongqiang@yongqiang:/mnt/f/yongqiang_work$
    (base) yongqiang@yongqiang:/mnt/f/yongqiang_work$ pwd
    /mnt/f/yongqiang_work
    (base) yongqiang@yongqiang:/mnt/f/yongqiang_work$
    

    2. 读 wav 格式声音文件

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    # yongqiang cheng
    
    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    
    import wave
    import numpy as np
    
    # WAV file
    audio_file = "/mnt/f/yongqiang_work/ding.wav"
    object = wave.open(audio_file, "rb")
    
    # (nchannels, sampwidth, framerate, nframes, comptype, compname)
    params = object.getparams()
    nchannels, sampwidth, framerate, nframes, comptype, compname = params[:6]
    print("nchannels = ", nchannels)
    print("sampwidth = ", sampwidth)
    print("framerate = ", framerate)
    print("nframes = ", nframes)
    print("comptype = ", comptype)
    print("compname = ", compname)
    
    # Returns number of audio channels (1 for mono, 2 for stereo).
    print("object.getnchannels() = ", object.getnchannels())
    
    # Returns sample width in bytes.
    print("object.getsampwidth() = ", object.getsampwidth())
    
    # Returns sampling frequency.
    print("object.getframerate() = ", object.getframerate())
    
    # Returns number of audio frames.
    print("object.getnframes() = ", object.getnframes())
    
    # Returns compression type ('NONE' is the only supported type).
    print("object.getcomptype() = ", object.getcomptype())
    
    # Human-readable version of getcomptype(). Usually 'not compressed' parallels 'NONE'.
    print("object.getcompname() = ", object.getcompname())
    
    # Reads and returns at most n frames of audio, as a bytes object.
    str_data = object.readframes(nframes)
    object.close()
    
    
    /home/yongqiang/miniconda3/envs/tf_cpu_1.4.1/bin/python /home/yongqiang/pycharm_work/yongqiang.py
    nchannels =  2
    sampwidth =  2
    framerate =  44100
    nframes =  17504
    comptype =  NONE
    compname =  not compressed
    object.getnchannels() =  2
    object.getsampwidth() =  2
    object.getframerate() =  44100
    object.getnframes() =  17504
    object.getcomptype() =  NONE
    object.getcompname() =  not compressed
    
    Process finished with exit code 0
    

    3. 读 wav 格式声音文件

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    # yongqiang cheng
    
    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    
    import wave
    import numpy as np
    import matplotlib.pyplot as plt
    
    # WAV file
    audio_file = "/mnt/f/yongqiang_work/ding.wav"
    object = wave.open(audio_file, "rb")
    
    # (nchannels, sampwidth, framerate, nframes, comptype, compname)
    params = object.getparams()
    nchannels, sampwidth, framerate, nframes, comptype, compname = params[:6]
    print("nchannels =", nchannels)
    print("sampwidth =", sampwidth)
    print("framerate =", framerate)
    print("nframes =", nframes)
    print("comptype =", comptype)
    print("compname =", compname)
    
    # Returns number of audio channels (1 for mono, 2 for stereo).
    print("object.getnchannels() =", object.getnchannels())
    
    # Returns sample width in bytes.
    print("object.getsampwidth() =", object.getsampwidth())
    
    # Returns sampling frequency.
    print("object.getframerate() =", object.getframerate())
    
    # Returns number of audio frames.
    print("object.getnframes() =", object.getnframes())
    
    # Returns compression type ('NONE' is the only supported type).
    print("object.getcomptype() =", object.getcomptype())
    
    # Human-readable version of getcomptype(). Usually 'not compressed' parallels 'NONE'.
    print("object.getcompname() =", object.getcompname())
    
    # Reads and returns at most n frames of audio, as a bytes object.
    str_data = object.readframes(nframes)
    # nframes = 17504,  channels = 2, sampwidth = 2
    # str_data (bytes: 70016) = nframes * channels * sampwidth = 17504 * 2 * 2 = 70016
    object.close()
    
    wave_data = np.fromstring(str_data, dtype=np.short)
    wave_data.shape = -1, 2
    wave_data = wave_data.T
    time = np.arange(0, nframes) * (1.0 / framerate)
    
    plt.subplot(211)
    plt.plot(time, wave_data[0])
    plt.xlabel("left channel - time (seconds)")
    plt.subplot(212)
    plt.plot(time, wave_data[1], c="g")
    plt.xlabel("right channel - time (seconds)")
    plt.show()
    
    
    /home/yongqiang/miniconda3/envs/pt-1.4_py-3.6/bin/python /home/yongqiang/pycharm_work/yongqiang.py
    nchannels = 2
    sampwidth = 2
    framerate = 44100
    nframes = 17504
    comptype = NONE
    compname = not compressed
    object.getnchannels() = 2
    object.getsampwidth() = 2
    object.getframerate() = 44100
    object.getnframes() = 17504
    object.getcomptype() = NONE
    object.getcompname() = not compressed
    
    Process finished with exit code 0
    

    在这里插入图片描述

    Python 调用 wave.open 打开 wav 文件,注意需要使用 "rb" (二进制模式) 打开文件:

    audio_file = "/mnt/f/yongqiang_work/ding.wav"
    object = wave.open(audio_file, "rb")
    

    open 返回一个 Wave_read 类的实例,通过调用它的方法读取 wav 文件的格式和数据:

    getparams:一次性返回所有的 wav 文件的格式信息,它返回的是一个组元 (tuple):声道数,量化位数 (byte 单位),采样频率,采样点数,压缩类型,压缩类型的描述。wave 模块只支持非压缩的数据,因此可以忽略最后两个信息。

    # (nchannels, sampwidth, framerate, nframes, comptype, compname)
    params = object.getparams()
    nchannels, sampwidth, framerate, nframes, comptype, compname = params[:6]
    

    nchannels, sampwidth, framerate, nframes, comptype, compname 等方法可以单独返回 wav 文件的特定的信息。

    readframes:读取声音数据,传递一个参数指定需要读取的长度 (以取样点为单位),readframes 返回的是二进制数据 (bytes),在 Python 中用字符串表示二进制数据。

    # Reads and returns at most n frames of audio, as a bytes object.
    str_data = object.readframes(nframes)
    # nframes = 17504,  channels = 2, sampwidth = 2
    # str_data (bytes: 70016) = nframes * channels * sampwidth = 17504 * 2 * 2 = 70016
    

    接下来需要根据声道数和量化单位,将读取的二进制数据转换为一个可以计算的数组:

    wave_data = np.fromstring(str_data, dtype=np.short)
    

    通过 fromstring 函数将字符串转换为数组,通过其参数 dtype 指定转换后的数据格式,由于我们的声音格式是以两个字节表示一个取样值,因此采用 short 数据类型转换。现在得到的 wave_data 是一个一维的 short 类型的数组,但是因为我们的声音文件是双声道的,因此它由左右两个声道的取样交替构成:LRLRLRLR....LR (L 表示左声道的取样值,R 表示右声道取样值)。修改wave_datasharp 之后:

    wave_data.shape = -1, 2
    

    将其转置得到:

    wave_data = wave_data.T
    

    最后通过取样点数和取样频率计算出每个取样的时间:

    time = np.arange(0, nframes) * (1.0 / framerate)
    

    4. sample width in bytes

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    # yongqiang cheng
    
    from __future__ import absolute_import
    from __future__ import division
    from __future__ import print_function
    
    import wave
    import numpy as np
    import matplotlib.pyplot as plt
    
    # WAV file
    audio_file = "/mnt/f/yongqiang_work/ding.wav"
    object = wave.open(audio_file, "rb")
    
    # (nchannels, sampwidth, framerate, nframes, comptype, compname)
    params = object.getparams()
    nchannels, sampwidth, framerate, nframes, comptype, compname = params[:6]
    print("nchannels =", nchannels)
    print("sampwidth =", sampwidth)
    print("framerate =", framerate)
    print("nframes =", nframes)
    print("comptype =", comptype)
    print("compname =", compname)
    
    # Returns number of audio channels (1 for mono, 2 for stereo).
    print("object.getnchannels() =", object.getnchannels())
    
    # Returns sample width in bytes.
    print("object.getsampwidth() =", object.getsampwidth())
    
    # Returns sampling frequency.
    print("object.getframerate() =", object.getframerate())
    
    # Returns number of audio frames.
    print("object.getnframes() =", object.getnframes())
    
    # Returns compression type ('NONE' is the only supported type).
    print("object.getcomptype() =", object.getcomptype())
    
    # Human-readable version of getcomptype(). Usually 'not compressed' parallels 'NONE'.
    print("object.getcompname() =", object.getcompname())
    
    # Reads and returns at most n frames of audio, as a bytes object.
    str_data = object.readframes(nframes)
    # nframes = 17504,  channels = 2, sampwidth = 2
    # str_data (bytes: 70016) = nframes * channels * sampwidth = 17504 * 2 * 2 = 70016
    num_bytes = len(str_data) # num_bytes = 70016
    print("num_bytes =", num_bytes, "bytes")
    object.close()
    
    wave_data = np.fromstring(str_data, dtype=np.short)
    wave_data.shape = -1, 2
    wave_data = wave_data.T
    time = np.arange(0, nframes) * (1.0 / framerate)
    
    plt.subplot(211)
    plt.plot(time, wave_data[0])
    plt.xlabel("left channel - time (seconds)")
    plt.subplot(212)
    plt.plot(time, wave_data[1], c="g")
    plt.xlabel("right channel - time (seconds)")
    plt.show()
    
    
    /home/yongqiang/miniconda3/envs/pt-1.4_py-3.6/bin/python /home/yongqiang/pytorch_work/end2end-asr-pytorch-example/yongqiang.py
    nchannels = 2
    sampwidth = 2
    framerate = 44100
    nframes = 17504
    comptype = NONE
    compname = not compressed
    object.getnchannels() = 2
    object.getsampwidth() = 2
    object.getframerate() = 44100
    object.getnframes() = 17504
    object.getcomptype() = NONE
    object.getcompname() = not compressed
    num_bytes = 70016 bytes
    
    Process finished with exit code 0
    

    在这里插入图片描述

    在这里插入图片描述

    在这里插入图片描述

    References

    http://bigsec.net/b52/scipydoc/wave_pyaudio.html

    展开全文
  • C++WAV声音素材之游戏常有

    热门讨论 2010-08-16 17:11:47
    C++WAV声音素材之游戏常有,提供资源共享
  • STM32利用PWM波播放WAV声音文件

    热门讨论 2012-11-26 13:40:31
    STM32利用PWM波播放WAV声音文件
  • vc播放wav格式声音

    2012-05-24 16:43:03
    vc播放wav格式声音
  • 好用的1-7WAV声音文件

    2018-08-24 02:34:56
    报警铃音WAV格式 数字1-7,中文的,很好用,java开发等代码可以使用到的
  • 用API播放 .wav 声音文件VB技术很实用的源码整理了一下本人硬盘里实用的编程资料和源码,全部是VB代码,希望大家能喜欢.
  • Java:播放WAV声音

    2020-01-18 23:37:03
    我正在尝试构建一个Java鼓机,该鼓机需要播放各种鼓声部件(低音鼓,军鼓等)的WAV声音样本.因为我需要紧凑地播放声音,所以我需要高性能.目前,我正在使用: import sun.audio.*; import java.io.*; public class ...

    我正在尝试构建一个Java鼓机,该鼓机需要播放各种鼓声部件(低音鼓,军鼓等)的WAV声音样本.因为我需要紧凑地播放声音,所以我需要高性能.目前,我正在使用:

     

     

    import sun.audio.*;
    import java.io.*;
    
    public class MusicPlayer {
    
        private String filename;
    
        public MusicPlayer(String filename) {
            this.filename = filename;
        }
    
        public void play() {
            try {
                InputStream in = new FileInputStream(filename);
                AudioStream as = new AudioStream(in);
                AudioPlayer.player.start(as); 
    
            } catch (IOException e) {
                e.printStackTrace();
            }          
        }
    }

    如此处建议:How can I play sound in Java?

    虽然它的工作速度比MP3 Javazoom jLayer快,但在高速和我进行cpu密集的工作(如调整应用程序窗口的大小)时,它仍然听起来不稳定.

    有任何提高性能的提示吗?

    顺便说一句.我还阅读了不推荐使用sun.audio.*的信息.有没有类似的解决方案?

    最佳答案

    您是否看过Java Media Framework (JMF)

     

     

    The Java Media Framework API (JMF)
    enables audio, video and other
    time-based media to be added to
    applications and applets built on Java
    technology. This optional package,
    which can capture, playback, stream,
    and transcode multiple media formats,
    extends the Java 2 Platform, Standard
    Edition (J2SE) for multimedia
    developers by providing a powerful
    toolkit to develop scalable,
    cross-platform technology.

    展开全文
  • 8500个WAV格式的音效

    2019-03-27 17:56:46
    8500个WAV格式的音效Unity里面可以用。
  • WAV声音档转PCM

    千次阅读 2016-07-13 19:25:15
    #include #include using namespace std; ...struct wav_struct {  unsigned long file_size; //文件大小  unsigned short channel; //通道数  unsigned long frequency; //采样频率
  • HTML嵌入wav声音文件

    千次阅读 2014-01-07 23:14:36
    Javascript代码如下(wav文件存放在wav文件夹中): ... 有的wav文件发不出声音,原因是wav文件存在多种格式。用Adobe Audition打开,另存为Windows PCM格式的wav就可以正常出身,A/mu-Law波形格式的发不出声音
  • 各种声音音效,通知,报警音,提升音,古典音,打击音,自然声音WAV资源,打包好了,非常适合做通知提示预警
  • 在文件外是奋声音,可是在python里打开就成了文本,这是为什么,怎么转为音效</p>

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 29,224
精华内容 11,689
关键字:

wav音效下载