Advertisement
Guest User

dragonball z testee

a guest
Feb 19th, 2020
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. function Invoke-Sidious{
  2. Add-Type -TypeDefinition @'
  3. using System.Runtime.InteropServices;
  4.  
  5. [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  6. interface IAudioEndpointVolume {
  7. // f(), g(), ... are unused COM method slots. Define these if you care
  8. int f(); int g(); int h(); int i();
  9. int SetMasterVolumeLevelScalar(float fLevel, System.Guid pguidEventContext);
  10. int j();
  11. int GetMasterVolumeLevelScalar(out float pfLevel);
  12. int k(); int l(); int m(); int n();
  13. int SetMute([MarshalAs(UnmanagedType.Bool)] bool bMute, System.Guid pguidEventContext);
  14. int GetMute(out bool pbMute);
  15. }
  16. [Guid("D666063F-1587-4E43-81F1-B948E807363F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  17. interface IMMDevice {
  18. int Activate(ref System.Guid id, int clsCtx, int activationParams, out IAudioEndpointVolume aev);
  19. }
  20. [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
  21. interface IMMDeviceEnumerator {
  22. int f(); // Unused
  23. int GetDefaultAudioEndpoint(int dataFlow, int role, out IMMDevice endpoint);
  24. }
  25. [ComImport, Guid("BCDE0395-E52F-467C-8E3D-C4579291692E")] class MMDeviceEnumeratorComObject { }
  26.  
  27. public class Audio {
  28. static IAudioEndpointVolume Vol() {
  29. var enumerator = new MMDeviceEnumeratorComObject() as IMMDeviceEnumerator;
  30. IMMDevice dev = null;
  31. Marshal.ThrowExceptionForHR(enumerator.GetDefaultAudioEndpoint(/*eRender*/ 0, /*eMultimedia*/ 1, out dev));
  32. IAudioEndpointVolume epv = null;
  33. var epvid = typeof(IAudioEndpointVolume).GUID;
  34. Marshal.ThrowExceptionForHR(dev.Activate(ref epvid, /*CLSCTX_ALL*/ 23, 0, out epv));
  35. return epv;
  36. }
  37. public static float Volume {
  38. get {float v = -1; Marshal.ThrowExceptionForHR(Vol().GetMasterVolumeLevelScalar(out v)); return v;}
  39. set {Marshal.ThrowExceptionForHR(Vol().SetMasterVolumeLevelScalar(value, System.Guid.Empty));}
  40. }
  41. public static bool Mute {
  42. get { bool mute; Marshal.ThrowExceptionForHR(Vol().GetMute(out mute)); return mute; }
  43. set { Marshal.ThrowExceptionForHR(Vol().SetMute(value, System.Guid.Empty)); }
  44. }
  45. }
  46. '@
  47. Add-Type -AssemblyName System.Speech
  48.  
  49. # Identify current Mute status and Volume Level
  50. $CurrentMute = [Audio]::Mute
  51. $CurrentVol = [Audio]::Volume
  52.  
  53. # Un-mute if needed
  54. [Audio]::Mute = $False
  55. # If Volume is under 25%, change to 75%
  56. [Audio]::Volume = .25
  57.  
  58. # Intialize voice
  59. $Voice = New-Object System.Speech.Synthesis.SpeechSynthesizer
  60.  
  61. # Get current rate of speech. Probably set to 0(default)
  62. $CurrentRate = $Voice.Rate
  63.  
  64. # Change rate of speech
  65. $Voice.Rate = -2
  66. # Speak
  67.  
  68.  
  69.  
  70.  
  71. $Voice.Speak("Hikaru Kumo wo Tsukinuke FURAI AWEI (FURAI AWEI)
  72. Karadajuu ni Hirogaru PANORAMA
  73. Kao wo Kerareta Chikyuu ga Okotte (Okotte)
  74. Kazan wo Bakuhatsu Saseru
  75. Toketa Koori no Naka ni
  76. Kyouryuu ga Itara Tamanori Shikomitai ne
  77. CHARA HETCHARA
  78. Nani ga Okite mo Kibun wa Henoheno Kappa
  79. CHARA HETCHARA
  80. Mune ga PACHIPACHI suru hodo
  81. Sawagu Genki-dama...SUPAAKINGU!
  82. Sora wo Kyuukouka JETTOKOOSUTAA (KOOSUTAA)
  83. Ochite Yuku yo PANIKKU no Sono he
  84. Keshiki Sakasa ni naru to Yukai sa (Yukai sa)
  85. Yama sae Oshiri ni Mieru
  86. Nayamu Jikan wa nai yo
  87. Dokoka ni Hisomu "Bikkuri!" ni Aitai kara
  88. CHARA HETCHARA
  89. Atama Karappo no Hou ga Yume Tsumekomeru
  90. CHARA HETCHARA
  91. Egao URUTORA ZETTO de
  92. Kyou mo AIYAIYAIYAIYAI
  93. CHARA HETCHARA
  94. Nani ga Okite mo Kibun wa Henoheno KAPPA
  95. CHARA HETCHARA
  96. Mune ga PACHIPACHI suru hodo
  97. Sawagu Genki-dama...SUPAAKINGU!.")
  98.  
  99. # Change Rate,Volume,Mute values back to what they were set to originally
  100. $Voice.Rate = $CurrentRate
  101. [Audio]::Volume = $CurrentVol
  102. [Audio]::Mute = $CurrentMute
  103.  
  104. # Dispose of voice
  105. $Voice.Dispose()
  106.  
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement