tensorflow Google Coral开发板无法拾取声音/输入

68bkxrlz  于 2023-06-06  发布在  Go
关注(0)|答案(1)|浏览(138)

我正在与谷歌珊瑚开发委员会,我已经设法建立董事会和运行演示,它检测汽车或货车。接下来,我想转到语音命令。在Coral网站上,他们有一个项目“关键字识别”。这似乎正是我想要的。我把这个项目放到我的板子上,然后去试了试。但是没有运气。电路板未检测到任何声音。我尝试使用带麦克风的3. 5毫米耳机(它在其他设备上工作,没有驱动程序)。看看开发板规格,它有两个内置的PDM麦克风。不知道为什么它检测不到任何输入
我按照我试过的谷歌APC youtube频道上的教程,检查董事会的驱动程序。尝试使用alsamixer打开声音设置尝试使用和不使用耳机arecord -d test.wav录制一个小样本。正在创建.wav文件,但未捕获音频。已尝试检测主板上的音频设备。
但尽管如此,在这个时候没有成功,我发现很难找到其他在线资源为这个问题。我是不是忽略了什么?
任何帮助将不胜感激。谢谢

nkhmeac6

nkhmeac61#

我遇到了同样的问题。结果只需要设置一个记录标志
例如,将耳机插入3.5mm音频插孔,然后运行

arecord -D hw:0,0 -c 2 test.wav -f S16_LE -d 3

对我很有效

使用终端调试(可选)

我在调试过程中的一些笔记。
mediainfo以人类可读的格式显示文件信息。
为了可视化(所以不必相信通过同一个音频端口重放)wav文件,我这样做了。我使用sox转换为频谱图(图像),然后转换为jpg,因为出于某种原因,jp2a只需要jpg(尽管jp2a文档暗示png是可以接受的)。

sox loud.wav -n spectrogram; convert spectroram.png spectrogram.jpg; jp2a spectrogram.jpg

你可以尝试一些像沉默和比较说了很多p s或轻敲麦克风,以确保它是录音。
这是“p”ahs的可视化结果(尽管我是在笔记本电脑上而不是在coral开发板上运行的)。

sox test.wav -n spectrogram; convert spectrogram.png spectrogram.jpg; jp2a spectrogram.jpg
                                                                                                                                  
                                                                                                                                  
       ................................'.......................''..................................................... .          
        ..........................'',;,,;,'...............',;;;;,'......................'',;::,'............''''''''..            
     .............................',::;:;,................';cc::;'......................',;clc;'...........'''''''''...           
        ..........................',cc:;;''...............':ll:;;'......................';ccl:;'...........''''''''''..           
        ..........................,col:;;,'...............',::cl:'......................';cc::;''..........''''''''''..    :k.    
     ..............''.............,cllclc;'...............':llcc:'......................,:c:;;,'...........''''''''''..    dW.    
        .............''...........;odolc:,'...............';lllc;'.....................',cllll:,..........'''''''''''..    dW'    
     . ............'.''...........,lddoc:,'...............;odlc:;''.....................,lol::;,..........''''''''''''.    dN.    
        ..........''..............,coooll;'...............,coolc:,'.....................,clodxo;'.........''''''''''''.    oN'    
       ...........''..............,:lodxdc'...............,ldoddl;'.....................;oxddxdc'.........''''''''''''.    lK.    
       ...........'''.............:dkxddo:'..............';oxxool;'....................'cxkkxdc,'......'''''''''''''''.    cO.    
        ..........'''.............;dkkkkko,''.............;lddxxd:'....................';odollc,'......'''''''''''''''.    :k.    
     .............'''.............,codoooc'...............;dxdoc;''....................'ckkkxd:''......'''''''''''''''.    ;d.    
        ..........''....'.........,lddolc;'..............';ldxxoc,.....................':dxxoc:''.......''''''''',''''.    ,c.    
      ............'''...'.........;oxxxoc:'..............';oxdddo;'.....................,lxkkxc,'......''''','''',,'''.    .;     
 ..     ..........'''...''........,oxxxdl:'...............:dxxxxo;'.....................;dxxooc,'......'''',,,''',,,''.    .' .   
 ..    ...........'''...''........;dxddxdl,..............':dxxdoc,'....................';oxkOxo,'.....''''',;;,'',;,''.    .'     
  .    ..........''''..'''........;oxxxxdc,'.............';dkxkkx:'....................'cxxxddoc'.....''''',;;'',;;,''.    .'     
  '     .........''''..'''.......'ck00kkxd;'.............';dxxdol;'....................'ckkxxxo:'.....''''',;;,',;:;''.    .'     
  '   ...........''''...''.......'ckOOxdoc,'''...........';xOOkkxl,''..................'lOOkddoc''''..'''',:c:,,;::;''.    .'     
 ..     .........''''............'cxOkkxxo,''............'cxOOkxl;'....................'cxkkxxo:''....'''',;::,,;::;,'.    ..     
      ...........''''............';okOkdol;'''...........'lkOOkxdc''''.................';ldkkkxl''''..'''';c:;,,;:;,''.    ..     
        .........''''.............;dO0OOxo,''''.'........';lxkkdo:'''..................';dO0OOOd;''.'''''',;:;,;::;,''.    .. .   
       ..........''''.............:xO00kdl,'''...........'lkO000Oo;'''''''''...........'ckOO0K0x;,'''''''';:::;;:::;,'.    ..     
       ..........''''............'ckO0KKKOl;,''''''..'...'lxO0Odl:'''............'.....':dO0OOko,''''''''';cll::looc,'.     . .   
        ..........'''.....'......'cxO00Okd:''..'.........'oO00KK0x;'''''''.............'ck00O0Od,''''''''';colccllll:,.     .     
        ..........''.............'lO0KKKOd:,''''''.......'oO0OOxdl,'''..'..............'cxOO00Od;'''''''',lddddddooolc.           
        ..................'......'cxO0Okkd:''............'lxk0K0Oo;,''''..''.....'.....':k00KXKk:,''''''',ldxxdxkkxdl:.           
     .........''..''''....'......'cxOO0K0xc:;,''''''''''',dO00Oxoc''''....'....'..'....'oOKKKKKO:,'''''',cdxkkxkOxkkoc.           
       ...........'''....'''.....'lk000KK0d,,''''........,x0KKKXX0l;;,''''''''..'''....'oO0O0XK0l,,'''',,:oxkxxO0Okxoo.        .  
       ...''...'...''''''''''.''''oOKKK0OOo,''''''..'''..,kKK0OO0k:'''''''''''..''''...'lkOOkxdo;'''''',;okOOkkOOOOkdo.           
      ....''''''''''''''.''''''.',x0KK00K0d,'''''''''''.',xKXX00Ox;'''''''''''''''....',kKKKOOkl,'''''',:x0KKK000K00Ox.        .  
        .'''''''''''''''''''''''''dOKK0Oxo:'''''''''''''',dOKKKOdc,'''''''''''''''''''',dO0Oxxxl,''''''':k0KKK00KKK0Ox.     .'.   
       ...''''''''''''''''''''''',kKXXX0Okl,''''''''''''':k0KXXKOx;'''''''''''''''''''',xKNX0OOd;''''''':O0KXKKXKKKK0O'           
        .'''''''''''''''''''''''''lOKKKOkxc'''''''''''''',ok0KK0kd:'''''''''''''''''''''lxO0kkOx:'''''''ck0KXK0KKKK0Ok.           
      . . .... ... ............. .....,,.','..'.'..........',,'',;,.'''..''....'..'....''.,,,''',..''...''..,,'.',,..'..          
                                                                                                                                  
                                                            ... ..

vs.沉默

$ sox test.wav -n spectrogram; convert spectrogram.png spectrogram.jpg; jp2a spectrogram.jpg
                                                                                                                                  
                                                                                                                                  
       ................................................................................................................           
        ..............................................................................................................            
     ..................................................................................................................           
       ................................................................................................................           
        ..............................................................................................................     :k.    
     ..................................................................................................................    dW.    
        ..............................................................................................................     dW'    
     . ................................................................................................................    dN.    
        ..............................................................................................................     oN'    
       ................................................................................................................    lK.    
       ................................................................................................................    cO.    
        ..............................................................................................................     :k.    
     ..................................................................................................................    ;d.    
        ...............................................................................................................    ,c.    
      .................................................................................................................    .;     
 ..     ...............................................................................................................    .' .   
 ..    ................................................................................................................    .'     
  .    ................................................................................................................    .'     
  '     ..............................................................................................................     .'     
  '   .................................................................................................................    .'     
 ..     ..............................................................................................................     ..     
      ................................................................................................................     ..     
        ...............................................................................................................    .. .   
       ................................................................................................................    ..     
       ..............'''..............................................'................................................     . .   
        ...............................................................................................................     .     
        ..........................................''...................................................................           
        ..........''......'''......'...................''''.................'................'''.....''................           
     .....'''.''.....'''....''...............................'''..''.......'...'..'.......'.....'''''''''''''..''''....           
       ....''....'''..''''...............''...........'...''''''....''...................'''.....'''''.....'''.........        .  
       ...'''..''.'''...''.......''......''...''.....'...'..''.........'''''''''''''''........''''''...'...............           
      .....'.......''''...''...'''''....'.'''''''''''''''''''''''...'''''''''''''.''''''.''''''.''''''''''''..''''.....        .  
        .'''''''.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''..'''''''''''''''''.'''''''''''''...     .'.   
       .''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''...           
        ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''.           
      . ................... ................ .........  ..................... ...   ...................  .........   . .          
                                                                                                                                  
                                                            ... ..                                                                
...... '...

如果实际上没有输入(例如如果你只使用arecord test.wav),你会看到空:

mendel@vexing-apple:~/whisper.cpp$ sox test.wav -n spectrogram ; convert spectrogram.png spectrogram.jpg ; jp2a spectrogram.jpg
                                                                                                                                 
                                                                                                                                 
       .                                                                                                                         
                                                                                                                                 
       .                                                                                                                         
                                                                                                                                 
                                                                                                                          lK,    
     ...                                                                                                                  dW,    
                                                                                                                          dW;    
                                                                                                                          dN,    
                                                                                                                          oX,    
                                                                                                                          lK'    
       .                                                                                                                  cO'    
                                                                                                                          :x.    
      .                                                                                                                   ,o.    
                                                                                                                          ':.    
                                                                                                                          .,     
 ..                                                                                                                       .'.    
  .                                                                                                                       .'     
  .    .                                                                                                                  .'..   
  '                                                                                                                       .'     
  .                                                                                                                       .'     
      .                                                                                                                   ..     
                                                                                                                          .. .   
      ..                                                                                                                  ..     
                                                                                                                           .     
                                                                                                                           .     
                                                                                                                                 
                                                                                                                                 
      ..                                                                                                                         
                                                                                                                              .  
                                                                                                                                 
                                                                                                                              .  
                                                                                                                           ...   
                                                                                                                                 
                                                                                                                                 
      .                            .                                           .          .                           .

相关问题